The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Jay Freise
ServiceNow Employee
ServiceNow Employee

Introduction

This article is for customers setting up data archiving for the first time. The goal is to provide administrators confidence in their data archival policy and strategy. As time goes by, data in your tables grows and begins to slow your queries. This results in a less-than-optimal user experience. To help keep your tables performing well, archive inactive data to reduce the active table's size. The ServiceNow documentation site has an article on Data Archiving that should provide you with relevant information data archiving. The following steps will walk you through setting up archiving for the first time.

The benefits of archiving will be to have light-weight tables to maximize performance, provide a better user experience, and help make upgrades faster. 

Step 1: Determine what tables to begin archiving

Start in a newly-cloned sub-prod instance. Ideally, you should set up an archival policy on all of your tables. The attachments, journals, and audit tables are managed separately for performance and will get cleaned up when destroy rules are run, so no need to setup archive rules for these. Some examples of tables to archive are Incident, Problem, Change, Knowledge, CMDB, Email (there is a separate plugin for email), etc. For most customers that have been using ITSM for a while, the Incident table is a good place to start because there is usually a constant stream of records being inserted. The table has most likely become large and showing signs of slowing down. Now that we've targeted the Incident table, lets move on to the next step of figuring out when we should archive a record.

Step 2: Determine when to archive a record

Using the Incident table, let's figure out your date ranges. The rule we will create will have a trigger based on a date field like Incident.Closed because we want to archive incidents closed before a certain time frame, like 350 days ago. For the Knowledge table, we might pick the Updated date field and in a Retired state to know when it can be archived.

Here are two ways to determine our total time period for Incidents.

1. Run a background script similar to this (more exact way).

Here is a script to run in Scripts - Background to tell you how long Incidents have been in the table (earliest date until most recent):

var timeEarliest;
var timeLatest;

var grIncidents = new GlideRecord('incident');
grIncidents.addNotNullQuery('closed_at');
grIncidents.orderBy('closed_at');
grIncidents.setLimit(1);
grIncidents.query();
if (grIncidents.next()){
     gs.print('Earliest date is ' + grIncidents.closed_at);
     timeEarliest = new GlideDateTime(grIncidents.closed_at);
}

var grIncidents = new GlideRecord('incident');
grIncidents.addNotNullQuery('closed_at');
grIncidents.orderByDesc('closed_at');
grIncidents.setLimit(1);
grIncidents.query();
if (grIncidents.next()){
     gs.print('Latest date is ' + grIncidents.closed_at);
     timeLatest = new GlideDateTime(grIncidents.closed_at);
}

duration= GlideDate.subtract(timeEarliest, timeLatest); 
gs.print('Total Days = ' + duration.getDayPart());

With my demo data, I get this result. I have 572 days of closed incidents.

find_real_file.png

2. Find the total time for Incidents by using the list view (quick way).

Go to the Incident list, show all records, and sort by Closed date, ascending and then descending - note the earliest closed date and latest, and do the math in your head.

Once we know how many total days our incident records have been out there, let's try a small subset of records to archive.

Create a filter to show what we want to archive. Sticking with our total days example, Expand the filter and add a condition where closed is relative, on or before a number of days (150) ago. Also make sure active = false to be very explicit. You should arrive at the exact list of what you expect to archive. If our total days is 572, then we want to archive anything older than a little less than this. If you don't see records, lower the date by a month at a time until you see some records. 

find_real_file.png

With my demo data I had to set my starting point at 150, so I want to start archiving by just trimming off a handful of the earliest incident records. I'll explain why we want to do this later. Note there are 8 records eligible to be archived in the list.

Step 3: Capture current performance metrics

Determine your current table's performance by simply opening all records, then go to Transaction Logs and find the transaction where URL starts with "/incident_list.do?". Write down the performance numbers or take a screen shot. This is your starting performance that we can compare to later transactions to see performance improvements. Tip - have two tabs open; one for the list view, one for the transaction logs. Here are some links to other performance docs.

Transaction Log timings

Analyze the slow query log

Check the client/server timings in the browser

Step 4: Create the archive rule

Note: Before turning on archiving, capture the current response times for the table (see Step 3). This will let you know how much archiving has actually helped performance!

