Database View to show server

Pallavi65
Tera Contributor

Hello all,

In the CMDB, there are two classes, Database and Instance.

In the relationships table, Database is related to Instance (Database is parent and Instance is child) and then Instance is related to Server(Instance is parent and server is child).

So, there is no direct relation between Database and Server(It will be L2 relation).

Please note that there is a field on Instance class called "Virtual Machine Name" that holds the server.  So, want to pull an Excel report that shows Database, Instance, Server.

 

For this, I am trying to create a Database View but am getting error.

Where clause in view u_database_instance_server has an invalid field or a field that is not visible (rel_parent_sys_id)

 

and the Database view I created is: 

 

Please help.

 

Regards,

Pallavi

 

4 REPLIES 4

Brad Bowman
Kilo Patron
Kilo Patron

Hi Pallavi,

On the cmdb_rel_ci table, there are fields named parent and child which are reference so they contain sys_ids - so you would just use rel_parent and rel_child.

Hi Brad,

 

THanks for your response. But when I click on try it and trying to choose the columns for the report, I am not able to see Instance fields (mi variable prefix). Because I want to get the field from mi, where it shows the server.

 

 

Regards,

Pallavi

Hi Bowman,

 

I got it. Now it's working.

 

Thanks for your time

 

Regards,

pallavi

Scottster
Tera Contributor

Pallavi,

 

I have the exact same question.

How did you get it to work?

 

Thanks !!!