Can we have same CI names belonging to 2 different classes in CMDB? If yes, then how do we perform relationship data load into system?

iadityas
Mega Expert

Can we have same CI names belonging to 2 different classes in CMDB? If yes, then how do we perform relationship data load into system?

18 REPLIES 18

Chuck Tomasi
Tera Patron

Hi Aditya,



Yes, you can have the same CI name in two different classes. When you import, look at coalescing on different key factors such as asset tag, serial number, MAC address, etc. Those are typically unique among different classes whereas the name could be the same.



Using the Coalesce Field - ServiceNow Wiki


Hi Chuck,



Thank you for your response!! BTW, I like all of your TechNow webinars delivered with great passion 🙂



To elaborate my concern, say for example: I have a CI names ABC both in Class A and Class B. No trouble loading those CIs having same names.How can I now import data for relationship in cmdb_rel_ci table for these 2 CIs. When I try to do this I get an error:


The recursive relationship ' <Relationship Type> ' is not allowed and has not been established


Please let me know. Thank You!



Regards,


Aditya


I would need more information how you are creating the relationship information. E.g. how are records being loaded in to cmdb_rel_ci?


Sure Chuck!



So as of now I have 1 record in Class A with Name = ABC and another 1 record in Class B with Name = ABC.


Now I go to cmdb_rel_ci table - Give Parent ABC and Child ABC (both ABC without selecting from dropdown) with Relationships Type Connects To::Connected By. It gives me an error as given before.



Even tried Parent.Name = ABC and Child.Name = ABC with Relationships Type Connects To::Connected By. It gives me an error as given before.



If you got a better way (best practice/standard) to load CI-CI Relationships - please let me know. Thank You!



Regards,


Aditya