Move The DB Audit Trails To A New Tablespace

SELECT table_name, tablespace_name FROM dba_tables WHERE table_name IN ('AUD$', 'FGA_LOG$') ORDER BY table_name;


select segment_name,dbms_xplan.FORMAT_SIZE2(bytes) from dba_segments where segment_name in ('AUD$','FGA_LOG$');


CREATE BIGFILE TABLESPACE TS_AUDIT DATAFILE SIZE 1G AUTOEXTEND ON NEXT 512M MAXSIZE UNLIMITED;


BEGIN

    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 => 'TS_AUDIT');

END;

/


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 => 'TS_AUDIT');

END;

/


SELECT table_name, tablespace_name FROM dba_tables WHERE table_name IN ('AUD$', 'FGA_LOG$') ORDER BY table_name;


 

Yorum Gönder

Daha yeni Daha eski