- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2019 06:15 AM
Hello All,
We are in process of Retiring 10,000+ records in Net gear (cmdb_ci_ip_switch) and also delete all relationships if the CI name is matching as parent or child.
Any inputs with best practices if anyone worked on similar case to the above process.
Thanks,
Reddy
Solved! Go to Solution.
- Labels:
-
Discovery

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2019 06:48 AM
Hi there,
Can you filter the records you are after? Through a list, for both cmdb_ci_ip_switch as you relationship records? If so you could easily copy the query, and use it in GlideRecord queries through fix script for example. If possible, try to use updateMultiple() and deleteMultiple().
Though like Andrew already mentioned, test this first, on your dev/test environment, with small subsets of your data (for example using setLimit).
Maybe this article is helpful already:
Utilizing the breadcrumb on lists to generate your query
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2019 06:37 AM
Greetings Reddy,
When undertaking such a large change, certainly test your changes in a sub-production instance. You will need to decide if you need to run workflows or not as part of the delete. For performing the action, I would suggest a on demand flow or fix script depending on your comfort of scripting. Test and log twice, run once 😄
-Andrew Barnes
Join me at Developer Blog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2019 06:48 AM
Hi there,
Can you filter the records you are after? Through a list, for both cmdb_ci_ip_switch as you relationship records? If so you could easily copy the query, and use it in GlideRecord queries through fix script for example. If possible, try to use updateMultiple() and deleteMultiple().
Though like Andrew already mentioned, test this first, on your dev/test environment, with small subsets of your data (for example using setLimit).
Maybe this article is helpful already:
Utilizing the breadcrumb on lists to generate your query
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2019 11:34 PM
Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2019 10:10 AM
Hi,
We have done something similar in past.
Few important tips: We also Check if there are any incident's, change attached to the CI's which you are deleting. We exported the whole table in excel before deleting it. If you use discovery then it will be discovered again. So make sure you want them to be discovered again or not. If you are retiring those then do that first on network and then do that in servicenow.(Only is Discovery is used.)
We created a script to delete this CI and we don't delete the CI if any incident or change is open.
Thanks,
Ashutosh