oracle--DG模式备库归档缺失问题
Posted kingle-study
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle--DG模式备库归档缺失问题相关的知识,希望对你有一定的参考价值。
01.问题描述
备库的归档日志没有增加,一直等待一个
查询问题:
SQL> SELECT * FROM V$ARCHIVE_GAP; THREAD# LOW_SEQUENCE# HIGH_SEQUENCE# ---------- ------------- -------------- 1 6434 6435
select name ,sequence# from v$archived_log; NAME SEQUENCE# -------------------------------------------------------------------------------- ---------- /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6414_1000748999.dbf 6414 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6417_1000748999.dbf 6417 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6420_1000748999.dbf 6420 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6421_1000748999.dbf 6421 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6419_1000748999.dbf 6419 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6418_1000748999.dbf 6418 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6425_1000748999.dbf 6425 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6426_1000748999.dbf 6426 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6423_1000748999.dbf 6423 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6422_1000748999.dbf 6422 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6424_1000748999.dbf 6424 NAME SEQUENCE# -------------------------------------------------------------------------------- ---------- /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6366_1000748999.dbf 6366 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6427_1000748999.dbf 6427 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6428_1000748999.dbf 6428 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6429_1000748999.dbf 6429 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6509_1000748999.dbf 6509 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6431_1000748999.dbf 6431 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6432_1000748999.dbf 6432 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6430_1000748999.dbf 6430 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6433_1000748999.dbf 6433 /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6436_1000748999.dbf 6436
二,问题解决思路
01,查看本地库存不存在这个归档日志
??存在就直接手工注册上这个日志文件
手工注册:
alter database register logfile ‘ XXX‘
??如果存在也注册了但是未注册成功的话可能是归档传输过程出现了问题,重新传输然后换个路径应用归档
rman target / catalog start with ‘XXXX‘; ---注册日志
02,查看主库存不存在归档日志
??如果存在的话k拷贝到备库然后手工组测
??如果不存在的话生成基于SCN的备份集
查看备库最小的scn号: select to_char(current_scn) from v$database; select min(checkpoint_change#) from v$datafile; select min(checkpoint_change#) from v$datafile_header; 比对最小的scn 然后再备库生成基于SCn的备份集 backup as compressed backupset incremental from scn $MIN database format ‘/backup/inc_%d_%T_%s_%p‘; backup current controlfile for standby format ‘/backup/inc.ctl‘; 然后scp 传输到备库上 备库恢复备份集 shutdown abort; startup nomount; restore standby controlfile from "/backup/inc.ctl"; alter database mount; catalog start with "/backup/" NOPROMPT; shutdown immediate; startup mount; recover database; 重新开启实时应用归档 alter database recover managed standby database disconnect from session using current logfile;
以上是关于oracle--DG模式备库归档缺失问题的主要内容,如果未能解决你的问题,请参考以下文章