您好,登錄后才能下訂單哦!
在Oracle 11g,開啟archive log模式時(shí),默認(rèn)歸檔目錄為db_recovery_file_dest指定。此參數(shù)在pfile/spfile中可以指定:
db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
需要在mount狀態(tài)下,更改歸檔模式
ü 啟動(dòng)到mount狀態(tài)
SQL> startup mount;
ü 查看歸檔模式
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 5
Current log sequence 7
ü 修改歸檔路徑,不使用默認(rèn)的路徑
更改log_archive_dest_1參數(shù)可更改歸檔日志目錄(pfile/spfile中參數(shù)db_recovery_file_dest指定的目錄將無效)
SQL> show parameter log_archive_dest_1;
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
log_archive_dest_1 string
修改路徑:
SQL> alter system set log_archive_dest_1='location=/u01/oracle/archivelog' scope=spfile;
ü 重新啟動(dòng)到mount狀態(tài)
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ü 修改成歸檔模式
SQL> alter database archivelog;
Database altered.
ü 檢查歸檔是否生效
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/oracle/archivelog
Oldest online log sequence 5
Next log sequence to archive 7
Current log sequence 7
SQL> alter database open;
SQL> alter system switch logfile;
System altered.
生成歸檔文件:
[oracle@oracle archivelog]$ ls
1_7_888826695.dbf
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。