ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【DATAGUARD】手工恢复备库日志中断

【DATAGUARD】手工恢复备库日志中断

Linux操作系统 作者:xulongxc 时间:2015-08-27 09:14:40 0 删除 编辑
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/29440247/viewspace-1783684/,如需转载,请注明出处,否则将追究法律责任。

全部评论

注册时间:2014-01-13

  • 博文量
    58
  • 访问量
    213941