Hi Brian,
SOI manager always deletes the relationship when you remove a CI from a service. I am not sure how did you determined the relationships are left behind but here is a method you can use to find out if there are any stale relationship, in this example I am using a computer system CI
- When you add a CI to a service there are multiple entries created in ca_ssa_binaryrelationship and CIRelationship tables.
- The following SQL query will show you how many projections you have for one CI. Note down the c_mdrelementid for each of the projection. Normally you'll get two projection (CA:00030 and a projection from the connector, such as CA:00005), if the CI is added to a service than a new projection CA:00047 is created
select * from ca_ssa_computersystem where c_label='<label of the CI>'
- Running the following SQL query will show you the relationship entries in the ca_ssa_binaryrelationship
select * from ca_ssa_binaryrelationship where c_mdrlementid LIKE '%<mdrelementid you have written down from above query>%'
- Running the following SQL query will show you the relationship in the CIRelationship table
select * from CIRelationship where BNodeCIID='<the CIID if the CI>'
- if you run the following SQL query it'll show you any CI having relationship to a service
select * from CIRelationship where ServiceCIID='<service CIID>'
Note: Service and CI CIID can be found on the SOI Properties tab on the console. You can also find it in CI table.
Thanks
Shaheen