[重慶思莊每日技術分享]-備庫使用RMAN獲得歸檔日誌

xianhua_33發表於2022-03-21

原來在主備庫上發現日誌應用存在異常時,都是通過拷貝的方式將歸檔日誌從主庫傳到備庫,然後註冊應用

在備庫通過RMAN來獲取歸檔日誌更加簡單

1.在主庫確認歸檔序號

select NAME,DEST_ID,THREAD#,SEQUENCE#,COMPLETION_TIME,REGISTRAR,APPLIED,DELETED from v$ARCHIVED_LOG where SEQUENCE# between 44561 and 44566 and THREAD#=1 and DEST_ID=1;

2.在備庫執行獲取歸檔命令

rman target sys/oracle@primary auxiliary sys/oracle@standby

backup as copy archivelog sequence between 44561 and 44566 thread 1 auxiliary format '+DATA';

backup as copy archivelog sequence between 44159 and 44160 thread 2 auxiliary format '+DATA';

3.在備庫註冊歸檔,少量使用alter命令;多量使用catalog命令。

alter database register physical logfile '歸檔路徑';

catalog start with '+DATA/dghxa/archivelog/';


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

相關文章