Name
AUDIT
Synopsis
AUDITsql_statement_clause|schema_object_clause[BY SESSION | ACCESS] [WHENEVER [NOT] SUCCESSFUL]
Enables auditing on your Oracle database.
Clauses
- sql_statement_clause
This clause is used to specify statement and system privilege auditing and has the following syntax:
{[statement_option | ALL][, ...]} |
{[system_privilege | ALL PRIVILEGES] [, ...]}
BY {proxy(, proxy ...,] ON BEHALF OF [{user [, user ...]} | ANY |
{user[, user ...]}- schema_object_clause
This clause is used to specify schema object auditing and has the following syntax:
{object_option[, object_option ...] | ALL }
ON {[schema.]object | DIRECTORY directory_name | DEFAULT }Keywords
- BY SESSION | ACCESS
Specifies whether you want an audit record written once for each session or for each time a particular type of access is attempted. All statement auditing and all privilege auditing on DDL statements can only be set BY ACCESS.
- WHENEVER [NOT] SUCCESSFUL
Specifies whether to modify only successful or failed SQL statements. The only failed SQL statements that are audited with the NOT keyword are those that fail or result in errors based on insufficient privileges or that a referenced object does not exist. The default is to audit all statements, regardless of whether they succeed or fail for the reasons mentioned.
- BY user
Specifies auditing on the basis of one or more usernames.
- BY proxy ON BEHALF OF
Specifies auditing of actions taken by a proxy on behalf of a user. New with Oracle8i.
- statement_option
The values ...