Enables and disables auditing in the database.
ON, OFF
Off
PUBLIC role | For current user | For other users | |
---|---|---|---|
Allowed to set permanently? | Yes, with SET ANY SECURITY OPTION | No | No |
Allowed to set temporarily? | Yes, with SET ANY SECURITY OPTION | No | No |
This option turns auditing on and off.
Auditing is the recording of details about events in the database. Auditing provides some security features at a performance cost.
The following restrictions are in place when the audit log is set to the transaction log:
If you set the auditing option to On, and do not specify auditing options, then all types of auditing information are recorded. Alternatively, to control the type of information that you want to audit use the sa_enable_auditing_type and sa_disable_auditing_type system procedures.
The following statement turns on auditing for the database.
SET OPTION PUBLIC.auditing = 'On';