"Service Portal Log Entry" only keeps 90 days of data ?

Gwen Vanderhaeg
Kilo Expert

Hi,

I've noticed in my reports with regards to the Service Portal that sp_log only keeps 90 days of data.
Can anyone point me in the direction of where I can change the retention time of this data?

Thanks!

Gwen

1 ACCEPTED SOLUTION

Justin Abbott
Giga Guru

This is a shot in the dark here, but I wonder if you could create a Table Rotation for the sp_log table, similar to syslog.



Apply table rotation


View solution in original post

4 REPLIES 4

Justin Abbott
Giga Guru

This is a shot in the dark here, but I wonder if you could create a Table Rotation for the sp_log table, similar to syslog.



Apply table rotation


Justin,



FYI I contacted Hi Support and they gave the same suggestion so... that's what I did and it works fine.


I did ask the support guy to report that 90 days for the sp_log is simply not long enough...
I'm sure i'm not the only person who thinks this way So they should either set up the rotation by default or extend the 90 days imo.



Anyway thanks for your answer!



Gwen


michaelj_sherid
ServiceNow Employee
ServiceNow Employee

The 90 days is the OOB default. There is a Hi KB published for this- KB0686829.

 

Although this is not recommended due to the increasing record counts, there is an option to adjust the value (purging).

 

1. Days are stored in seconds so determine the number of seconds in the number of days you want to use.
The OOB value of 90 days is 7,776,000 secs.


2. Navigate to System Maintenance > Table Cleanup.


3. Search for a rule with the tablename sp_log and open the record.


4. Change Age in seconds to the desired value ( 31536000 - 365 days in seconds).


5. Save/submit the record.

 

Mike

 

I'm not able to find System Maintenance in the app nav, or Table Cleanup other than that under ATF; is creating a Table Rotation the only way to do this now?

Edit: found it by going to sys_auto_flush.list