码迷,mamicode.com
首页 > 其他好文 > 详细

Data guard gap恢复

时间:2016-07-14 18:54:12      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:

通过select * from v$archive_gap;或者告警日志检查可以查看是否有归档日志的裂缝

例如:

Media Recovery Waiting for thread 1 sequence 1638

Fetching gap sequence in thread 1, gap sequence 1638-1737

Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE disconnect from session

Wed Jul 13 17:36:44 2016

FAL[client]: Failed to request gap sequence

 GAP - thread 1 sequence 1638-1737

 DBID 1415359633 branch 887578899

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‘s sufficiently large

enough to maintain adequate log switch information to resolve

archivelog gaps.

------------------------------------------------------------

恢复时等待1638的归档日志;

如果归档日志存在可以通过:

alter database register logfile ‘/db/archivelog/1_1868_887578899.dbf‘;

的方法进行注册,注册后会自动恢复

 

几个命令:

当前主库正常 OPEN 状态 、 备库处于日志传送状态 .

在备库停止日志传送

SQL> recover managed standby database cancel;

ALTER DATABASE RECOVER  managed standby database cancel

备库 Read-only 模式打开

SQL> alter database open read only;

备库回到日志传送模式

SQL> recover managed standby database disconnect from session;

ALTER DATABASE RECOVER  managed standby database disconnect from session;

手工令备库应用归档日志

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;

 

备库alter database open read only;后有两种方式,一种是

 recover managed standby database disconnect from session;

这种方式不能应用备库当前的日志文件,再主库做日志切换后会应用日志;

另一种:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;

实时应用日志文件;两边数据保证时时同步;

Data guard gap恢复

标签:

原文地址:http://www.cnblogs.com/leipeng/p/5671261.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!