top of page
CerebroSQL

Oracle:

AUDIT

AUDIT
{ audit_operation_clause [ auditing_by_clause | IN SESSION CURRENT ]
| audit_schema_object_clause
| NETWORK
} [ BY { SESSION | ACCESS } ]
[ WHENEVER [ NOT ] SUCCESSFUL ]
;

audit_operation_clause::=
{ { sql_statement_shortcut
| ALL
| ALL STATEMENTS
} [, { sql_statement_shortcut
| ALL
}
]
| { system_privilege
| ALL PRIVILEGES
} [, { system_privilege
| ALL PRIVILEGES
}
]
}
auditing_by_clause::=
BY user [, user ]...
audit_schema_object_clause::=
{ sql_operation [, object_option]
| ALL
} auditing_on_clause
auditing_on_clause::=
ON { [ schema. ] object
| DIRECTORY directory_name
| MINING MODEL [ schema. ] model
| DEFAULT
}

Example

AUDIT ROLE;

AUDIT ROLE WHENEVER SUCCESSFUL;

AUDIT ROLE WHENEVER NOT SUCCESSFUL;

AUDIT SELECT TABLE, UPDATE TABLE;
AUDIT SELECT TABLE, UPDATE TABLE BY hr, oe;

AUDIT DELETE ANY TABLE;

AUDIT CREATE ANY DIRECTORY;
AUDIT DIRECTORY;
AUDIT READ ON DIRECTORY bfile_dir;

AUDIT SELECT ON hr.employees;
AUDIT SELECT ON hr.employees WHENEVER SUCCESSFUL;
AUDIT SELECT ON hr.employees WHENEVER NOT SUCCESSFUL;
AUDIT INSERT, UPDATE ON oe.customers;

AUDIT ALL ON hr.employees_seq;

bottom of page