I want to fetch all the records from the cmdb_ci table with a certain hostname but host_name column is not a part of the cmdb_ci table. So, is their any way we could do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2018 03:17 AM
I'm trying to get all the record with a specific hostname but as the host_name column is not part of the cmdb_ci table. So is there any way I could get all the record from various table extending cmdb_ci table through script.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2018 03:20 AM
Hi Manish,
You can try with CI name ,most of the times the CI name will be hostname.
Thanks
Trinadh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2018 03:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2018 01:41 PM
If you are on Jakarta you will have a new hierarchy for cmdb_ci tables. The host_name column will not exist on the base table and is added to a partition table which is comprised of a child table which has the column. So, in other words, cmdb_ci_server has a host_name column physically and cmdb_ci_software_application will not have a host name as the column is not relevant. You must identify which ci tables have the host name column via sys_db_object or sys_dictionary and query them independently.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2018 01:52 PM
Since the host_name is defined on the cmdb_ci_server table, that would be the "best you can do", at first glance.
See Schema Map below. But I suspect that what you really want is to see all the CI's which have a relationship with a given host.
So I recommend that you look at the cmdb_rel_ci table. It maintains relationships between all type so of CI's.
Here are some links to look over:
-- SCHEMA MAP FOR CMDB_CI_SERVER: