RMAN-06026 錯誤分析與解決
RMAN-06026 錯誤分析與解決
背景:
之前做了基於SCN的不完全恢復,在嘗試恢復的過程中使用了_allow_resetlogs_corruption引數,resetlogs之後,Oracle使用的當前控制檔案不允許
從這個歷史的備份集中進行恢復,從而導致了RMAN-06026這個錯誤,錯誤現象如下:
錯誤現象:
RMAN> restore database;
Starting restore at 26-JUL-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=47 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 07/26/2012 12:41:17
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to 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
錯誤分析:
首先我們的資料庫是肯定做過全備的,但是從如上恢復反饋出來的資訊可以看到沒有資料檔案的備份活複製,那麼這個時候我們可以考慮嘗試的使用
dbms_backup_resetore 這個包來制定路徑進行資料庫的手工恢復,詳細步驟如下:
解決辦法:
執行dbms_backup_restore包來進行恢復:
DECLARE
devtype varchar2(256);
done boolean;
BEGIN
devtype:=sys.dbms_backup_restore.deviceAllocate (type=>'',ident=>'FUN');
sys.dbms_backup_restore.restoreSetDatafile;
sys.dbms_backup_restore.restoreDatafileTo(dfnumber=>01,toname=>'/DBBak2/oradata/WWL/system01.dbf');
sys.dbms_backup_restore.restoreDatafileTo(dfnumber=>02,toname=>'/DBBak2/oradata/WWL/undotbs01.dbf');
sys.dbms_backup_restore.restoreDatafileTo(dfnumber=>03,toname=>'/DBBak2/oradata/WWL/sysaux01.dbf');
sys.dbms_backup_restore.restoreDatafileTo(dfnumber=>04,toname=>'/DBBak2/oradata/WWL/users01.dbf');
sys.dbms_backup_restore.restoreDatafileTo(dfnumber=>05,toname=>'/DBBak2/oradata/WWL/wwl001.dbf');
sys.dbms_backup_restore.restoreDatafileTo(dfnumber=>06,toname=>'/DBBak2/oradata/WWL/wwl002.dbf');
sys.dbms_backup_restore.restoreDatafileTo(dfnumber=>07,toname=>'/DBBak2/oradata/WWL/wwl003.dbf');
sys.dbms_backup_restore.restoreBackupPiece(done=>done,handle=>'/DBSoft/product/10.2.0/db_1/dbs/0pnh23kk_1_1', params=>null);
sys.dbms_backup_restore.deviceDeallocate;
END;
/
執行步驟如下:
1、將資料庫啟動到nomount狀態
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 100663296 bytes
Fixed Size 1217884 bytes
Variable Size 88083108 bytes
Database Buffers 8388608 bytes
Redo Buffers 2973696 bytes
2、執行手工恢復包
SQL>DECLARE
done boolean;
devtype varchar2(256);
done boolean;
BEGIN
devtype:=sys.dbms_backup_restore.deviceAllocate (type=>'',ident=>'FUN');
6 sys.dbms_backup_restore.restoreSetDatafile;
7 sys.dbms_backup_restore.restoreDatafileTo(dfnumber=>01,toname=>'/DBBak2/oradata/WWL/system01.dbf');
sys.dbms_backup_restore.restoreDatafileTo(dfnumber=>02,toname=>'/DBBak2/oradata/WWL/undotbs01.dbf');
sys.dbms_backup_restore.restoreDatafileTo(dfnumber=>04,toname=>'/DBBak2/oradata/WWL/wwl001.dbf');
sys.dbms_backup_restore.restoreDatafileTo(dfnumber=>03,toname=>'/DBBak2/oradata/WWL/users01.dbf');
END;
sys.dbms_backup_restore.restoreDatafileTo(dfnumber=>04,toname=>'/DBBak2/oradata/WWL/wwl001.dbf');
sys.dbms_backup_restore.restoreDatafileTo(dfnumber=>05,toname=>'/DBBak2/oradata/WWL/wwl002.dbf');
sys.dbms_backup_restore.restoreDatafileTo(dfnumber=>06,toname=>'/DBBak2/oradata/WWL/wwl003.dbf');
sys.dbms_backup_restore.restoreBackupPiece(done=>done,handle=>'/DBSoft/product/10.2.0/db_1/dbs/0mnh01jv_1_1', params=>null);
sys.dbms_backup_restore.deviceDeallocate;
END;
16 /
PL/SQL procedure successfully completed.
SQL>
3、生成備份控制檔案的trace
SQL> alter database backup controlfile to trace;
Database altered.
4、重建控制檔案
SQL>CREATE CONTROLFILE REUSE DATABASE "WWL" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 4 (
'/DBBak2/oradata/WWL/redo4a.log',
'/DBBak2/oradata/WWL/redo4b.log'
) SIZE 128M,
GROUP 5 (
'/DBBak2/oradata/WWL/redo5a.log',
'/DBBak2/oradata/WWL/redo5b.log'
) SIZE 128M,
GROUP 6 (
'/DBBak2/oradata/WWL/redo6a.log',
'/DBBak2/oradata/WWL/redo6b.log'
) SIZE 128M,
GROUP 7 (
'/DBBak2/oradata/WWL/redo7a.log',
'/DBBak2/oradata/WWL/redo7b.log'
) SIZE 128M
-- STANDBY LOGFILE
DATAFILE
'/DBBak2/oradata/WWL/system01.dbf',
'/DBBak2/oradata/WWL/undotbs01.dbf',
'/DBBak2/oradata/WWL/sysaux01.dbf',
'/DBBak2/oradata/WWL/users01.dbf',
'/DBBak2/oradata/WWL/wwl01.dbf',
'/DBBak2/oradata/WWL/wwl02.dbf',
'/DBBak2/oradata/WWL/wwl03.dbf'
CHARACTER SET ZHS16CGB231280
Database altered.
5、啟動資料庫
SQL>alter database open resetlogs;
Database altered.
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
WWL OPEN
SQL>
建議最後對資料庫做一次全備。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20674423/viewspace-737071/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 教你快速掌握解決RMAN-06026錯誤的方法
- ORA-03113錯誤分析與解決
- RMAN-06026報錯解決方法
- MySQL常見錯誤分析與解決方法總結MySql
- [Oracle] ORA-03113錯誤分析與解決Oracle
- ora-12523錯誤分析與解決
- mysql與php錯誤解決MySqlPHP
- 案例分析:ora-04031與ora-04030錯誤分析與解決
- zt_RMAN-06026 錯誤分析與解決
- ORACLE常見錯誤程式碼的分析與解決(轉)Oracle
- ORA-00257 錯誤分析及解決方法
- Ocelot錯誤解決
- Python中的UnboundLocalError: variable referenced before assignment錯誤分析與解決PythonError
- ORA-00845的錯誤與解決方案
- VIM 常用錯誤解決
- sqldeveloper for windows 錯誤解決SQLDeveloperWindows
- git合併丟失程式碼問題分析與解決(錯誤操作導致)Git
- vsftpd 錯誤:530 and 500 錯誤解決方法FTP
- 使用Aihubmix API 服務中遇到錯誤與解決AIAPI
- latex 錯誤以及解決方案
- ora-27504錯誤解決
- Datastore error in 'dirbdb'錯誤解決ASTError
- ORA-27054 錯誤解決
- mysql錯誤解決總結MySql
- PbootCMS 404 錯誤解決方法boot
- 【expdp/impdp】 ORA-06502、ORA-39077 錯誤分析與解決方案
- 【故障解決】OGG-00446 錯誤解決
- ORA-04031錯誤分析和解決
- 海外常見的http錯誤程式碼原因與解決HTTP
- Win7安裝錯誤提示與解決辦法Win7
- 寬頻連線錯誤769原因與解決辦法
- dbfread報錯ValueError錯誤解決方法Error
- 【故障解決】ORA-06502錯誤解決
- HTTP 錯誤 500.19- Internal Server Error 錯誤解決方法HTTPServerError
- dns錯誤怎麼辦 dns錯誤的解決辦法DNS
- HTTP代理錯誤怎麼解決?HTTP
- undefined reference to錯誤的解決方法Undefined
- SAXParseException的錯誤解決之二Exception