Duplicate your tab so that you have the list view in one and the archive rule in another. In the new tab, navigate to Archive Rules and click on the existing incident table rule (there can only be one rule per table). Rename it to match what you conditions are. Set the condition to match the list view filter that you created earlier. Save the archive rule and confirm the record estimate matches the count in the list view on the other tab. Check the Active checkbox and Save. As soon as the rule becomes active, it will create an archive table and start archiving records the next time the Archive job runs. the default is every hour.

Step 5: Add a related record

Adding related records required some investigation and thought. The Attachment, Audit, and Journal tables do not need to be archived. I'm going to switch over to the Knowledge table to use as an example in this step. I created an archive rule for knowledge (no related record yet), and when I activate it, I see several "ar_" tables being created.

find_real_file.png

Why did this happen? Looking at the table schema for kb_knowledge I can see these are all extending tables. 

find_real_file.png

I also see that attachments were automatically handled and did not require me to create a related archive rule. When a record with attachments is archived, the the "Table name" and "Table sys_id" are changed in the attachment table to now point at the ar_kb_knowledge table. My example here shows the KB had four attachments. They all stay in the attachment table. When a record is restored, the pointers go back to the regular table This is automatic and is handled by the system, so no need to create a related archive rule for attachments. Nice!

find_real_file.png

But what about our related feedback records? I had two knowledge feedbacks that disappeared when I archived the article. They are orphaned when the knowledge article is archived.

find_real_file.png

I will create a rule to archive the feedback records as well.

find_real_file.png

Select the correct action. I noticed once you save the record, the Action cannot be changed! When you save this record it will populate the reference table and element automatically.

On my archive rule I clicked Run Archive Now to kick off the archiving. I saw my knowledge article go to the archive table and also all the feedback records got archived to a newly created ar_kb_feedback. If I try and pull up the original knowledge article, I see this message:

find_real_file.png

The process for restoring is to go to each record and restore them individually. This is not something you are going to want to do very often. Once the Incident has been archived, it will not longer show up on related lists for Problem, for example.

Once a record has been restored, the archiving rule won't archive it again, however, the estimate count still includes it. The restore process only restores the current record. You must manually restore any related records you want to be active again.

In Summary, we covered:

Determining what to setup archive rules on (everything, but start small)

When to archive (set a starting time frame to do a small batch)

Create the archive rule (one per table) along with an Archive Related Record that is added to the rule.

Next Steps

You may want to publish a KB article outlining your ServiceNow data archiving strategy and policy. How do users request someone (usually the admins) to do some research on an archived record and possibly unarchive it? Create a Catalog Item for "Data Archiving Request" to allow users to create, update, delete?, and research data archives. 

Comments
Daniel Draes
ServiceNow Employee
ServiceNow Employee

A word of caution on this though. Based on a customer request I have tested the archiving especially around attachments. With the above setup you are only archiving sys_attachment records, the meta data for an attachment. The real attachment is still in sys_attachmnt_doc - no changes will be done to this records for it.

If you now add a destroy rule for your sys_attachment table, you are actually creating orphan records in sys_attachment_doc.

Jay Freise
ServiceNow Employee
ServiceNow Employee

Hi Fogg, 

Thanks and good point! I've updated that section. This is an important thing to remember when archiving related records because there is plenty of opportunity for orphaning records.

-Jay 

Dan Metcalfe1
Kilo Contributor

Jay, thanks for a really useful article. I'm keen to see one on maximising archiving throughput as it's an important area with very little documentation!

Jay Freise
ServiceNow Employee
ServiceNow Employee

Hi Dan, thank you! I hope to get something around data flows and archiving soon! Just curious - have you captured performance gains realized by archiving?  

Dan Metcalfe1
Kilo Contributor

Hi Jay, to be honest we haven't made sufficient inroads yet to see significant performance gains. We have only recently activated archiving and have an extremely large incident table.

However, when we left the ‘max number of batches (Max Iterations) to process when archiver runs’ at the default value of 10, Batch Size = 100, we found that multiple batches were attempting to archive the same incident record. This resulted in a much lower number of records actually being archived, so have had to drop the Max Iterations to 1 to prevent this. Now the number of records being archived (with certain related records) is higher than the number of incidents being created each month, but not by much.

