User Tools

Site Tools


databaseauditing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
databaseauditing [2015/07/21 08:30] – [Purging Audit Trail] z0hpvkdatabaseauditing [2025/03/08 22:24] (current) – external edit 127.0.0.1
Line 19: Line 19:
 This still means that failed logins are audited. This still means that failed logins are audited.
  
-==== View Audit Trail ====+==== Viewing Audit Trail ====
  
 SQL below will show everything that has been audited today SQL below will show everything that has been audited today
Line 25: Line 25:
 <code>alter session set nls_date_format = 'DD-MON-YYYY HH24:MI'; <code>alter session set nls_date_format = 'DD-MON-YYYY HH24:MI';
 set linesize 160 set linesize 160
-col os_username format a20 +col os_username format a15 
-col userhost format a25+col userhost format a45
  
-select os_username, username, action, userhost, timestamp +select os_username, username, returncode, userhost, timestamp 
 from dba_audit_trail  from dba_audit_trail 
 where timestamp > trunc(sysdate) where timestamp > trunc(sysdate)
Line 43: Line 43:
 /</code> /</code>
  
-Create a job to set Archive Time. In this case it will be over 30 days+Create a job to set the Archive Timestamp. In this case it will be over 30 days
 <code>BEGIN <code>BEGIN
   DBMS_SCHEDULER.CREATE_JOB (   DBMS_SCHEDULER.CREATE_JOB (
Line 58: Line 58:
 /</code> /</code>
  
-Create a purge job which will delete all audit entries older than the Archive Time.+Create a purge job which will delete all audit entries older than the Archive Timestamp.
 <code>BEGIN <code>BEGIN
   DBMS_AUDIT_MGMT.CREATE_PURGE_JOB(   DBMS_AUDIT_MGMT.CREATE_PURGE_JOB(
databaseauditing.1437467407.txt.gz · Last modified: 2025/03/08 22:23 (external edit)