The Data Management application keeps table growth under control on a ServiceNow instance. It gives administrators a console for storage use, policies that hold archive and cleanup rules, and restore tools for archived records. Access is split across several roles, so the people who review growth are often different from the people who change the rules.
What the application handles
Tables such as incidents, tasks, attachments and audit records grow until queries slow down and storage costs climb. The application offers three levers: measure consumption, move older records into archive tables, and delete records that no longer serve a purpose. Archiving and deleting are configured as rules, and those rules sit inside a data management policy attached to one table.
Roles that control each part
Access works in layers. Restore is an admin task, and the role needed to view the console overview should be confirmed on your release. A granular role, data_mgmt_tools_admin, gives targeted permissions, so an organization can avoid full admin access for people working in this area.
The granular role does not cover the whole job alone. Its additional roles must be assigned explicitly, because they are not bundled into it by default. For table work, add the roles that provide create, read, update and delete access to the data involved. For ITIL tables, itil and itil_admin are the examples given. Without the supporting roles, some or all data management functions are limited or unavailable.
| Task | Role to check | What to watch for |
|---|---|---|
| Open the console and read the overview | Admin | Storage figures stay out of reach without it |
| Use the granular data management tools | data_mgmt_tools_admin plus the extra roles it does not include | The granular role alone leaves tasks incomplete |
| Archive or update records in a table | Table CRUD roles, such as itil_admin for ITIL tables | Missing table roles leave some or all data management functions limited or unavailable. |
| Restore archived records | Admin | Restore is an admin-level action |
Reading storage use before changing anything
The overview shows total primary storage and how that figure has moved over time. Figures can lag, because storage reductions may not show until the system finishes synchronizing. Record a baseline before a cleanup and check the trend after the next cycle rather than the same afternoon.
The trend view tracks the top ten tables by storage, weekly or monthly. The growth list needs the closest reading. It shows tables with a table size column, an associated record size column and a Growth (30 days) column, which tracks growth over the last thirty days. A table growing faster than expected is the signal to add a cleanup or archive rule.
Associated record size is the column that catches many readers out. A driver table is one whose records create related data, such as attachments, audit records and journal entries. The fix then belongs in the driver table, where an archive or cleanup rule reduces what the associated tables collect. Audit growth is managed separately, through the audit management console and its Manage audit config option.
Policies, archive rules and table cleaners
A data management policy holds all the rules for one table. You reach policies at All, then System Data Management, then Data Management Policies. Since the Xanadu release, an upgrade creates a policy for any table that already has an archive or table cleaner rule.
One policy can hold several archive rules and several table cleaner rules, and all of them can be activated or deactivated from that record. Two kinds of rule do the work. An archive rule moves records into an archive table and can bring along records in other tables that refer to them. A table cleanup rule deletes older or unwanted records automatically.
Archive rules run through a system-scheduled job, which in Core UI repeats on a 60-minute interval. To stop a rule, clear its Active check box; chunks still waiting are marked as not needed. Deleting the rule is a separate step that requires contacting Customer Service and Support, so deactivation is the reversible first move.
Activation also changes the data. The system creates an archive table with the primary table’s name and an ar_ prefix, so the incident table gets an ar_incident counterpart. It flattens joined tables and converts reference values into display-value strings. If a user is renamed after archiving, active incidents show the new name while archived incidents keep the old one. For the query side of archiving on a slow instance, the archiving and table cleaner guide covers the reasons to act.
Querying archived data
A live table stores each record as a row and keeps its relationships to other tables. An archived copy is a flat file with no reference fields to other tables. To edit an archived record, restore it first, because a restore returns the record to the primary table and removes its archive copy.
Reference fields hold display values in the archive by default. With Retain references enabled on the archive rule, the sys_id is kept instead of the display name, and the check box becomes read only once the rule is saved. Because the archive keeps the display value as it stood at archive time, a report that combines live and archived rows may show different values for the same field, so check that both sides show the same form before comparing them.
Archive tables index the display value, the creation date and the sys_id, so search by record number or creation date. Access follows the live table’s rules by default. Setting the glide.security.enable_archive_table_acls property to true lets archive-specific rules take over, and once those exist the system does not fall back to live-table rules when they deny a request. Test that change with a non-admin account first, because it can alter who sees archived data.
Restoring archived records
Restoring returns records to the primary table and removes them from the archive. The first route runs through the Data Management Console. Open the Tables tab, find a table showing Archive in its Status column, select View records, then choose the records and either select the Restore All Records Matching Conditions related link or open the Actions on selected rows drop-down and select Restore Selected.
The second route runs through the Archive Log, reached from the policy’s archive run or from the Archive Log module. It offers Restore Record and Restore Record and Related Records. Use the second when child records should come back too.
Do not delete archive log entries. Deleting one prevents restoring that archived data through the archive log.
Database rotation for high-volume system tables
Some system tables grow too quickly for a standard cleanup schedule. Database rotation splits their data across separate tables using three techniques. Table rotation cycles through a small set of tables, deleting and reusing the old ones. Table extension starts a new table on a schedule, so older tables can be archived and removed. Table sharding groups records into one table by document ID.
Table rotation covers syslog, sys_querystat, ecc_queue, ecc_event, cmdb_metric and sysevent. Table extension covers sys_email. Table rotation deletes and reuses its oldest tables, so confirm retention with the data owner first.
The governance work behind the tooling
Tools do not decide what the business keeps. Governance decisions come first, because the console and policies enforce what has been decided. Settle them for each table in scope before creating a rule.
Before writing any policy, write down what the data is for, which reports and processes depend on each table, and where its records come from. Those answers make archive and cleanup decisions easier to defend later. Keep scope clear too: deciding retention and configuring rules or fixing integrations are separate work items, so give each one its own named owner.
A first-pass sequence for administrators
- Confirm the role set for everyone involved, including table-level CRUD roles for each table in scope.
- Record the primary storage figure, the ten largest tables and the tables that grew over thirty days.
- For each large table, check the associated record size and identify its driver table.
- Agree the retention decision with the data owner and record it before creating any rule.
- Add the archive or cleanup rule to the table’s policy, monitor rule activity, and rehearse a restore on a few records.
Frequently asked questions
Which role do I need to open the Data Management Console?
The role needed to view the overview should be confirmed on your release. The granular data_mgmt_tools_admin role does not provide full functionality alone, so the additional and table-level CRUD roles also need assigning.
Can I edit an archived record?
Restore it to the live table first. A restore returns the record to the primary table and removes its archive copy, after which it can be edited.
Can I stop an archive rule without deleting it?
Yes. Clear the Active check box on the rule. Deleting it requires contacting Customer Service and Support, so deactivation is the step to take first.
What is a driver table?
A driver table is one whose records create related data, such as attachments, audit records and journal entries. The fix for large associated records belongs in the driver table, where an archive or cleanup rule reduces what those tables collect.