This documentation supports the 20.08 version of BMC CMDB, which is available only to BMC Helix subscribers (SaaS).

To view an earlier version, select the version from the Product version menu.

Cleaning up CMDB data by using the CI and Relationship Correction Tool option

The CI and Relationship Correction Tool is a command-line utility that helps you to clean-up the data in BMC CMDB.

To reset reconciliation identities

This procedure resets reconciliation IDs to 0, which allows the Reconciliation Engine to assign correct reconciliation IDs during the next reconciliation process.

You might need to reset reconciliation IDs of Configuration Items (CIs) in your source or destination dataset if they are identified incorrectly or if your reconciliation rules are configured incorrectly.

When you reset reconciliation IDs by using the By Class option, IDs of component instances related to weak relationships are also reset. For example, if you reset the IDs of BMC_ComputerSystem instances, the IDs of components such as BMC_DiskDrive and BMC_Monitor that are related to those instances through BMC_HostedSystemComponents relationships are also reset.

  1. Start the cmdbdiag program.
    For information about starting the cmdbdiag program, see Verifying your data model.
  2. At the main menu prompt, type 2.
  3. At the CI and Relationship Correction Tool submenu prompt, type 1.
  4. At the By dataset or class prompt, perform the appropriate action:
    1. To reset reconciliation IDs in all datasets, type class.
    2. Enter the namespace within which the class exists, or press Enter to accept the default value of BMC.CORE.
    3. Enter the name of the class.
    4. Type y to reset reconciliation IDs for all instances of the class, or press Enter to reset the reconciliation ID for specific instances.
    5. If you are resetting IDs for all instances in the class, skip to the next step. If you are resetting IDs for specific instances, enter the number of instances for which you want to reset the reconciliation IDs.
    6. Enter the ID of the first instance for which you want to reset the reconciliation ID and follow the prompts to specify each instance that you want to reset.
    7. To reset reconciliation IDs in a specific dataset, press Enter and provide a dataset ID.
  5. At the Do you want to continue? prompt, type y to reset reconciliation IDs.

To delete an instance in a dataset

Use this procedure to delete instances that you no longer need, such as datasets created in a test environment. When deleting instances, their relationships are also deleted automatically, to maintain data integrity.

  1. Start the cmdbdiag program.
    For information about starting the cmdbdiag program, see Verifying your data model.
    For information on setting the Administrator-Only Mode, see  Setting administrative options Open link .
  2. Log in to the AR System server and type 2 at the Main Menu prompt.
  3. At the CI and Relationship Correction Tool submenu prompt, type 2.
  4. At the All datasets [y, n] prompt, perform the appropriate action:
    • To delete instances in all datasets, type y.
    • To delete instances in a specific dataset, press Enter and provide a dataset ID.

To correct invalid relationship instances

Use this procedure to delete relationships for which either of the Configuration Item (CI) endpoints does not exist. For each endpoint of a relationship instance, the program can correct the class ID, dataset ID, and reconciliation ID.

  1. Start the cmdbdiag program.
  2. For information about starting the cmdbdiag program, see Verifying your data model.
  3. Log in to the Remedy Action Request System server and at the main menu prompt, type 2.
  4. At the CI and Relationship Correction Tool submenu prompt, type 3.
  5. At the All datasets [y, n] prompt, perform the appropriate action:
    • To correct invalid relationship instances in all datasets, type y.
    • To correct invalid relationship instances in a specific dataset, press Enter and provide a dataset ID.
  6. Enter a name for the output file, or press Enter to accept the default file name.
    If you enter a file name manually, you must specify an absolute path for the file, for example, C:\CorrectRelationshipsReport.txt. If the file name is not specified correctly, the program saves the report file in the same directory as the cmdbdiag program.
  7. At the Do you want to continue? prompt, type y to correct invalid relationships.

To delete orphan relationships

Use this procedure to delete relationships that might have nonexistent Configuration Item (CI) endpoints.

  1. Start the cmdbdiag program.
    For information about starting the cmdbdiag program, see Verifying your data model.
  2. Log in to the Remedy Action Request System server and at the main menu prompt, type 2.
  3. At the CI and Relationship Correction Tool submenu prompt, type 4.
  4. At the All datasets [y, n] prompt, perform the appropriate action:
    • To delete orphan relationship instances in all datasets, type y.
    • To delete orphan relationship instances in a specific dataset, press Enter and provide a dataset ID.
  5. Enter a name for the output file, or press Enter to accept the default file name.
    If you enter a file name manually, you must specify an absolute path for the file, for example, C:\DeleteOrphanedRelsReport.txt. If the file name is not specified correctly, the program saves the report file in the same directory as the cmdbdiag program.
  6. At the Do you want to continue? prompt, type y to delete orphan relationships.

To delete relationships that violate cardinality

