Discovery - SQL DB and instance relationships

thomas81
Giga Contributor

Hi,

just starting with auto discovery and have found that the SQL DB and SQL instance relations seem to be the wrong way around.

 

Auto discovery is using a 'contains::contained by' relationship, where the instance is the PARENT of the db.

This results in a relationship with SQL DB and windows servers both as children of the SQL Instance

We've always considered the relationship to be (from the bottom up);

Windows servers "HOSTS" SQL instance "contains" SQL DB "exchanges data with" Application

This way, impact analysis will show that if an update is being applied to the instance - then this may affect the DB(s) and applications, as these are upstream parents.

 

I've attached dependency image views of both.

 

Looking to get the community thoughts on this.

Thanks, Thomas

1 ACCEPTED SOLUTION

thomas81
Giga Contributor

I opened an incident with regards this and ServiceNow have come back and advised that we can fix the relationships as follows;

1. Modify the MSSql DB On Windows Pattern, Identification for MS SQL Server, step 50.7 and switch between the parent and the child tables.

2. Modify the metadata containment rule record (cmdb_ci_db_mssql_database) by checking the "Is reverse" checkbox and save the record

3 .Remove all automatically created relationships where instance contains DB, and re-run horizontal discovery on the relevant hosts.

Now, when discovery finds a windows server with a SQL instance, then relationships is;

    Server > SQL Instance > SQL DB > Bus Application (if already defined)

This ensures the impact analysis highlights any upstream bus applications if either the sever, SQL instance or SQL DB is selected as one of the Affected CIs in a change record.

Thomas

View solution in original post

7 REPLIES 7

thomas81
Giga Contributor

I opened an incident with regards this and ServiceNow have come back and advised that we can fix the relationships as follows;

1. Modify the MSSql DB On Windows Pattern, Identification for MS SQL Server, step 50.7 and switch between the parent and the child tables.

2. Modify the metadata containment rule record (cmdb_ci_db_mssql_database) by checking the "Is reverse" checkbox and save the record

3 .Remove all automatically created relationships where instance contains DB, and re-run horizontal discovery on the relevant hosts.

Now, when discovery finds a windows server with a SQL instance, then relationships is;

    Server > SQL Instance > SQL DB > Bus Application (if already defined)

This ensures the impact analysis highlights any upstream bus applications if either the sever, SQL instance or SQL DB is selected as one of the Affected CIs in a change record.

Thomas

Thanks for this. We are also encountering with the similar issue, did you get any alternative solution instead of customizing the OOB patterns?

I have the same issue all these years later - the pattern has been updated
in your step 1: "step 50.7" doesn't exist - would you be able to point me in the right direction to resolve in 2025