【DATAGUARD】手工恢復備庫日誌中斷

jichengjie發表於2016-12-14
1、在備庫檢查日誌缺失
FAL[client]: Failed to request gap sequence
 GAP - thread 1 sequence 53415-53434
 DBID 424533136 branch 710350416
FAL[client]: All defined FAL servers have been attempted.
-------------------------------------------------------------
Check that the CONTROL_FILE_RECORD_KEEP_TIME initialization
parameter is defined to a value that is sufficiently large
enough to maintain adequate log switch information to resolve
archivelog gaps.

2 在主庫中查詢缺失的日誌的所在路徑和名稱
SQL>SELECT NAME FROM V$ARCHIVED_LOG WHERE THREAD#=1 AND DEST_ID=1 AND SEQUENCE# BETWEEN 99 AND 109;


3 複製到備庫的相應目錄
oracle@p1a:/home/oracle/arch>scp orcl_53716_710350416.log ss1:/home/oracle/archive_gap/
oracle@ss1's password: 
orcl_53716_710350416.log                                                                                                         100%  389MB  35.3MB/s   00:11    
oracle@p1a:/home/oracle/arch>scp orcl_53717_710350416.log ss1:/home/oracle/archive_gap/
oracle@ss1's password: 

4 手工註冊日誌檔案。
SQL> ALTER DATABASE REGISTER LOGFILE '/home/oracle/archive_gap/orcl_53415_710350416.log';
Database altered.
SQL> ALTER DATABASE REGISTER LOGFILE '/home/oracle/archive_gap/orcl_53416_710350416.log';
Database altered.
SQL> ALTER DATABASE REGISTER LOGFILE '/home/oracle/archive_gap/orcl_53417_710350416.log';
Database altered.
。。。。。。。。。
SQL> ALTER DATABASE REGISTER LOGFILE '/home/oracle/archive_gap/orcl_53432_710350416.log';
Database altered.
SQL> ALTER DATABASE REGISTER LOGFILE '/home/oracle/archive_gap/orcl_53433_710350416.log';
Database altered.
SQL> ALTER DATABASE REGISTER LOGFILE '/home/oracle/archive_gap/orcl_53434_710350416.log';
Database altered.


5 檢視告警日誌
ALTER DATABASE REGISTER LOGFILE '/home/oracle/archive_gap/orcl_53415_710350416.log'
There are 1 logfiles specified.
ALTER DATABASE REGISTER [PHYSICAL] LOGFILE
Completed: ALTER DATABASE REGISTER LOGFILE '/home/oracle/archive_gap/orcl_53415_710350416.log'
Tue Aug 23 11:58:34 2011
Media Recovery Delayed for 1440 minute(s) (thread 1 sequence 53415)
Tue Aug 23 12:00:26 2011
ALTER DATABASE REGISTER LOGFILE '/home/oracle/archive_gap/orcl_53416_710350416.log'
There are 1 logfiles specified.
ALTER DATABASE REGISTER [PHYSICAL] LOGFILE
Resynchronizing thread 1 from sequence 53415 to 53416
Completed: ALTER DATABASE REGISTER LOGFILE '/home/oracle/archive_gap/orcl_53416_710350416.log'
Media Recovery Log /home/oracle/archive_gap/orcl_53416_710350416.log
Tue Aug 23 12:12:36 2011
RFS[2]: Selected log 31 for thread 1 sequence 53837 dbid 424533136 branch 710350416
Tue Aug 23 12:12:42 2011
RFS[1]: Selected log 32 for thread 2 sequence 36957 dbid 424533136 branch 710350416
Tue Aug 23 12:12:43 2011
Media Recovery Log /home/oracle/archive_gap/orcl_53417_710350416.log
Tue Aug 23 12:13:10 2011

6 再次檢視 
SQL> select * from v$archive_gap;
no rows selected
 

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

相關文章