最近在學習rman,恢復的時候報錯,大家看看,怎麼解決

shilei1發表於2011-07-28
最近在學習rman,恢復的時候報錯,大家看看,怎麼解決

SQL> alter database open ;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-19901: database needs more recovery to create new incarnation

網上關於ora-19901的處理好少啊
---------------------------
首先感謝大家的幫助,

1、sqlplus下
recover database until cancel;

2、rman下
restore database;
recover database;

這個方法不行,一,我沒有全表備份,二,我備份了spfile,controlfile,archivelog,spfile和controlfile我都恢復了,沒有異常的問題,主要是archivelog file ,我之前做過backup archivelog all delete input ;後來又重新備份的時候還是這個語句,我在想是不是第一次備份刪除了日誌檔案,第二次備份的時候刪除的檔案找不到了,所以恢復的時候出現問題了??

恢復的時候部分錯誤資訊:

RMAN-03002: failure of recover command at 06/03/2011 09:09:32
RMAN-06053: unable to perform. media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 2429 lowscn 997181116 found to restore

RMAN-06025: no backup of log thread 1 seq 2428 lowscn 997173052 found to restore

RMAN-06025: no backup of log thread 1 seq 2427 lowscn 997165018 found to restore

RMAN-06025: no backup of log thread 1 seq 2426 lowscn 997156390 found to restore

RMAN-06025: no backup of log thread 1 seq 2425 lowscn 997148327 found to restore

RMAN-06025: no backup of log thread 1 seq 2424 lowscn 997142921 found to restore

RMAN-06025: no backup of log thread 1 seq 2423 lowscn 997139905 found to restore

RMAN-06025: no backup of log thread 1 seq 2422 lowscn 997137418 found to restore

RMAN-06025: no backup of log thread 1 seq 2421 lowscn 997132151 found to restore

RMAN-06025: no backup of log thread 1 seq 2420 lowscn 997122744 found to restore

RMAN-06025: no backup of log thread 1 seq 2419 lowscn 997114426 found to restore

RMAN-06025: no backup of log thread 1 seq 2418 lowscn 997105934 found to restore

RMAN-06025: no backup of log thread 1 seq 2417 lowscn 997097451 found to restore

RMAN-06025: no backup of log thread 1 seq 2416 lowscn 997090221 found to restore

RMAN-06025: no backup of log thread 1 seq 2415 lowscn 997083259 found to restore

RMAN-06025: no backup of log thread 1 seq 2414 lowscn 997080987 found to restore

RMAN-06025: no backup of log thread 1 seq 2413 lowscn 997072936 found to restore

RMAN-06025: no backup of log thread 1 seq 2412 lowscn 997065308 found to restore

RMAN-06025: no backup of log thread 1 seq 2411 lowscn 997057305 found to restore

RMAN-06025: no backup of log thread 1 seq 2410 lowscn 997049490 found to restore

RMAN-06025: no backup of log thread 1 seq 2409 lowscn 997041050 found to restore

RMAN-06025: no backup of log thread 1 seq 2408 lowscn 997032588 found to restore

RMAN-06025: no backup of log thread 1 seq 2407 lowscn 997029224 found to restore

RMAN-06025: no backup of log thread 1 seq 2406 lowscn 997025167 found to restore

RMAN-06025: no backup of log thread 1 seq 2405 lowscn 997017988 found to restore

RMAN-06025: no backup of log thread 1 seq 2404 lowscn 997010350 found to restore

RMAN-06025: no backup of log thread 1 seq 2403 lowscn 997002302 found to restore

RMAN-06025: no backup of log thread 1 seq 2402 lowscn 996994913 found to restore

RMAN-06025: no backup of log thread 1 seq 2401 lowscn 996991338 found to restore
------------------------
sqlplus下

1、SQL> recover database using backup controlfile until cancel;

根據提示輸入 redo.log檔案的目錄,如果redo.log檔案不止一個,可以一個一個的嘗試,直到出現以下兩句話:

Log applied.
Media recovery complete.

2、SQL> alter database open resetlogs;
  Database altered.

---------
感謝lks2004,也感謝大家的幫助,

問題按照lks2004的方法解決了,

想再問一下,我從最近的歸檔日誌往回試,為什麼最近的不行,一直到某一個就可以了呢??

------------
不太清楚,
根據猜想,應該是控制檔案也需要用最近的才行,因為控制檔案決定了資料庫某一時刻的資料庫各種檔案資訊。需要控制檔案和資料檔案,日誌檔案同步,否則就恢復不了。

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

相關文章