We would like to significantly increase the speed of archiving but are not sure of the best way to achieve this.

 

Our 1st lesson - start archiving early if you have large data sets!

 

Jay Freise
ServiceNow Employee
ServiceNow Employee

Hi Dan,

Interesting. How did you figure out that the same records were being processed by multiple batches? I will see if I can reproduce this. You definitely need multiple workers if you ever intend on catching up (inbound archive rate has to be greater than the rate of incidents being generated). Thanks for the great info!

-Jay

vmacias1
Kilo Explorer

Thank you for the useful article Jay! It helped us get started with Archiving which has cut our table load times in half!

Dan Metcalfe1
Kilo Contributor

Hi Jay,

We found that when checking the Archive Logs and grouped by the Incident ref (Display Value) or the ID, that there were a large number of duplicated attempts to archive the same record (up to 14 records for each incident).

Initially the number of archived incidents dropping into the Archive Incident table per hour was high but decreased over the course of the day/week as subsequent jobs appeared to attempt to archive the same incident record.

When we restricted the number of batches, the number of duplications decreased. Dropping the number of batches to 1 resulted in more incidents actually being added to the Archive Incident table.

Any advice would be appreciated!

Thanks

Dan

Shankar6
Tera Contributor

Thank you Jay for the detail information on the Data achieve Appreciate it. I was just wondering if you have any script handy to check what other tables can be archived.We completed the work to turn on data archive for INC, CHG and REQ.

 

Jay Freise
ServiceNow Employee
ServiceNow Employee

Hi Shankar,

While you'll want to eventually have an archive plan for every active (meaning lots of transactions) table, you could focus on the big ones, first. Take a look at the app usage reports to give you an idea on what to hit next. Here is an article on what the Application Usage Overview page shows.

https://community.servicenow.com/community?id=community_blog&sys_id=3aef0151db4d67c0fece0b55ca9619bb

Let me know if this helps point you in the right direction.

Cheers,

Jay

David Dunleavy
Tera Expert

I started this on a subprod instance for my incident table.

Archiving Incident alone is easy-peasy.  It gets ugly when I add related records.   I have the following related lists.

  • Related Incidents
  • Problem
  • Work Requests
  • Change
  • etc....

I archive INC0001 that is (active=false^closed<=2010-01-03) but a WREQ, PRB or related INC that is in the related list might still be active , open, not closed etc yet it would still be archived and that is no bueno assuming I created a rule for the related records.   In our instance we hide a related list if there are no records so I have to be very careful to see what are all the related lists for an object.   Dont just look at the form of a single record and make rules for the related records based on what I see there.      Also I dont see that relationship anymore.   Even when I restore the record the related lists are now empty.   So I would have to search through all my archive tables looking for the related records myself. 

 

Before I start to implement a home-grown solution, anyone see anything glaring I've missed.  Unfortunately, in my experience its the SN way to push something out that is "not-quite" all the way there.   Who here hasn't installed a plugin and found that all permissions are denied via an ACL that requires the role they just gave you with the plugin?  -- LOL 🙂 /smh/

 

 

David Dunleavy
Tera Expert

Here is my rule for archiving Incidents

 

find_real_file.png

And my rule for archiving RCAs

find_real_file.png

 

 

The archive related record for RCA

 

find_real_file.png

 

The RCA in the related list on my incident that I will archive

find_real_file.png

It's due date and the status is outside of my rule

 

Both rules are active -- The Inc changed to 19 instead of 20....Just a paste err.

Yet here is my RCA - archived -- What did I do wrong?

 

find_real_file.png

Jay Freise
ServiceNow Employee
ServiceNow Employee

Hi David,

I was able to duplicate what you are seeing. When creating an archive related record, it does not make sense to use the Reference table rule field. The conditions on the rule are ignored if you select a rule in this field.  If there is an archive rule for a table, just let it run on its own. You don't need the Incident rule to trigger it to run again (does that make sense?). So basically, any archive related record you add is just going to archive them, like in the sys_attachment example above.

