- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2020 03:20 PM
I am trying to nail down which deleted records are written to the sys_audit_delete table to take advantage of reading that table in order to delete records from tables in a data warehouse.
I saw a post in the community that said "Remember, only those tables or their parents with the audit flag set to true will audit deleted records." That is what I believed but when I deleted records from a table (cmdb_ci or task_ci) where neither that table nor the parent table has an audit flag set to true, the deleted records showed up in the sys_audit_delete table anyway.
Are all deleted records written to the sys_audit_delete table?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2020 10:27 AM
But it does. 🙂
It says tables that contain no_audit_delete=true are not tracked. So you would do look at dictionary entries of type collection that does not contain no_audit_delete=true. The query below will list the tables that are tracked.
https://instance.service-now.com/sys_dictionary_list.do?sysparm_query=internal_type%3Dcollection%5Ea...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2020 06:05 PM
Hello, this might shed a little more light on what records are tracked.
https://docs.servicenow.com/bundle/orlando-platform-administration/page/administer/table-administrat...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2020 07:17 AM
I had read this article and while it tells me how to turn audit on for a SYS_ table, it does not seem to indicate which deleted records will be captured by the sys_audit_delete table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2020 10:27 AM
But it does. 🙂
It says tables that contain no_audit_delete=true are not tracked. So you would do look at dictionary entries of type collection that does not contain no_audit_delete=true. The query below will list the tables that are tracked.
https://instance.service-now.com/sys_dictionary_list.do?sysparm_query=internal_type%3Dcollection%5Ea...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2020 12:19 PM
Thanks. I was missing that the value was in the attribute field.