How can the topology type used in the user defined collection (UDC), that was deleted or dropped, so that a new user defined collection can be created with the same name?
Drop the topology type and then recreate the user-defined collection using the same name, follow the steps below:
The following script can be used to delete all SQL Server user-defined collections (steps 5-6 not needed; step 7 still required to complete removal of topology types)
def topologyService = server.get("TopologyService");
def Userdefinedcollections = #!DBSS_Custom_Query_Instance where name like 'DBSS_Cust_%'#.topologyObjects;
if ((Userdefinedcollections == null) || (Userdefinedcollections.isEmpty())) {
return "User defined collection does not exists!";
}
else {
for(item in Userdefinedcollections){
println item
item = item.getUniqueId()
item = topologyService.getObject(item);
topologyService.deleteObject(item);
}
return "Done!";
}
Note: To delete an Oracle User Defined Collection, replace the text DBSS with DBO. To delete a DB2 User Defined Collection, replace the text DBSS with DB2.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center