Move aud$和fga_log$資料到其它Tablespace

byfree發表於2013-09-24
1.檢視AUD$和FGA_LOG$所在表空間
SELECT table_name, tablespace_name FROM dba_tables WHERE table_name IN ('AUD$', 'FGA_LOG$') ORDER BY table_name;
2.檢視AUD$和FGA_LOG$資料量
select segment_name,bytes/1024/1024 size_in_megabytes from dba_segments where segment_name in ('AUD$','FGA_LOG$');
3.建立audit_tbs表空間
create tablespace audit_tbs datafile '/u01/app/oracle/oradata/prod/audit_tbs01.dbf' size 100M autoextend on;
4.move AUD$和FGA_LOG$
SQL> 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 => 'AUDIT_TBS');
END;
/
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;
/
5.檢視move後的AUD$和FGA_LOG$所在表空間
SELECT table_name, tablespace_name FROM dba_tables WHERE table_name IN ('AUD$', 'FGA_LOG$') ORDER BY table_name;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17997/viewspace-773317/,如需轉載,請註明出處,否則將追究法律責任。

相關文章