In this Document
| Goal |
| Fix |
| References |
APPLIES TO:
Oracle Database - Enterprise Edition - Version 11.2.0.2 and laterInformation in this document applies to any platform.
***Checked for relevance on 20-FEB-2013***
GOAL
How to move the database audit trail tables( SYS.AUD$ & SYS.FGA_LOG$) to another tablespace using DBMS_AUDIT_MGMT?
FIX
1) Check the current tablespace of the audit trail tables:
SQL> SELECT table_name, tablespace_name FROM dba_tables
WHERE table_name IN ('AUD$', 'FGA_LOG$') ORDER BY table_name; 2
TABLE_NAME TABLESPACE_NAME
------------------------------ ------------------------------
AUD$ SYSAUX
FGA_LOG$ SYSAUX
2) Check the current size of two tables:
SEGMENT_NAME SIZE_IN_MEGABYTES
------------------- -----------------------------
AUD$ 12
FGA_LOG$ .0625
3) Create a new tablespace and make sure that it's size is large enough for the tables that will be moved:
Tablespace created.
4) Move the audit trail tables using procedure DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_LOCATION.
DBMS_AUDIT_MGMT.set_audit_trail_location(
audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD,--this moves table AUD$
audit_trail_location_value => 'AUDIT_TBS');
END;
/
PL/SQL procedure successfully completed.
SQL> BEGIN
DBMS_AUDIT_MGMT.set_audit_trail_location(
audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_FGA_STD,--this moves table FGA_LOG$
audit_trail_location_value => 'AUDIT_TBS');
END;
/
PL/SQL procedure successfully completed.
4) Check whether the tables were moved successfully:
WHERE table_name IN ('AUD$', 'FGA_LOG$') ORDER BY table_name;
TABLE_NAME TABLESPACE_NAME
----------------------- ------------------------------
AUD$ AUDIT_TBS
FGA_LOG$ AUDIT_TBS
NOTE :
=======
The requirement for the introduction of this package came from Audit Vault. Currently it is not supported to use the DBMS_AUDIT_MGMT package on a pre 11gR2(11.2.0.1) instance which is not an Audit Vault source database. Its features include the purge of audit records and can be used to move the audit tables AUD$ and FGA_LOG$ to another tablespace.
Audit Trails with dbms_audit_mgmt, which has been officially introduced/supported in Oracle 11g R2.
REFERENCES
NOTE:1299033.1 - Master Note For Oracle Database AuditingNOTE:731908.1 - New Feature DBMS_AUDIT_MGMT To Manage And Purge Audit Information
NOTE:804624.1 - Known Issues When Using: DBMS_AUDIT_MGMT