How can we report on cmdb_items that have no relationship to other cmdb_items?

veerlerutten
Kilo Explorer

How can we report on cmdb_items that have no relationship to other cmdb_items?

12 REPLIES 12

find_real_file.png



We have around 17000 CI relationship records & over 200K CI's. But when I 'Try It' from the DB view, the browser just stops processing.


Community Alums
Not applicable

What is your Where clause? And because you are looking to report on CIs without relationships here, you will need a left join. Do you have this configured? What you will actually get as a result here is all CIs and relationships. With the left join, it will add the CIs that do not have relationships to the list, and then you can filter for those with no relationship.


It's in the screenshot.



On 28 Aug. 2017 9:05 pm, "bsweetser" <community-no-reply@servicenow.com>


Community Alums
Not applicable

Oops! Sorry... I didn't realize it scrolled sideways. It was cut off in my view...



I tried to replicate, but it is working. Nearest I can figure here is that the numbers are causing some churning here. Could you try limiting to a specific class of CI first to see if that is working for you? The reason is you're going to get some interesting things by doing all CIs, such as all Network Adapters. Because these are related to a hardware CI via a field rather than through the CMDB Relationship table, you will get them on your list here, but they are not meaningful to your purpose...


Tried doing it for Application class (cmdb_ci_appl) and the report executed without any issues. So do I need to create class-specific DB views for seeing all the CIs without any relationships? As the DB view defined on cmdb_ci table wouldn't run..