Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Deleting records having reference column common to sys_audit and sys_audit_relation tables

John Krueger
Tera Expert

I see there is a reference column “Audit” on sys_audit_relation table referencing to the sys_audit table document_key column.   Is there any dependency between these two tables regarding deleting records in either order?  In other words if the record in sys_audit_relation is deleted by the custom script first will that cause an issue/error at that time or later when the referenced record in sys_audit is deleted by table cleaner because the sys_audit.document_key column reference to sys_audit_relation.audit is ghosted because it has  already be deleted.    Likewise vice versa would there be an issue/error if the Table Cleaner deleted the sys_audit record first?

0 REPLIES 0