How can i bulk update the Status value to Retire for 10,000 + records in Net gear (cmdb_ci_ip_switch) and delete relationships of parent or child matching for the Cis?

msr2
Kilo Contributor

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

 

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

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

LinkedIn

View solution in original post

7 REPLIES 7

Hi,


Please close this thread if answered.


Thanks,
Ashutosh

DuaneNMore
Kilo Guru

Retiring and Deleting are 2 different things. We are not allowed to delete many classes of CI because of SOX compliane and related records retention policies, as such we set Operational State=Retired.

Note that out of the box behavior is to not generate tasks against CIs which are in the Retired State. 

 

msr2
Kilo Contributor

Thanks for reply.But we trying to delete related records of Ci's after its status is set to retired and not CI's.Anyway good point to note for retention policies.