Use this procedure to delete relationships that might have violated the one-to-one, one-to-many, or many-to-one cardinality.

  1. Start the cmdbdiag program.
    For information about starting the cmdbdiag program, see Verifying your data model.
  2. Log in to the Remedy Action Request System server and at the main menu prompt, type 2.
  3. At the CI and Relationship Correction Tool submenu prompt, type 5.
  4. At the All datasets [y, n] prompt, perform the appropriate action:
    • To delete violated cardinality relationships in all datasets, type y.
    • To delete violated cardinality relationships in a specific dataset, press Enter and provide a dataset ID.
  5. If you want to delete all the instances in violation automatically, type y at the Do you want to automatically delete all instances? [y, n] prompt.
  6. Type y again to confirm automatically deleting all instances in violation. Otherwise, press Enter to accept the default value of n (no).
    The Automatically delete option deletes instances based on their create date and time. The violated instance that is created most recently will be deleted. A copy of the deleted instance is saved in an XML file called <instanceId>.xml in the current directory.
    If you type n at the prompt, the list of violated instances is displayed and you are prompted for confirmation before deleting each instance. An XML backup is generated.
  7. Enter a file name for the output file, or press Enter to accept the default file name.
    If you enter a file name manually, you must specify an absolute path for the file, for example, C:\FixCardinalityViolations.txt. If the file name is not specified correctly, the program saves the report file in the same directory as the cmdbdiag program.

To delete instances for a given class

Use this procedure to delete instances of a class altogether to clean up data. When you delete instances of a given class, the orphaned weak relationship is also deleted to maintain data integrity.

  1. Start the cmdbdiag program.
    For information about starting the cmdbdiag program, see Verifying your data model.
  2. At the CI and Relationship Correction Tool submenu prompt, type 6.
  3. At the All datasets [y, n] prompt, perform the appropriate action:
    • To delete instance for a class in all datasets, type y.
    • To delete instance for a class in a specific dataset, press Enter and provide a dataset ID.
  4. Enter the namespace name of the class for which you want to delete all instances.
  5. Enter the class name to which the instances that you want to delete belong.
  6. At the Do you want to continue prompt, type y to delete all instances of the specified class.
    If you type n at the prompt, the CI and Relationship Correction Tool sub-menu is displayed. 
  7. Select the orphaned weak member and select Fix or Delete the weak member.

  8. Select the orphaned weak relations and select Fix or Delete the weak relationship.

To correct orphaned weak members

A weak member of a weak relationship is orphaned when you delete a strong member and leave the weak member of the composite relationship, pointing to a nonexistent CI instance. 

You can correct an orphaned weak member of a weak relationship by setting NULL values for the attributes that are propagated from the strong member. When you correct a weak member, it remains in the BMC CMDB as an independent CI instance with no relationships. 

If you correct orphaned weak relationships for all datasets, attributes of orphaned instances of all classes are set to NULL.

If you correct orphaned weak relationships of a specific class in any dataset, only the instances of that specific class are corrected.

  1. Start the cmdbdiag program.
    For information about starting the cmdbdiag program, see Verifying your data model.
  2. Log on to the Remedy Action Request System server and at the main menu prompt, type 2.
  3. At the CI and Relationship Correction Tool submenu prompt, type 7.
  4. At the Fixing Orphaned Weak Members menu, type 1 to correct orphaned weak members in all datasets. If you want to correct orphaned weak relationship members for a specific class, skip to step 5.
    1. At the All datasets [y, n] prompt, type y to correct orphaned weak members in all datasets.
    2. At the Do you want to continue prompt, type y.
    3. To correct orphaned weak members in a specific dataset, press Enter and provide a dataset ID.
  5. At the Fixing Orphaned Weak Members menu, type 2 to correct orphaned weak members for a specific class.
    1. At the All datasets [y, n] prompt, type y to correct orphaned weak members in all datasets.
    2. To correct orphaned weak members in a specific dataset, press Enter and provide a dataset ID.
    3. Enter the namespace name of the class for which you want to correct all orphaned weak members.
    4. Enter the class name to which the orphaned weak members that you want to correct belong.

To delete orphaned weak members

Use this procedure to delete an orphaned weak member of a weak relationship. A weak member of a relationship is orphaned when you delete a strong member and leave the weak member of the composite relationship pointing to a nonexistent CI instance.

  1. Start the cmdbdiag program.
    For information about starting the cmdbdiag program, see Verifying your data model.
  2. Log on to the Remedy Action Request System server and at the main menu prompt, type 2.
  3. At the CI and Relationship Correction Tool submenu prompt, type 8.
  4. At the Deleting Orphaned Weak Members menu, type 1 to delete orphaned weak members in all datasets. If you want to delete orphaned weak relationship members for a specific class, skip to step 5.
    1. At the All datasets [y n] prompt, type y to delete orphaned weak members in all datasets.
    2. At the Do you want to continue prompt, type y.
    3. To delete orphaned weak members in a specific dataset, press Enter and provide a dataset ID.
  5. At the Deleting Orphaned Weak Members menu, type 2 to delete orphaned weak members for a specific class.
    1. At the All datasets [y, n] prompt, type y to delete orphaned weak members in all datasets.
    2. To delete orphaned weak members in a specific dataset, press Enter and provide a dataset ID.
    3. Enter the namespace name of the class for which you want to delete all orphaned weak members.
    4. Enter the class name to which the orphaned weak members that you want to delete belong.


Was this page helpful? Yes No Submitting... Thank you

Comments