今天终于到dataguard出现gap,处理步骤做个记录。
现象:备库SCN不再增长了,日志只接受不应用
alert中报警如下
Media Recovery Log /u02/arch/ebdbst/1_8445_862445345.dbf
Media Recovery Waiting for thread 2 sequence 8483
Mon Sep 21 09:42:07 2015
FAL[client]: Failed to request gap sequence
GAP - SCN range: 0x05b3.1602cf0d - 0x05b3.1602cf0d
DBID 2702869330 branch 862445345
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.
-------------------------------------------------------------
解决方案
1. 备库定位SCN
SYS@ebdbst1> col current_scn for 9999999999999999
SYS@ebdbst1> select current_scn from v$database;
CURRENT_SCN
-----------------
6266726567692
2. 主库是否在SCN后创建数据文件,没有就不用在恢复时先创建数据文件了。
SYS@ebdb1 >select file#,name from v$datafile where creation_change# > = 6266726567692;
no rows selected
3. 停止备库的日志应用
alter database recover managed standby database cancel;
4. 主库进行增量备份
rman> backup incremental from scn 6266726567692 database format '/u14/stage/gap_%U.bak' tag 'for_dg_gap';
5. 通过ftp传输备份到 到备库
ftp 10.25.21.11
bin
prom
cd /u02/stage
mput gap_*
6. 备库恢复
备库是RAC双节点,关闭不应用日志的那个节点,然后启动一个实例操作下列步骤
$ srvctl stop instance -d ebdbst -i ebdbst2
$ export ORACLE_SID=ebdbst1
rman> catalog start with '/u02/stage/';
rman> recover database noredo;
7. 主库生成备用控制文件
RMAN> backup current controlfile for standby format '/u14/stage/gap.ctl';
8. ftp 备用控制文件到备库,步骤同5
9. 备库应用备用控制文件,并开始应用日志
RMAN> shutdown immediate;
RMAN> startup nomount;
RMAN> restore standby controlfile from '/u02/stage/gap.ctl';
RMAN> mount database;
sql> alter database recover managed standby database disconnect from session;
全文完!
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29047826/viewspace-1805399/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29047826/viewspace-1805399/