Archiving Data In ServiceNow - What tables to archive and what tables to leave alone?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2023 02:39 PM
Hello community,
Our organization has started the discussion on data archiving in ServiceNow. I would like to better understand what tables should and should not be archived. I know we can certainly archive task based tables (incident, work orders, change, RITMs, catalog tasks, etc.). We also have a lot of inactive users in our [sys_user] table and some are wondering if those accounts should be archived. My first thought is that the caller field, opened by fields referencing the sys_user table on tasks will then be empty on those tasks, leaving the tasks sort of orphaned.
I suppose we could have an archive rule that archives the tasks based on set conditions and the referenced caller/opened by if they are inactive? Sort of like a parent/child on Archive Rules but not necessarily just go an archive all inactive users.
Thoughts on this? What would be tables to avoid archiving and why? What are the tables we should be focusing on to archive for better performance?
Thank you!
Yen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2023 02:58 PM
Hi there,
In our org we have begin with below tables -
Audit log tables: These tables can become very large over time, and archiving them can free up space in the database.
Attachment tables: These tables can also become very large over time, and archiving them can free up space in the database.
Please mark this response as correct and/or helpful if it assisted you with your question.
Regards,
Tushar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 07:38 AM
Thank you Tushar! Yes, those tables can get very large quickly. I think a good approach would be to set Parent/Child Archive Rules. For example, Set to Archive Incidents created in the last year and as the parent for the sys_audit table for the incidents found.... not sure how that would end up looking but I am curious if you have a similar set up? Or Archiving incidents automatically archives the sys_audit for it?
Thank you,
Yen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 08:13 AM
Hi there,
I believe in ServiceNow, archiving an incident record does not automatically archive the sys_audit records associated with it. The archiving process is not cascading by default, meaning that archiving a parent record (e.g., incident) does not trigger the automatic archiving of its related child records (e.g., sys_audit records).
I guess if we archive an incident, the corresponding sys_audit records that contain the audit history for that incident are not archived automatically. This is because ServiceNow provides a separate archiving mechanism for sys_audit records, and it's not directly tied to the archiving of other tables like incidents.
Please mark this response as correct and/or helpful if it assisted you with your question.
Regards,
Tushar