If you want to keep RCA's around longer, potentially, then just have a separate archive rule for that table with its own conditions. If the RCA related records can be archived when the Incident is archived, create the archive related record.

I know the Documentation is not clear on this, but hopefully we just flushed out what is going on, and can get you going again.

Regards,

Jay

David Dunleavy
Tera Expert

So in closing, related records that have a related rule get archived with the parent no matter if the related records have a different rule.  The archiving of the related record works off the parent record.    In that instance you should hope that all related records are *related* in the same way that the parent rule works ie they are in the same status and dates are roughly equivelant.    Your related change or problem you HOPE will also be closed/resolved and the closed/resolved dates will also be at or near the same as your parent record.   For most things this would be the issue.    Not often would someone create a new change today and associate it with an INC that has been closed for many years.  

 

If you want to ensure that no related records are archived where the related record is active/in progress and/or closed recently or could be in violation of the rules for the parent record then a separate rule, not a related rule, should be made just for those types of records.    

David Lindberg
Tera Contributor

I can't seem to find the sys_attachmnt_doc table in the table reference field when creating a 'Archive Related Records' entry under the Incident archiving.  How did you go about actually archiving them once your realized you were only getting the meta in sys_attachment?

Jay Freise
ServiceNow Employee
ServiceNow Employee

Hi David,

I have revisited the attachment issue and have found attachments should not be included in the archiving process. They pretty much manage themselves. When a record that has an attachment is archived, the sys_attachment record reference is changed to the ar_ table. When the archived record is eventually destroyed, the attachments get destroyed at that point. Also, when you restore an archived record, the attachment pointer goes back to the original table and record. I am going to update the article to use a different related record example because attachments should be ignore and are handled by the system.

Hope this helps,

Jay

David Lindberg
Tera Contributor

Thank you so much for the reply with your research and follow-up.  I am going to remove sys_attachment from my Archiving setup.

 

Cheers,

David

scotth71
Tera Contributor

Great article Jay!

So I posted this out on it's own thread when I should have posted it here 🙂

I’ve been working to start setting up the archiving of our data and we’ve started by targeting Incidents. In working with the business, it’s been determined that we will run the Incident archive in two stages………… the first stage is essentially a one-time execution of a rule for 2015 and 2016 data. The second stage will be the ongoing rule that will keep the latest 24 month’s worth of Incident data live. My main focus right now is Stage 1.

 

Stage I: Incidents closed between 2015 and 2016

This data has pretty much been deemed “not valuable” so I think this is a good opportunity to set up the job properly so that when we get to the Stage II job, the implementation will be painless. For this Stage I approach, we have a fairly simple rule that will archive all Incidents where Closed is at or before 12/31/2016 and Active = False

 My concerns/questions lie in the impact archiving the Incident table will have on SLA, Metric, Intake, attachments, and custom table data tied to Incidents. I’ve not found very much detailed information to help alleviate my concerns about potentially orphaning data.

Some questions that I am hoping to get answers to:

  • How would we handle attachments? Related records or a separate rule? I would imagine the same question applies to essentially any of the other related records.
  • Are there any real risks in leaving behind the metric and SLA  instance records? I’ve been doing some testing and where there is an instance record against an archived Incident, I get a message that the Incident has been archived and that the archived record can be accessed.
  • Are there any other pitfalls that you know of that would appear by setting up a straightforward rule or would it make more sense to add related records like SLA, Metric, attachments, etc.?

 

Daniel Draes
ServiceNow Employee
ServiceNow Employee

I'd like to comment on the attachment question as I have been working through this with one of my customers.

Attachments are not exactly the same as other related records as the attachment are actually stored in two tables:

- sys_attachment: meta information on the attachment

- sys_attachment_doc: the file content itself seperated into multiple chunks based on its size

 

To avoid a data mess you have two options:

1) Do not design any specific rule / rleated record for attachments
The behaviour now will be: If a record (e.g. incident) containing an attachment is archived, the reference in sys_attachment will be pointing to the ar_* (e.g. ar_incident) table. This way you can still access the attachment from your archived record. Once the archived incident will be deleted (destroy rule), the attachment will also be deleted using cascade delete rules.

