資料庫歸檔日志
-
在系統建立歸檔路徑
mkdir /u01/arch
-
修改資料庫歸檔日志的路徑參數
alter system set
log_archive_dest_1='location=/u01/arch'
scope=spfile;
show parameter arch
可檢視歸檔日志檔案
-
修改歸檔日志格式
alter system set
log_archive_format='%t_%s_%r.arc'
scope=spfile;
-
關閉資料庫
shutdown immediate;
-
啟動資料庫到MOUNT狀态
startup mount;
-
切換資料庫到歸檔模式
alter database archivelog;
-
打開資料庫
alter database open;
-
手動切換線上重做日志,并驗證歸檔日志檔案
alter system switch logfile;
select name from v$archived_log;