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

Sanjeev Kumar1
Kilo Sage

Hi,

I have also run discovery on some server but in my case system giving me "Runs on::Runs" Relationship.

 

Thanks,

Sanjeev Kumar

 

Hi Sanjeev,

 

can I ask which is the parent in your case?

The instance or the DB?

 

Thanks.

The parent will be the DB instance which is the purpose of the Runs on relationship as it's saying that DB instance runs on the server. Honestly the relationship direction kind of messed with my mind at first too but when doing impact analysis in general it shouldn't make a big difference since most impact analysis scripts you might make will just pull from the rel table regardless of the direction.

I suspect the db relationship to the db instance is probably Contained By as well which is confusing but is basically the same principle. Are you looking at this from the user perspective or from what will get auto populated by Incident/Change/Problem?

Hi Robert,

 

The instance to server relationships is fine.

The instance to DB relations is 'contains:contains by' - with the instance as the parent.

I'm looking at this from the impact analysis of change/incident/problem.  If a CI is impacted, then the upstream CIs may also be impacted too.  

My concern is that the relationship between the instance and the DB will result in no business services (potential) impact getting picked up if a change has the instance CI.  The impact analysis scripts work on the parent CIs, reporting on the business service which could, potentially, be affected.