Chinaunix首页 | 论坛 | 博客
  • 博客访问: 217630
  • 博文数量: 57
  • 博客积分: 1376
  • 博客等级: 中尉
  • 技术积分: 658
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-09 09:51
文章分类

全部博文(57)

文章存档

2012年(1)

2011年(56)

分类: Oracle

2011-09-25 22:52:19

1. Check the gap

-- on physical standby, checking:
SELECT * FROM V$ARCHIVE_GAP;

-- on logical standby, checking:
-- If there are no gaps, the query will show only one file for each thread.
COLUMN FILE_NAME FORMAT a55
SELECT THREAD#, SEQUENCE#, FILE_NAME FROM DBA_LOGSTDBY_LOG L
WHERE NEXT_CHANGE# NOT IN
(SELECT FIRST_CHANGE# FROM DBA_LOGSTDBY_LOG WHERE L.THREAD# = THREAD#)
ORDER BY THREAD#,SEQUENCE#;


select sequence#,first_change#,next_change#,timestamp,applied from dba_logstdby_log;



2. Copy the missing archive log file from primary and register this log:

-- physical standby:
alter database register logfile '/physical_standby/xxx.arc';

-- logical standby:
alter database register logical logfile '/logical_standby/xxx.arc';

3. Restart the redo apply or sql apply:

-- restart redo apply, issue on physical standby database:
-- stop redo apply
alter database recover managed standby database cancel;

-- start redo apply
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;


-- restart sql apply, issue on the logical standby database:
-- stop sql apply
ALTER DATABASE STOP LOGICAL STANDBY APPLY;


-- start sql apply
ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;



阅读(1663) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~