RMAN-06026報錯解決方法

TaihangMeng發表於2016-09-23

將系統備份,準備恢復至備機上,將spfile,備份拷貝至備機,

1.刪除備機的現有庫

sql>shutdown immediate

sql>startup mount restrict

sql> drop database;

2.使用spfile建立pfile

sql>create pfile from spfile='/home/oracle/2014_03_10/spfileogg.ora';

3.修改pfile,並使用pfile啟動資料庫至nomount

sql>startup nomount pfile='PFILE路徑';

4.使用rman恢復控制檔案,並啟動至mount狀態

rman target /

rman> restore controlfile from 'controlfile備份';

rman>sql 'alter database mount';

rman>catalog start with '備份位置';

5.恢復資料檔案時遇到如下報錯:

 

rman> restore database;

 

RMAN-06026: some targets not found - aborting restore

RMAN-06023: no backup or copy of datafile 4 found to restore

RMAN-06023: no backup or copy of datafile 3 found to restore

RMAN-06023: no backup or copy of datafile 2 found to restore

RMAN-06023: no backup or copy of datafile 1 found to restore

 

從網上找了一些解決方法,多數是oracle9i版本的,使用dbms包來解決,因為我的庫是11g的,沒有能解決問題。

 

還有個朋友有同樣的問題,是個別資料檔案的路徑不對,經檢查我這裡的路徑也不存在問題。

最後通過itpub的howard_zhang的解決方案解決,

rman>list incarnation;

List of Database Incarnations

DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time

------- ------- -------- ---------------- --- ---------- ----------

1       1       OGG      2941743472       PARENT  1          17-SEP-11

2       2       OGG      2941743472       PARENT  995548     24-FEB-14

3       3       OGG      2941743472       CURRENT 1070775    26-FEB-14

rman>reset database to  incarnation 2;

rman>restore database;

rman>recover database;

恢復完成,以resetlogs引數open成功。

 

恢復後查詢了一些incarnation的資料

官方解釋如下:

Listing Database Incarnations

Each time an OPEN RESETLOGS operation is performed on a database, this operation creates a new incarnation of the database. Database incarnations and their effect on database recovery are explained in "Database Incarnations".

 

源文件 <http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmreprt.htm>

Database Incarnations

A database incarnation is created whenever you open the database with the

RESETLOGS option. After complete recovery, you can resume normal operations

without an OPEN RESETLOGS. After a DBPITR or recovery with a backup control file,

however, you must open the database with the RESETLOGS option, thereby creating a

new incarnation of the database. The database requires a new incarnation to avoid

confusion when two different redo streams have the same SCNs, but occurred at

different times. If you apply the wrong redo to your database, then you corrupt it.

The existence of multiple incarnations of a single database determines how RMAN

treats backups that are not in the current incarnation path. Usually, the current

database incarnation is the correct one to use. Nevertheless, in some cases resetting the

database to a previous incarnation is the best approach. For example, you may be

dissatisfied with the results of a point-in-time recovery that you have performed and

want to return the database to a time before the RESETLOGS. An understanding of

database incarnations is helpful to prepare for such situations.

 

總結了一下,主要是首次恢復至catalog start with時因為工作的時候,沒有繼續進行,第二次又重新備份,重新複製了備份檔案,造成此問題,所以將incarnation恢復至之前一個就正常了。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30776559/viewspace-2125388/,如需轉載,請註明出處,否則將追究法律責任。

相關文章