there are 3 levels of auditiing
| Level 0 | No Audit |
| Level 1 | Row-level Audit. Audit only the operation without column details |
| Level 2 | Column-level Audit without Blobs. Audit changes to the data at the column level but without Blob changes |
| Level 3 | Full Audit. Audit changes to the data at the column level including Blob changes (Oracle only |
auditing_enable(<table_name>,<level>)
auditing_disable(<table_name>)
Examples for Oracle:
Enable full auditing on all tables: exec auditing_enable(null,3);
Enable level one auditing on the task table: exec auditing_enable('TASK',1);
Disable auditing on PROJWBS: exec auditing_disable('PROJWBS');
Disable auditing on completely: exec auditing_disable(null);
Example for SQL:
Enable level 2 auditing on the ACCOUNT table:
EXEC auditing_enable
@ptable_name = N'account',
@plevel = 2
Use the settings_write_bool procedure to enable the overall auditing feature.
Oracle
exec settings_write_bool(1,'database.audit','Enabled');
SQL Server
exec settings_write_bool 1,'database.audit','Enabled';
Example”
database.audit.PROJWBS.Options=001: Row-level audit on deletes only.
database.audit.TASKRSRC.Options=333: Fully audit.