AUDIT Statement

Audit an SQL statement or accesss to a specific database object.

Syntax:

   AUDIT ALL|ALL PRIVILEGES|sql_statement|system_priv [options]

options
   BY user
   BY proxy [ON BEHALF OF ANY|user]
   BY ACCESS|SESSION [WHENEVER [NOT] SUCCESSFUL]

Auditing Objects
   To audit an object use the modified syntax

   AUDIT action on schema.object BY ACCESS|SESSION [WHENEVER [NOT] SUCCESSFUL]
   AUDIT action on DEFAULT BY ACCESS|SESSION [WHENEVER [NOT] SUCCESSFUL]
   AUDIT action on DIRECTORY dir_name BY ACCESS|SESSION [WHENEVER [NOT] SUCCESSFUL]

   Where actions is any of
   ALTER, AUDIT, COMMENT, DELETE, EXECUTE, GRANT,
   INDEX, INSERT, LOCK, RENAME, SELECT, UPDATE

You must first enable auditing with the init.ora parameter AUDIT_TRAIL = YES

"I would have made a good Pope." - Richard M. Nixon

Related Commands:

NOAUDIT - Disable auditing
GRANT - Grant Privs

Related Views:

 DBA_AUDIT_EXISTS 
 DBA_AUDIT_OBJECT                          USER_AUDIT_OBJECT 
 DBA_AUDIT_SESSION                         USER_AUDIT_SESSION 
 DBA_AUDIT_STATEMENT                       USER_AUDIT_STATEMENT 
 DBA_AUDIT_TRAIL                           USER_AUDIT_TRAIL 
 DBA_OBJ_AUDIT_OPTS                        USER_OBJ_AUDIT_OPTS 
 DBA_PRIV_AUDIT_OPTS  
                                                        QUEUE_PRIVILEGES  




Back to the Top

Simon Sheppard
SS64.com