By default, most tables that are audited include auditing the deletion of records in that table. However, in certain cases, an administrator may want to have certain tables not have deletions audited while still continuing auditing of other changes (such as record inserts and updates). This article will describe the steps that can be taken to prevent auditing of record deletions on a particular table.
Log into the instance with an account having administrator rights to the instance.
Once logged into the instance, browse to the following location using the Menu Navigator: System Definition -> Dictionary. A list of dictionary records on this instance will appear.
Filter the list to locate the Dictionary record with a Table name corresponding to the name of the table you want to remove delete auditing from and that has a Type field of Collection.
Open this record for editing by clicking the information icon to the left of that record in the list.
Click the related link in this record titled Advanced view to allow display of additional fields. If the Advanced view related link does not appear, this indicates that the record is already displaying in this view.
Click into the Attributes text field. If this text field is currently empty, simply type the following text into this field:
However, if there is already text in this field, add the following text after the last character already found in that field:
Click the Update button to save the change to the record.
Once this change has been applied, this table will no longer create an audit record for deletions from this table, although it should still record these audit records for record updates and inserts.
Note that, however, if the Audit field for the table object (sys_db_object) corresponding to this table is not set, no audits will be performed for this table.
Conversely, if an audited table which currently does not have deletions audited needs to have deletions recorded, this same attribute should be removed from the Collection Dictionary record corresponding to this table. The following steps can be used to remove the attribute from this Dictionary record.
Log into the instance with an account having admin rights to that instance.
Once logged into the instance, browse to the following location: System Definition-> Dictionary. A list of dictionary records on this instance will appear.
Filter the list to locate the Dictionary record with a Table name corresponding to the name of the table you want to remove delete auditing from and that has a Type field of Collection. Open this record for editing.
On the related lists section for the record, click the tab labeled Attributes.
This will display a list of attributes associated to the selected table.
Click the information icon associated to the related list Attribute record with the name No audit delete.
The property record as associated to the table will open. Click the Delete button on this record form that opens.
A confirmation dialog box should appear asking for verification of the delete. Click the Delete button on the confirmation dialog box, which will then remove the attribute from that table.
Note that if the table record corresponding to a table has the Audit checkbox set to false, no auditing will occur for this table regardless of the attributes associated to this record.
Finally, it is also possible to prevent the auditing of deletions by creating, or updating if it exists, the system property:
The value of this is a comma separated list of table names.
As noted in the steps above, if a table itself is not configured to enable auditing of the table, it will not record any updates, inserts or deletions of records regardless of the table attributes associated to that table. The following Knowledge Base article details the steps to enable and disable auditing at a table level.