2) Define a related archive rule
If you define a related archive rule on your e.g. incident archive rule, you should set it to immediately destroy the attachment. If you only archive the attachment you end up with a ar_sys_attachment entry pointing to sys_attachment_doc. So far so good, but deleting that ar_sys_attachment record (destroy) will not automatically delete the sys_attachment_doc entries leaving you with orphan records.

 

scotth71
Tera Contributor

Thanks for the helpful insight! I think I'll leave the attachments be at this point but more broadly, I guess a general question I have is this: At the end of the day, if by setting up a straightforward Incident archive rule without any related records added, will executing that cause us any serious issues in terms of orphaned records or unforseen relational data issues?

In my testing I do see the markers that the archive lays down whenever someone might try opening a link to an archived Incident......that is good. I noticed this when testing an SLA and Metric query............which means the SLA and Metric data didn't get archived with the Incident. Knowing that SLA and Metric tables are so large, would it be wise to set up archive rules for each of those tables as well?

We also closed the ability for any itil use to be able to archive any Incident from a list view. Really not sure why ServiceNow would allow that..............an itil role can archive an Incident regardless of it's state??? Seems to me that could potentially cause a lot of headaches.

VaranAwesomenow
Kilo Sage
Kilo Sage

A word of caution regarding archiving Cis.

Regarding implementing the data archival requirement, Servicenow has a known error because of which it cannot archive relationships, a workaround is available using which we can only archive parent CI and relationship but not the child ci so only half archiving of Ci relationships is possible.
KB reference : https://hi.service-now.com/kb_view.do?sysparm_article=KB0695364

Having said that, if we want to proceed with this approach first we need to have a strategy to handle relationships before archiving a CI.
I have seen customers having a logic that will validate that related CIs have correct relationships with latest Cis and delete the relationships with CIs that are not discovered (lets say for period of 6 months) hence making them good candidates for archival or purge.

For example if we have a Relationship1 tomcat server (tom1) RunsOn:Runs a linux host (Linux1), and if the host is not discoverable anymore, then we need to check if the Tomcat server (tom1) has relationship which any other linux host (Linux2) as Relationship2 in which case it proves that the Tomcat server(tom1) has a valid relationship to a host ( in this case Linux2 and relationship = relationship2) hence relationship 1 can be deleted as it not valid anymore.

BhupeshG
Giga Guru

I am unable to do glidercord on Arvhive table like ar_sys_email. Does any one know why ?

 

Where can I edit the preference for Destroy job so that I can destroy more than 1000 records in single run?

Jay Freise
ServiceNow Employee
ServiceNow Employee

Hi BhupeshG,

1. Can you provide a little more information on what you are trying to do? Does it work in background scripts? Check the ACLs?

2. You will need to create the property for destroy batch size in sys_properties.

https://docs.servicenow.com/bundle/newyork-platform-administration/page/administer/database-rotation...

Regards,

Jay

David Lindberg
Tera Contributor

Hey Jay and others interesting in Archiving - Should we be Archiving or Deleting related Sys_audit records?  I recently added on and Archive Related Record rule for sys_audit and it tripled the processing type for the batch set.

Business-wise we don't need to archive them I suppose.  But should I even be deleting them or will SN manage it on its own?

Jay Freise
ServiceNow Employee
ServiceNow Employee

Hi David,

I would approach the audit table just like all the others and ask if there is a performance issue, if there are requirements to keep that data around, etc. The key benefit from archiving is moving data from the active table to keep it light and performing well. I don't know that the audit table gets enough use to warrant archiving. Like archived data, audit data is for onsey-twosey research rather than being used in day to day operations.

Hope this helps,

Jay

Geoff_T
Kilo Sage

Hi,

I have been able to archive Catalog sc_request records and also related sc_req_item, sc_task, sysapproval_approver, sc_item_option_mtom records. I am having issues figuring out the best way to also archive the sc_item_option records without creating a totally separate rule. Has anyone been able to find a solution for the sc_item_option records?

Thanks

Sunita5
Kilo Contributor

Hi Jay,

can you tell me,which tables cannot be archived?

 

Best Regards,

Sunita

