Remove mass CI

ayush_g
Tera Contributor

I need to delete all CIs items that is more than crores from specific one Unique certificate class

8 REPLIES 8

Ravi Chandra_K
Kilo Patron
Kilo Patron

Hello @ayush_g 

You can go to Delete Jobs under Delete management and define your criteria.

Since it involves huge data, you can schedule it non peak hours.

Please refer:

https://www.servicenow.com/community/developer-forum/how-does-delete-job-works-in-the-background/m-p...

Please mark the answer as helpful and correct if helped. 

Kind Regards,

Ravi Chandra  

@Ravi Chandra_K  Thanks for the Suggetions i really appreciate it but list count is around 1.5 Lacs so i am in doubt if it can hamper the performance issue of application Loading

Sandeep90
ServiceNow Employee
ServiceNow Employee

@ayush_g  Use table cleaner to delete the records, it will handle all the resources efficiently and delete them. 

Marshall Parker
Tera Guru

As others have said, you have a couple of options in how to address bulk deletion. Depending on the scenario, you can determine the best option for each use case you run across.

 

First - Delete Jobs (SN Docs) - Useful for bulk deletion of a criteria of records. Takes a backup of the records to delete first (so you can rollback but does not impact database size as much as you may expect). Does lock the table so any updates/inserts to the table are stopped during the timeframe of the deletion. Not the most efficient if you want to delete all records in the table.

 

Second - Table Cleaner (SN Docs) - Allows for creating multiple rules to cleanup unwanted or expired records from SN. The scheduled job runs often and each time loops through each rule looking for records to delete - which may take a long time but will eventually purge through the records you indicate. There are some specific limitations called out in the documentation.

 

Third - CMDB Data Manager (SN Docs) - especially since this is in the CMDB forum, would encourage you to look into the CMDB Data Manager as it has robust deletion strategies specific for the CMDB as well as Archive, Retire and other rules you should become familiar with.