码迷,mamicode.com
首页 > 数据库 > 详细

oracle--DG模式备库归档缺失问题(1)

时间:2019-07-26 14:47:36      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:基于   bsp   没有   本地   restore   connect   nbsp   本地库   from   

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模式备库归档缺失问题(1)

标签:基于   bsp   没有   本地   restore   connect   nbsp   本地库   from   

原文地址:https://www.cnblogs.com/kingle-study/p/11249939.html

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