4. Implementing Security Auditing : Security Auditing : Access to the Security Audit Log : Querying the Registered Virtual Table
 
Share this page                  
Querying the Registered Virtual Table
After the security audit log is registered, any user with the auditor privilege can perform queries on the registered virtual table to view its contents.
For example, to obtain all events by the user spy against the database securedb, query the table sal1 as follows:
SELECT audittime, auditstatus, auditevent,
    objecttype, objectname, description
  FROM sal1
  WHERE DATABASE = 'securedb' AND user_name = 'spy'
  ORDER BY audittime;
The result of the query might be similar to the following:
       audittime  auditstatus  auditevent  objecttype  objectname  descrpt
01‑Jan‑2008 01:00            N      SELECT       TABLE    salaries  Attempt to
                                                                   access a TABLE
                                                                   01-Jan-2008