Schema Object Auditing

Schema object auditing lets you track access to an object. The object can be any Oracle table, view, sequence, package, function, procedure, snapshot, library, or directory.

Tip

Oracle will audit embedded objects. That is, if you have turned on auditing for a table, and that table is referenced in a view, then accessing the view will generate an audit record for the table.

The specific syntax for schema object auditing is:

AUDIT object_privilege[,object_privilege ...] ON [schema.]objectname | DEFAULT
   [BY SESSION [WHENEVER [NOT] SUCCESSFUL]
   [BY ACCESS [WHENEVER [NOT] SUCCESSFUL]

Table 7.1 lists the various object privileges and the schema object types to which they can apply. Detailed syntax is provided in Chapter 13.

Table 7-1. Schema Object Audit Privileges Allowed by Object Type

Object Privilege

Object Type Applicable

ALTER

Table, sequence, snapshot

AUDIT

Table, view, sequence, package, procedure, function, snapshot, directory

COMMENT

Table, view, snapshot

CREATE

Table, view, snapshot

DELETE

Table, view, snapshot

EXECUTE

Package, procedure, function, library

GRANT

Table, view, sequence, package, procedure, function, snapshot, library, directory

INDEX

Table, snapshot

INSERT

Table, view, snapshot

LOCK

Table, view, snapshot

READ

Directory

REFERENCES

Table

RENAME

Table, view, package, procedure, function, snapshot

SELECT

Table, view, sequence, snapshot

UPDATE

Table, view, snapshot

WRITE

Directory

You can specify a default level for ...

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.