User Tools

Site Tools


dba:oracle:howtos:audit_mini-howto

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
Next revisionBoth sides next revision
oracle:audit_mini-howto [2020/03/18 11:52] – [Format] dodgerdba:oracle:audit_mini-howto [2022/02/11 11:12] – ↷ Page moved from oracle:audit_mini-howto to dba:oracle:audit_mini-howto dodger
Line 63: Line 63:
 END; END;
 / /
 +  
 +BEGIN 
 +    SYS.DBMS_AUDIT_MGMT.set_audit_trail_location( 
 +        audit_trail_type           => SYS.DBMS_AUDIT_MGMT.AUDIT_TRAIL_UNIFIED, 
 +        audit_trail_location_value => 'SYSAUD'); 
 +END; 
 +/
 </code> </code>
  
Line 510: Line 516:
  
  
 +===== Auditing ALL USER actions =====
 +
 +''audit_trail'' must be st to ''db,extended'':
 +<code sql>
 +alter system set audit_trail=db,extended scope=spfile;
 +</code>
 +
 +Restart is needed for this change to be applied (oracle rules...).
 +
 +Then:
 +<code sql>
 +AUDIT ALL BY THEUSERNAME BY ACCESS;
 +AUDIT SELECT TABLE, UPDATE TABLE, INSERT TABLE, DELETE TABLE BY THEUSERNAME BY ACCESS;
 +AUDIT EXECUTE PROCEDURE BY THEUSERNAME BY ACCESS;
 +</code>
 +
 +Take care, this will insert a huge number of rows in ''sys.aud$''
 ====== Disable audit ====== ====== Disable audit ======
 To simply disable AUDITING on statements: To simply disable AUDITING on statements:
dba/oracle/howtos/audit_mini-howto.txt · Last modified: 2023/01/31 08:28 by dodger