- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 04:04 AM
Given a GlideRecord for a particular CI how does one find all the related CIs? For example, a search has returned me a GlideRecord for a cmdb_ci_network_adapter or cmdb_ci_ip_address entry and I want to find the Computer class it is related to. I am probably being dense, but it doesn't seem obvious to me.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 05:15 AM
The table that contains the CMDB CI relationships is called cmdb_rel_ci. It will give you a parent and a child to tell you whether the CI is a parent of another (e.g. a server to an app) or the child (e.g. database to an app). If you need to find out a top level service or if another CI is part of the relationship hierarchy then you will need to do a little more gliderecord query through the cmdb_rel_ci table to find what you are looking for. This may involve recursion which is a bit of a more advanced scripting topic.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 05:15 AM
The table that contains the CMDB CI relationships is called cmdb_rel_ci. It will give you a parent and a child to tell you whether the CI is a parent of another (e.g. a server to an app) or the child (e.g. database to an app). If you need to find out a top level service or if another CI is part of the relationship hierarchy then you will need to do a little more gliderecord query through the cmdb_rel_ci table to find what you are looking for. This may involve recursion which is a bit of a more advanced scripting topic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2021 11:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 09:39 AM
Did you find an answer to your question? I am trying to do query something similiar.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 05:15 AM
All CI relationships are stored in "cmdb_rel_ci" table. You can query this to get information about relationships.