Under some conditions, when attempting to delete shared objects from Security Director, the objects are not deleted.
"Failed to delete <name> , because it is in use by the few object(s). To delete <name> , it cannot be in use by any other object. To view its usage, click here."
After making a change to an address object or policy using an address object, the publish job did not run completely, was interrupted, or an unrecoverable database replication error occurred.
Work-around: Run the attached script to clean up the stale references for shared objects. Contact JTAC with any questions or assistance using this script.
Before running this script, ensure all assigned services for the device have been published again. (Check Assigned, Published columns on the SD Device list.)
Download the script file CleanupStaleReferencesForSharedObjects_sh.zip .
unzip CleanupStaleReferencesForSharedObjects.zip
sh CleanupStaleReferencesForSharedObjects.sh
Related KBs: KB33777 - Device found in Security Director but not in Junos Space Platform [juniper.net] KB34766 - [Security Director] Deleted VPNs appear in publish objects in Security Director [juniper.net] KB34767 - [Security Director] Update firewall policy job failing in Security Director [juniper.net]