Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Knowledge Base View log data retention

Akshay Kumar3
Tera Contributor

I need to have the retention policy for records in the Knowledge Use [kb_use] table set to [time period] so the number of records in the table stay manageable.

Acceptance criteria is like there are records in the [kb_use] table exactly [time period] old, when the system is left for 24 hours those records are automatically deleted from the table.

So is this something out of the box or we need to customize this?

1 REPLY 1

sachinvic
Giga Guru

@Akshay Kumar3 

Hi,

This is available OOTB; you don't need to build a custom scheduled job.

  1. Navigate to All >>System Maintenance >>Table Cleanup (in some releases, this appears under Instance Scan).

  2. Search for the kb_use table and open its Auto Flush configuration.

  3. Enable the cleanup job and set Age in seconds to your required retention period.

  4. Save the configuration and verify the cleanup behavior.

By default, the retention is set to 365 days. The cleanup job must be activated for older records to be deleted automatically.

 

Modify the data retention policy for View logs

https://www.servicenow.com/docs/r/servicenow-platform/knowledge-management/auto-flush-kb-use.html

 

Helpful? Please mark the response as Accepted Solution ✅ and close the thread — this helps future readers find the solution faster.


Regards,
Sachinvic
✨ ArchX Certified | ✨ 16x ServiceNow AI MVP