Watermark table - should old records be deleted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday - last edited Wednesday
The sys_watermark table on our production instance contains over 13 million records, some records are over 15 years old. I want to create a data cleanup rule to delete watermark records more than 5 years old .
I reckon that deleting old watermark records would make lookups on the table faster. Is there any good reason not to delete old watermark records?
Update:
I've created both table cleanup (sys_auto_flush) and data management (sys_dm_policy) to delete records from sys_watermark. Neither worked. It appears that only users with the maint role can delete sys_watermark records.
I could try creating an access rule that enables users with the admin role to delete sys_watermark records, but am not sure whether that is advisable.
Therefore my revised question is:
Has anyone managed to mass delete old sys_watermark record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hi @Colleen ,
you can delete them
setup a table cleaner to delete the records where email value is empty.
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hello Chaltanya
Have you set up a data cleanup job on sys_watermark?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
The quickest and easiest way to clean up data in bulk is Table Cleaner. You do this by creating a record in the Auto Flush Table [sys_auto_flush], similar to this:
As for your second question, it depends on the audit policy of your company. Do you need to keep track of emails sent back/forth between the user and the instance, and the record they are related to? By deleting the watermark record, the relationship between emails and the related record will be gone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Regarding your first question, you can use the Table Cleaner feature in ServiceNow. This is done by creating a record in the Auto Flush [sys_auto_flush] table, it could look similar to this:
As for your second question, that depends on the audit policy of your company. Do you need to keep track of all email exchanges between ServiceNow and the users? Watermarks in the sys_watermark table are crucial for associating replies to tasks - by deleting them, you will be removing the reference email <- -> record.
