ServiceNow Data Archival | How to Effortlessly Manage Your Data with ServiceNow Archival
[Music] welcome back to our Channel where we simplify your service now Tech if you are using service now and your system is starting to slow down you might need to think about data archiving stay tuned as we dive into how we get started with service not data archiving and ensure your system runs smoothly hi everyone I'm Amit Gujarati and today we are going to explore how to manage data growth and enhance your service of performance through effective archiving whether it's for compliance performance or both archiving is key so let's get into it as a service as your service now instance matches it accumulates a lot of data much of which you might not need on a daily basis let's say task record for from last 2 three years ago right they they are probably not as crucial as your current task right that's where archiving Cubs into play archiving what archiving actually does archiving moves less relevant data from the primary table to the archive table freezing up the space and improving performance okay for example if you are dealing with the incident table initiating an archiving rule will create an uh intermediate table with the suffix as AR and discorde incident table where your old incident has stored safely away from the active database so basically what it does in your active database you will have only um the required data and you can play around it you can query around it and it will be pretty smooth right it will not create any performance hamper so let's dive deep into and you can jump you can see on my on this is my personal development instance which is currently on the Washington release and we have a separate application itself for archiving so if I type in the archiving so this is the module which is called as system archiving okay why exactly I landed on this particular module so basically we have also discussed in our service of social episode in a project we are facing a difficulty we want to clean up the data of CMD C okay which is again a different use case and some incident records which were which were there in the native table from more than 10 years when we try to delet delete it out it's it's pretty difficult right it occupies all the nodes and is creating a hamper so that's where we we formulated the policies around the archiving so if you get if you click on get started right it will basically what it will do it will move you to to the documentation for the same and you can use this documentation uh to get the just of what exactly is there in the archiving so I will just what I will do I'll just minimize this out and we'll go back to our native so let's look into the modules which are included in this so if you look into archiving there are multiple modules involed over there press that there is archiving rule archiving logs archive destroy rule archive destroy log status archive property and then we have the arive table so what is first of all let's go bottom to top approach for this particular time right so what are arive table as I told you whenever you write a policy aring policy on any table or aring rule on any table basically it creates other table okay for that particular table itself where the archival data will be stored for that table and it will start with some suffix called ER uncore okay so if there is an incident table so the archival table for the incident will be arore incident in the similar way we can see there is outter box knowledge catalog item audit results we must be seeing right the audit result when we look into the audit result we'll not be able to see all the audit records right in the table so that's this is the place where it goes then we have archivable properties so what exactly this archiving property is so basically it has two properties it's a collection of two property so first of all it's pretty clear from the name itself number of Records to Archive when archive runs so basically when we uh when we define archival rule right it will have a batch of data right but the archival will not happen for example you have 10,000 records to be archived it will not happen immediately for 10,000 record because it will definitely hamper the performance of the system it will occupy all the nodes and so on and so forth so we need to define a batch what should be the batch for your archal so if you have defined 100 so it will take 100 100 records and archive it out when the rule get executed okay and then we have maximum number of batches to process when archive for runs so it's also pretty clear so it's how many archival batches maximum Aral bat should be run on the particular table or certain table out okay so it's 10 by default you can change it out based on your requirement then we have archive status and we have archive lock so basically this is for seeing the status of the archive rule which are getting executed okay and archive log is the logs I will not go into that okay now the most important there are two models which are really important in this application which is archive rules and archive destroy rules so let's dive deep into this so we will go first into archive rule so what exactly the archive rule is archive rule is a policy or rule you define on certain table archival rule okay based on that rule the archal happen Okay I I think it's pretty clear so if we click on new and try to create a new archival rule so for example if I give it as a test it asks for the table okay so if I want to select it as incident okay as soon as I select incident come on why it's not getting selected I will just use this shortcut okay and see it then we can Define the condition for example we can give if we don't want any record which is inactive okay you can't write anything and you can Define the condition okay and then we have written references kind of thing right so what exactly written references is so if you check this particular check box out so with the if if this incident record is refreshed on any other table okay so how exactly it happens if the record is getting ref um if this checkbox is not checked okay and if this particular record is getting referenced on any other table for example we have problem table over that we have a reference to the incident so it will store only the display name for that the reference field will only have the display value for the record okay no other information but if we check this checkbox R references so basically what it will do uh it will also store the C ID so that we can navigate to that particular record also okay and then we have Auto re archive so if the record is restored okay so and you want to re archive it out okay again Auto re archive then this particular checkbox needs to be checked so let's look what are let's look at few rules okay which is created out of the box so with that we will get some more idea around the same which one will make more sense oh this this is one on incident right we have we will see on the image on also but let's look into the incident one so basically this is on incident table okay it's currently inactive okay uh and it has a description archive incident that are no longer active and their close dates are 6 months ago so we are closing all the incident which are closed before 6 months and the same is mentioned in the condition active is false and closed before 6 months okay so this is how you can Define it out and we have two related list the one is the archive run okay what exactly what all archives are getting run okay we'll be seeing over here and then we have archive related records okay what all records are getting archived this will be shown over here we have recalculate estimates also so we get the estimate right he when the last record when the last um Run next run will happen Okay um and what are the number of Records okay which are which will be getting archived in the next R so this is how the arch rule Works let's look into the email one also say if I go with the email okay so this is all the valid one okay so basically what it does that it's it's it clearly states right over here old or ignored so whatever image are there which are almost a year old or which are in ignored state right okay we don't want it we want to Archive it out so you can say created before or it's receive ignore send ignor the same calculation and you can see this particular right that um This Record got deleted and so when from archal the record get deleted then it get get added to this okay so this is all about archal R you can create your own archal Rule now moving to the next part which is archive destroy rule this is interesting okay now what exactly this particular thing does okay so foreign sest if I go new okay now if I click on so basically it's like this particular table is used in order to delete the archal table okay that that will be destroyed okay so basically you can see oh here the there you will be seeing only the archival tables only over here okay so you can see Arch AIT the one which were seeing in the model this one if you go the archive table these are the three and we can see only these three tables out over here okay and it's the cleanup activity on the archival table okay so this is how the archive destroy R works so we will open some archive destroy rules so for there's no sorry not then so what one which one should I take let's look into this one here okay so basically what is doing you can see a lot of things happen Okay number of record which got deleted okay finished one time process so basically what is doing it's doing the clean up on this particular table on CML it's starting from AR that means it's arival table right AR and C so it's getting the AR D from this particular table is it clear so this is how it works okay the archival rule these are the two crucial models uh crucial modules which you have to consider when working on this particular application a critical tip okay archive table aren designed for on demand queries like your active tables okay so you can't play around like Glide record you are doing Glide record Glide or Aggregate and so on right they are they are structured for quick access to index field only such as display value or creation date okay this schem system lean and fast so you should always keep this uh thing in mind okay so uh now let's extend it out okay now what about those of you are handling sensitive data okay like configuration management database record okay or cmdb okay we is specifically designed for this type of record so there is a system called cmdb Data Manager I will be creating another video for the de of for the detailed overview for it but if you want to just have overview around the same if you type over here cmdb data manager because cmdb is cruci right you can see this particular interface right policies excluded CIS and so if you go on to policies okay let's see if there's any policy there's no policy right now if you create a new so it gives you interface to create a policy okay to create a archival rule for cmbc one instance um I will give computer clean up I will not give policy type now you guys what needs to be done it's a delete retire assertion archive so we want to go with the archival right okay askask assigned by group support group I will not go into that you can Define class configuration item is computer okay and what action needs to be taken so you want archive configuration item right as soon as you move with this okay um this particular dat will get cleaned up okay from this okay so I will create a separate video on this particular part out but just to share the inside because you should it should not happen that you start cleaning up you should start writing the AR on the dmdb tables so before we wrap up okay remember to check your archive table AC to Ure that data isn't just archived but also secured okay and if you are setting new AC make sure you understand how they interact with existing permission to avoid any access issues this is a pro tip okay you should always keep always keep in mind so this is all for today's tutorial uh thanks for watching if you found this tutorial helpful okay please like subscribe and hit that notification Bell for more tips on make on making the most of service of platform okay I hope the AR rules are clear to you if still if any queries okay drop your questions or experience with data ariving in the comment below and see you all in the next video thank you e e for
https://www.youtube.com/watch?v=RsCa9JXfOH8