Too Many Records? Let's Clean Them Up with Data Archiving!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
18 hours ago
If you find this content helpful, please upvote, thank you.
Imagine you're someone like me who takes 100 photos just to choose 5 for Instagram.
Now, I don't want to delete the remaining 95 because they're still memories I might want to look back on someday. But if I keep doing this after every trip, birthday, or outing, eventually my phone storage is going to blow up. So what do I do?
I move those old photos to my hard drive. They're no longer taking up space on my phone, but they're still safe and can be accessed whenever I need them.
That's exactly the idea behind Data Archiving in ServiceNow.
This is something I recently learned and wanted to share with a simple, practical example because I think that's what helps the most. Think about tables like Incident flooded with records, so many business records, or the main culprit... System Logs!
OMG! In my project, we have both system logs and integration logs, and every single day I see lakhs of records getting generated.
Now suppose I have to search for something specific in that table... imagine how long it takes to load! Sometimes the system becomes slow, hangs, or even throws those 30-second transaction timeout errors. I'm sure most of us have experienced this at least once.
That's exactly where Data Archiving comes into the picture.
The demo we're going to look at today is very simple and straightforward. In this example, we're going to archive Incident records that were last updated 1 year ago.
Step 0: Find the records to archive
Go to the Incident table and filter for records that were Updated = One year ago. Note down the count of records. We'll compare this count again after archiving. (Refer Screenshot 1)
Step 1: Create an Archive Rule
Navigate to All > Archive Rules under System Archiving.
Note: I'm using the Australia release on my PDI, so everything shown here is OOTB.
Create a new Archive Rule. (Refer Screenshot 2)
Step 2: Configure the Archive Rule
Fill in the details as shown in Screenshot 3.
The Condition field defines which records should be archived. In our case, we're archiving Incident records that were updated one year ago. You can leave the remaining fields as they are for now. We can always configure them later based on business requirements. (Refer Screenshot 3)
Step 3: Estimate the records
Save the record, check the Active checkbox, and update the record. Now click Recalculate Archive Estimate related link. This calculates how many Incident records match the condition you configured. (Refer Screenshot 4)
Step 4: Run the Archive
Once the estimate is completed, click the Run Archive related link to test your archive rule. After the run completes, you can verify the Archive Run related list at the bottom of the form. (Refer Screenshots 5 & 6)
Step 5: Verify the Incident table
Now go back to the Incident list and apply the same filter: Updated = One year ago. You'll notice that the record count is now 0 because those records have been archived. (Refer Screenshot 7)
Step 6: Now comes the interesting part!
So... where did those records go? Don't worry, they weren't deleted. ServiceNow creates an archive table for the table you archived. The naming convention is : ar_<table_name>
Since we archived the Incident table, the archive table created is : ar_incident
Just search for : ar_incident.LIST
and you'll find all the records that were archived by your rule. In my case, I can see all 50 Incident records safely stored there. (Refer Screenshot 😎
And that's it! This is just a basic, practical example of Data Archiving. Think of it as your first step into understanding how it works. From here, you can always customize your archive rules based on your own business requirements.
Also, remember that Data Archiving isn't the only way to manage large amounts of data in ServiceNow. Depending on the type of data you're dealing with, ServiceNow provides different approaches like Data Archiving, Table Rotation, Table Extension, and Table Cleaner.
For example:
• Business records like Incidents are a great fit for Data Archiving..
• High-volume tables like logs are commonly managed using Table Rotation or Extention.
• Temporary or staging tables can be cleaned up using Table Cleaner..
The whole idea is the same: keep your live tables clean, improve performance, reduce clutter, and still manage your historical data in the right way. Not every table needs the same approach—that's where understanding these different strategies becomes really useful.
I'd love to know how you're using Data Archiving in your projects!
Have you implemented it already? Or do you have another use case in mind where you think it would be helpful? Share your experiences in the replies—I'd love to learn from them too.
And as always, if there's any ServiceNow topic you'd like me to explore next, feel free to mention it in the comments. I'll be happy to cover it in a future post.