To set audit:
AUDIT [option] [BY user|SESSION|ACCESS] [WHENEVER {NOT} SUCCESSFUL]

For example:

SQL > audit select on dba_users by access whenever not successful;

Audit Succeeded.

How to check what object are audited?You can use DBA_OBJ_AUDIT_OPTS as below which shows what privileges are audited.

As you can see in the screenshot, DBA_USERS is audited against SEL (Select) option.  You may wonder what -/A?This means DBA_USERS is audited for unsuccessful login.  In case, if you audit for successful as well, you will see as A/A. (successful / not successful).

ALT Auditing ALTER WHENEVER SUCCESSFUL / UNSUCCESSFUL
AUD Auditing AUDIT WHENEVER SUCCESSFUL / UNSUCCESSFUL
COM Auditing COMMENT WHENEVER SUCCESSFUL / UNSUCCESSFUL
DEL Auditing DELETE WHENEVER SUCCESSFUL / UNSUCCESSFUL
GRA Auditing GRANT WHENEVER SUCCESSFUL / UNSUCCESSFUL
IND Auditing INDEX WHENEVER SUCCESSFUL / UNSUCCESSFUL
INS Auditing INSERT WHENEVER SUCCESSFUL / UNSUCCESSFUL
LOC Auditing LOCK WHENEVER SUCCESSFUL / UNSUCCESSFUL
REN Auditing RENAME WHENEVER SUCCESSFUL / UNSUCCESSFUL
SEL Auditing SELECT WHENEVER SUCCESSFUL / UNSUCCESSFUL
UPD Auditing UPDATE WHENEVER SUCCESSFUL / UNSUCCESSFUL
REF Auditing REFERENCE WHENEVER SUCCESSFUL / UNSUCCESSFUL (not used)
EXE Auditing EXECUTE WHENEVER SUCCESSFUL / UNSUCCESSFUL
CRE Auditing CREATE WHENEVER SUCCESSFUL / UNSUCCESSFUL
REA Auditing READ WHENEVER SUCCESSFUL / UNSUCCESSFUL
WRI Auditing WRITE WHENEVER SUCCESSFUL / UNSUCCESSFUL
FBK Auditing FLASHBACK WHENEVER SUCCESSFUL / UNSUCCESSFUL

 

Recommended Posts

Start typing and press Enter to search