Jay Freise
ServiceNow Employee
ServiceNow Employee

Hi Sunita,

I cannot see what is in the script pulling the table list back, but it is safe to assume any table involved in table rotations should not be archived.

Have you found any others?

Thanks,

Jay

Jay Freise
ServiceNow Employee
ServiceNow Employee

Greetings,

Check out the Paris release notes. There have been some updates to Archiving!

https://docs.servicenow.com/bundle/paris-release-notes/page/release-notes/now-platform-administratio...

Regards,

Jay

Matt102
Giga Guru

Hi David,

I suspect most instances will have Database rotation turned on and looking after the system tables. Given that I believe you should not address system tables with Archive and Delete but look to Database/Table rotation (sys_table_rotation.list).

R,Matt 

 

 

anwie
Kilo Expert

Hello,

just a special question, perhaps Jay or someone else can help.

We are creating archiving for some tables for our customer and it seems ok general. But the customer has the requirement, that some data in the archiving process should be cleared, so that they are not visible in the corrsponding archive table.

The idea was now, to do this data changes with an Before Insert Business Rule on the archive table. But it seems, that the Business Rule does not trigger. We thought, that archive tables are handled like all tables in servicenow, but this seems not so.

Any idea? How could we change data in the archive process?

Kind regards,
anwie

David Lindberg
Tera Contributor

When you say 'not visible' I think you mean 'deleted.' If so I would make 2 archive rules for that table. One that archives the data you do want to be in there and omit's the records you do not.

The 2nd rule would be one where the action on the record is to delete the records not archive. The conditions on this rule would look only for the records you want deleted.

 

Good luck.

anwie
Kilo Expert

Hello David,

'deleted' was not meant. The customers requirement was to delete the content of most fields in the archive tables (so that only a few data are visible for archived records for example for an incident caller). Deletion per Destroy Rules is several years later.

We have now implemented the following solution:

  • Scheduled job, which looks once per day, which records must be archived, clears the relevant fields in the origin table and sets a customized field (for example 'u_archive_now') to true.
  • Archive Rules with condition based on the new custom field

Kind regards,
anwie

Jay Freise
ServiceNow Employee
ServiceNow Employee

Ok, so they want archiving at the column level. Interesting. I think your approach should work with clearing before archiving kicks in. Just be careful so that it only clears the exact data scope and you don't have data loss. Another customer recently archived attachments and did not have the conditions set right and ended up archiving all attachments including sso certs, portal images, etc. Test, test, test!

 
Alexander Versh
Tera Expert

Hello Jay,

 

If we exclude archiving of sys_attachment and sys_attachment_doc, what would be the best way of managing attachment table size? 

I setup related archiving rule for sys_attachment, but not for sys_attachment_doc. When I try to restore my record, attachments are not visible for the restored record?

 

What could be the issue?

 

Karen Woo2
Kilo Explorer

Hey Alexander!

My company and I learned the hard way to archive attachments with caution.

We first started to archive sys_attachment based on if it was created more than 2 years ago. The problem is it ends up archiving everything. Think certificates, Service Portal icons, any icon or image really. This ended up locking out all of users from logging in through SSO as there was no certificate attachment anymore.

We ended up deciding that the value of archiving the attachment table was not worth the risk so we did not turn it back on. If you were to move forward with archiving attachments my recommendation would be to go after specific tables. e.g. incident table, sc_task, etc. This solution works for the sys_attachment table, but it doesn't work for the sys_attachment_doc table. For this table, there really isn't a good filter that I'm aware of that won't introduce risk into your environment.

Daniel Draes
ServiceNow Employee
ServiceNow Employee

Another thing to note on archiving large data objects (like attachments) is that archiving is actually not reducing the storage size. The record itself still exists, just in another table. To make matters worse a XML representation of the record will also be stored separately to ensure we have all information if/when we need to restore that record. So actually, it is duplicating the storage requirements.

Inactive_Us2213
Kilo Contributor

Hi All,

 

we sorted out the attachment topic with ServiceNow's help a few weeks ago. It works good. Here is the solution:

1. DO NOT archive sys_attachment :). Especially if you are in Paris or older version. ServiceNow has a known issue with sys_attachment_doc records not being deleted when Destroy rule runs. If you are in Quebec, you can do it, but it does not make sense as Daniel Dreas explained it before.

2. Once you archive your task(incident, problem, SR, etc.) and all related records, attachments will be visible for each archived recorded( because banner is still looking into sys_attahcment and not to ar_sys_attachment) which is very convenient when someone need to look for some archived data.

3. Create a destroy rule for your archives( in our case it will wait for another 5 years). When that rule runs with "destroy Related records" option checked, it will delete records on sys_attachment as well as on sys_attachment_doc table. 

mjs9
Giga Guru

Thank you @Jay Freise for this informative article.

Thanks Alexandar for those tips.

My question is - Which are the tables we need to take into consideration when we are archiving Service Requests (REQ, RITM, SCTASK)?

Thank you.

Inactive_Us2213
Kilo Contributor

here is the matrix that I used for my rules. It is driven by Legal team, Internal Auditors and Operations. So based on your configuration and usage of some core platform features the list will be different. Also, SerivceNow team told me that it is a bit overkill:)

I created three main rules linked together via parent child(Req->Item->sctask) and each of those rules have related archive or delete rules.

mjs9
Giga Guru

Thanks for the response.

You have created 3 archive rules as below:

1. REQ

Related Record Rule : Call, Journal Entry, RITM

2. RITM

 Related Record Rule : Approval, SCTASK, Journal Entry, Task SLA

3. SCTASK

 Related Record Rule : Approval, Journal Entry, Task SLA

Am I right?

If you have archived Incident, Problem, Change could you please share that info?

Thank you very much.

Inactive_Us2213
Kilo Contributor

right three rules, each have archive related record rules and delete related records rules. Hence, for SCTASK I achive only three related records and immediately delete the other nine.

mjs9
Giga Guru

Thanks.

1.Once archive is completed, do we see related list on archived form?

Eg: Do we see Task SLAs related list on archived Incident form?

2. If you have archived Incident, Problem, Change could you please share that info?

Thank you.

Daniel Draes
ServiceNow Employee
ServiceNow Employee

1. No - information in archive tables is 'flattened' meaning they have no references at all anymore. You will need to manually navigate the tables. The intention of archive is you do not need to work with that data anymore on regular basis and for one-off manual inspection this is acceptable.

 

mjs9
Giga Guru

Thank you 🙂

ajay konduru
Tera Contributor

Hi Team,

 

I have an issue running archival job - I couldn't see state and substate values copied as expected to archive records.

 

I can see a backend value for state and blank or empty values for substatus.

 

Note : I have relabeled state to status and substate to substatus in my product. 

 

Any Help to preserver actual state and substate value to archive records is highly appreciated.

 

Thank You.

preeti19
Tera Contributor

Hi @Jay Freise ,@Daniel Draes , 

 

I am facing an issue with the archive destroy rules, the data is getting archived in the archive hardware table, and I configured a destroy rule for deleting the records for archive duration of 2 days, but when i check the record estimated it is showing as 0 continuously and ran the archive also but 0 records deleted, does it have to do with the fact that I have more than 255, 000 record in the archive table or some other issue, 

Also destroy rules do not seem to work on other tables as well apart from the email archive table

Can you help me out with this?

Thank you

Anna Mi_ek
Mega Explorer

Hi @Jay Freise,

Is SN charging for creating new archive table (cmdb_ci_certificate)?

Thanks

Gaurav63
ServiceNow Employee
ServiceNow Employee

@Jay Freise We should revisit this article since we should not be recommending to archive attachments/audits/journals. Attachments are referenced to archived record (for ex - ar_incident) as a part of archiving process and its an unnecessary churn on the platform to move large scale of data from live attachment tables to archive attachment tables. Archive destroy does take care of cleaning up sys_attachment and sys_attachment_doc records associated to archived records.

Jay Freise
ServiceNow Employee
ServiceNow Employee

Thanks Gaurav63! I will be updating the article to make sure folks are aware they don't need to archive attachment, journals, and audit tables.

Version history
Last update:
‎08-28-2023 12:08 PM
Updated by:
Contributors