Highlighted
Frequent Contributor.
Frequent Contributor.
583 views

Link between Node and business application in HP UCMDB Database

Hi All,

 

I am trying to extract all the computers that are having the business applications from the UCMDB Database. I am not able to identify any common link between these two tables. Can any one guide me how to join these two tables in HP UCMDB?. Thanks for your help and assistance on this one. Really appericiated.

Regards,

Krithik

0 Likes
4 Replies
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Link between Node and business application in HP UCMDB Database

Relationships are stored in the Link table, using the CMDB ID for the "ends" (end1 = parent, end2 = child).

Basic overview query:

SELECT 
	 l.[A_ROOT_CLASS]
	,l.[END1_ID]
      	,l.[END2_ID]
	,r.A_ROOT_CLASS
	,rc.A_ROOT_CLASS
  FROM [ucmdb].[dbo].[LINK_1] l
  join [ucmdb].[dbo].[ROOT_1] r
  on l.END1_ID = r.CMDB_ID
  join [ucmdb].[dbo].[ROOT_1] rc
  on l.END2_ID = rc.CMDB_ID

 

 

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: Link between Node and business application in HP UCMDB Database

Thank you very much for your response. Could you please let me know how to join between computer and VMWARE ESX Server in sql query?.  This would be really helpful for my needs.

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: Link between Node and business application in HP UCMDB Database

Hi,

I think it will be helpful -

    inner join dbo.EXECUTION_ENVIRONMENT_1 ex1
        inner join dbo.HYPERVISOR_1 h1
            inner JOIN dbo.VMWARE_ESX_SERVER_1 vmware1
            on h1.A_ROOT_CONTAINER = CAST('' AS XML).value('xs:hexBinary(sql:column("vmware1.CMDB_ID"))', 'VARCHAR(MAX)')
        on h1.CMDB_ID = ex1.END1_ID
    on n3.CMDB_ID  = ex1.END2_ID

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: Link between Node and business application in HP UCMDB Database

Hi ,

Thanks in adavance.

I tried to run this in oracle db

 inner join dbo.EXECUTION_ENVIRONMENT_1 ex1
        inner join dbo.HYPERVISOR_1 h1
            inner JOIN dbo.VMWARE_ESX_SERVER_1 vmware1
            on h1.A_ROOT_CONTAINER = CAST('' AS XML).value('xs:hexBinary(sql:column("vmware1.CMDB_ID"))', 'VARCHAR(MAX)')
        on h1.CMDB_ID = ex1.END1_ID
    on n3.CMDB_ID  = ex1.END2_ID

I  was not able to run due to errors.

 

could you please share me the quey  suppoted by oracle.

 

Thanks

Sunil

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.