Examples of schema object auditing

The following examples show how to use the schema object auditing facility. The first example generates an audit record for every session that successfully executes a SELECT on the scott.emp object:

AUDIT SELECT ON scott.emp WHENEVER SUCCESSFUL

The next example generates an audit record for every unsuccessful UPDATE statement on scott.dept. Since most of these failures occur because the user does not have UPDATE access on scott.dept, this can be used to track attempts to update the table inappropriately.

AUDIT UPDATE ON scott.dept BY ACCESS WHENEVER NOT SUCCESSFUL

Get Oracle Database Administration: The Essential Refe now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.