Skip to Main Content
Oracle in a Nutshell
book

Oracle in a Nutshell

by Rick Greenwald, David C. Kreines
December 2002
Intermediate to advanced content levelIntermediate to advanced
928 pages
85h 29m
English
O'Reilly Media, Inc.
Content preview from Oracle in a Nutshell

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle Internals

Oracle Internals

Donald K. Burleson
Oracle PL/SQL

Oracle PL/SQL

Lewis Cunningham
Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Rick Greenwald, Robert Stackowiak, Jonathan Stern

Publisher Resources

ISBN: 0596003366Errata Page