WHENEVER SUCCESSFUL and WHENEVER NOT SUCCESSFUL options

WHENEVER SUCCESSFUL option audits when the statement executed successfully. WHENEVER NOT SUCCESSFUL option audits when the statement did not execute successfully. The default is to do both.


AUDIT UPDATE TABLE BY steve WHENEVER NOT SUCCESSFUL;
AUDIT INSERT TABLE WHENEVER NOT SUCCESSFUL;

The next example uses the WHENEVER SUCCESSFUL option to audit the creation and deletion of a user:


SQL> AUDIT CREATE USER, DROP USER WHENEVER SUCCESSFUL;

Audit succeeded.

SQL>

The next example uses the WHENEVER SUCCESSFUL option to audit the creation and deletion of a user by the store user:


AUDIT CREATE USER, DROP USER BY store WHENEVER SUCCESSFUL;
Home »
Oracle »
User, Privilege, Role » 

Auditing:
  1. Auditing
  2. WHENEVER SUCCESSFUL and WHENEVER NOT SUCCESSFUL options
  3. BY SESSION and BY ACCESS options
  4. Audit Views
Related: