Auditing
For auditing high-level operations, the user must have the AUDIT SYSTEM privilege. For tracking operations on specific database objects, the user must either have the AUDIT ANY privilege or the database object must be in their schema.
GRANT AUDIT ANY TO store;
SQL> AUDIT CREATE TABLE;
Audit succeeded.
SQL>
SQL> CREATE TABLE test (
2 id INTEGER
3 );
Table created.
SQL>
To view the audit logged through USER_AUDIT_TRAIL view.
SELECT username, extended_timestamp, audit_option
FROM user_audit_trail
WHERE audit_option='CREATE TABLE';
To audit the issuance of statements by a particular user.
AUDIT SELECT TABLE BY yourSchemaName;
To audit all INSERT, UPDATE, and DELETE statements made by the yourSchemaName and tom users:
AUDIT INSERT TABLE, UPDATE TABLE, DELETE TABLE BY yourSchemaName, tom;
To audit the issuance of statements made for a particular database object.
SQL> AUDIT SELECT ON emp;
Audit succeeded.
SQL>
To audit all statements issued for the employees table:
AUDIT ALL ON store.employees;