對oracle10g data guard(dg)實行不一致性恢復

wisdomone1發表於2010-01-31
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部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-626466/,如需轉載,請註明出處,否則將追究法律責任。

相關文章