Cleanup of sys_audit table

J Benson
Tera Contributor

Hello Experts, 

 

We recently discovered one of our tables (sys_object_source) is contributing in large part to the ballooning of our sys_audit table. We were able to determine that this audit practice is not needed and have added the necessary attribute to halt further auditing, but it leaves us with nearly seven million unneeded records on the sys_audit table from sys_object_source.

 

Does anyone have any experience cleaning this table up? I saw Table Cleaner was a potential option, but I'm not sure of its viability given the number records we need purged.

 

Thanks in advance,

James

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

7 million is not so much, for bigger/older customers unmanaged the sys_audit runs into billions of records 😁
Though good one that you spotted it, stopped the creation of unnecessary sys_audit for this one, and are going to clean it up.

To start, Table Cleaner: definitely NO. Table Cleaner is not for a one-time deletion. Table Cleaner is for maintaining. Initial large cleanups are usually also not the way to go with Table Cleaner, though 7 million is not that much.

 

ServiceNow Support did publish a article on this, though a bit outdated and since its only 7 million records... you could go for out-of-the-box no-code solution "Delete Jobs" (System Data Management > Delete Jobs).

 

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

5 REPLIES 5

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @J Benson ,

 

 

 

Follow this, and all associated article on this topic by @Mark Roethof :

 

https://www.servicenow.com/community/now-platform-blog/keeping-your-instance-database-footprint-tidy...

 

I hope this helps...


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

Sumanth16
Kilo Patron

Hi @J Benson ,

 

Please refer to below thread;

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0724183

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

7 million is not so much, for bigger/older customers unmanaged the sys_audit runs into billions of records 😁
Though good one that you spotted it, stopped the creation of unnecessary sys_audit for this one, and are going to clean it up.

To start, Table Cleaner: definitely NO. Table Cleaner is not for a one-time deletion. Table Cleaner is for maintaining. Initial large cleanups are usually also not the way to go with Table Cleaner, though 7 million is not that much.

 

ServiceNow Support did publish a article on this, though a bit outdated and since its only 7 million records... you could go for out-of-the-box no-code solution "Delete Jobs" (System Data Management > Delete Jobs).

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Mark,

 

Thank you for the recommendation. I was successful in my development instance in removing the offending records. However, I can't find much documentation on System Data Management for the Vancouver release. On my instance, there's a 'Run Business Rules and Engines' option available when creating a new job. For the life of me, I can't find any ServiceNow documentation that explains this option. Any clue?

 

Thanks!

James