ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 对oracle10g data guard(dg)实行不一致性恢复

对oracle10g data guard(dg)实行不一致性恢复

原创 Linux操作系统 作者:wisdomone1 时间:2010-01-31 00:22:35 0 删除 编辑
1,记录误删除备库数据文件的current_scn及resetlogs_change#
SQL> select current_scn from v$database;

CURRENT_SCN
-----------
     576545

2,模拟删除备库的数据文件
    mv line1.dbf line1.dbf.bak
3,关备库,起备库
  
4,恢复备库
   RMAN> restore database;

Starting restore at 29-JAN-10
using channel ORA_DISK_1

skipping datafile 1; already restored to file /oracle/oradata/centos/centos/system01.dbf
skipping datafile 2; already restored to file /oracle/oradata/centos/centos/undotbs01.dbf
skipping datafile 3; already restored to file /oracle/oradata/centos/centos/sysaux01.dbf
skipping datafile 4; already restored to file /oracle/oradata/centos/centos/users01.dbf
skipping datafile 5; already restored to file /oracle/oradata/centos/centos/egg01.dbf
skipping datafile 6; already restored to file /oracle/oradata/centos/centos/what1.dbf
skipping datafile 7; already restored to file /oracle/oradata/centos/centos/five1.dbf
skipping datafile 8; already restored to file /oracle/oradata/centos/centos/unix1.dbf
skipping datafile 9; already restored to file /oracle/oradata/centos/centos/another1.dbf
skipping datafile 11; already restored to file /oracle/oradata/centos/centos/big01.dbf
skipping datafile 12; already restored to file /oracle/oradata/centos/centos/big02.dbf
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00010 to /oracle/oradata/centos/centos/line1.dbf
channel ORA_DISK_1: reading from backup piece /oracle/product/10.2.0/db_1/dbs/07l4m2a8_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/oracle/product/10.2.0/db_1/dbs/07l4m2a8_1_1 tag=TAG20100129T121047
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
Finished restore at 29-JAN-10

RMAN> recover database until scn 576546;

Starting recover at 29-JAN-10
using channel ORA_DISK_1

starting media recovery

unable to find archive log
archive log thread=1 sequence=2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 01/29/2010 12:23:56
RMAN-06054: media recovery requesting unknown log: thread 1 seq 2 lowscn 576546;--此错误不用理会

5,打开备库
  alter database open;--resetlogs


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9240380/viewspace-626466/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
提供针对oracle初学者及进阶的数据库培训,欢迎大家咨询: 微信: wisdomone 微信公众号: lovedb 工作经历: 中国普天 北京科蓝 北京云和恩墨 北京神州新桥

注册时间:2008-04-04

  • 博文量
    2189
  • 访问量
    12689917