Record Deletes/Updates, how to track, find and troubleshoot these issues.Issue <!-- div.margin { padding: 10px 40px 40px 30px; } table.tocTable { border: 1px solid; border-color: #e0e0e0; background-color: #fff; } .title { color: #d1232b; font-weight: normal; font-size: 28px; } h1 { color: #d1232b; font-weight: normal; font-size: 21px; margin-bottom: 5px; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #cccccc; } h2 { color: #646464; font-weight: bold; font-size: 18px; } h3 { color: #000000; font-weight: bold; font-size: 16px; } h4 { color: #666666; font-weight: bold; font-size: 15px; } h5 { color: #000000; font-weight: bold; font-size: 13px; } h6 { color: #000000; font-weight: bold; font-size:14px; } ul, ol { margin-left: 0; list-style-position: outside; } --> Description Have you had that issue where you believe something was deleted but you are unable to determine where the record went and how it was deleted? As of London release, we have implemented a delete recovery tool to capture deletes on your instance, if the deletes also caused records to be updated it should also be captured. We also log all the scripts run in scripts - background and all the records affected by that script if the rollback option is ticked. So if you have one of these cases then this article will go through some of the tables and modules that will potentially help you find when the deletion happened and if captured in time you should be able to recover the data via the rollback contexts. Procedure There is a number of ways to find and detect affected records: Check shadow tables (sh$<tableName>) The shadow table will be the physical table that stores the information on the database, this can be defined by different table structures: https://support.servicenow.com/kb_view.do?sysparm_article=KB0723580 TPC: The table will be the actual table from the UITPH: The table will be the base parent tableTPP: The table will be either CMDB or one of the Partitions CMDB$ParX (where X is the Partition If you are unsure turn on SQL debug when you view a table and you should be able to find the table that that data is coming from.For this example, incident would be sh$task as it's TPHThis shadow table will show you all deleted records for that tableImportant fields are: sh$context - this will tell you the rollback context this deletion is recorded undersh$first_recorded - this will show you the time this record was deleted. Check deleted records module (sys_audit_delete) Here you will be able to find all deleted records that are audited.It has a few important fields transaction - this will tell you the transaction that was run to delete this record.sys_created_by - this will show you the user who deleted this recordsys_created_on - this will show you the time the record was deleted Check Rollback sequences (sys_rollback_sequence) This table records all the updates/deletes that are triggered as part of the rollback functionality To help search this table if you have the sys_id of the record you can search via the document id columnIf you found the context from the shadow table or another method you can use that to search via the context columnWith the context you will be able to show all the records that were deleted and updated via that context Check Rollback incremental changes (sys_rollback_incremental) This table records the element updates for the specific record To help search this table if you have the sys_id of the record you can search via the document id columnIf you found the context from the shadow table or another method you can use that to search via the context columnThis gives more information with the sys_rollback_sequence for updates and will tell you specifically which columns were updated EG: short_description of an incident.Important fields are: Element Name - The column that was adjusted title="">Upgraded value - This will show the new value of that elementTxn ID - The transaction that made this changeWhen - This will show you when this record was updated (NOTE: PRB1343251 - “When” field in sys_rollback_incremental is inserted as PST instead of UTC so for this field you will need to add 6 or 7 hours depending on daylight savings) Check Script execution history (sys_script_execution_history) The execution history will show all scripts run via scripts - backgroundEach history will provide an affected records summaryMore information here Look through sys_audit for newvalue = 'DELETED' This can show you who deleted and when. Looking through these tables you should hopefully be able to find the deletion of the record that you were looking for. More information can be found in our docs: Roll back and delete recovery If you still have issues finding a deleted record you can always contact Support and we will assist you to the best of our ability to find your deleted records. Also to note, with deletions timing is everything so the sooner you let Support know of the deletion the better chances we have to track down the deletion, also if you use the steps above you can provide support with your findings to help us track down the deletion quicker.