Name
AUDIT (SQL Statements)
Synopsis
AUDIT {system_option | sql_option}[,{system_option | sql_option ...}]
{[BY username[,username ...]]
| [BY proxy [ON BEHALF OF {ANY | username[,username]] }
}
{[BY SESSION] [WHENEVER [NOT] SUCCESSFUL]
| [BY ACCESS] [WHENEVER [NOT] SUCCESSFUL]
}Sets up auditing for specific SQL statements in subsequent user sessions. Audit records are written to the audit trail, which is a database table containing audit records that can be accessed through data dictionary views. Auditing must be enabled using the AUDIT_TRAIL parameter in the initialization file. (See Chapter 2 for information on auditing parameters.)
Keywords
- system_option
Specifies that SQL statements authorized by the named system privilege be audited. See Chapter 4 for details.
- sql_option
Specifies a set of SQL statements to be audited. See Chapter 4 for details.
- BY username
Specifies that SQL statements issued by the named user be audited.
- BY proxy
Specifies that SQL statements issued by the specified proxy be audited.
- ON BEHALF OF ANY
Specifies that SQL statements issued on behalf of any user be audited.
- ON BEHALF OF username
Specifies the user on whose behalf the proxy executes the specified statement.
- BY SESSION
Causes Oracle to write a single record for all SQL statements of the same type issued in the same session.
- BY ACCESS
Causes Oracle to write a single record for each audited statement.
- WHENEVER SUCCESSFUL
Chooses auditing only for SQL statements that complete successfully.
- WHENEVER NOT SUCCESSFUL ...