一次dataguard備份恢復到單例項的故障記錄
前期rman恢復都很順利,但是recover的時候有問題報少歸檔檔案,無法RECOVER,
然後alter database open resetlogs繼續報錯,報ORA-03113: end-of-file on communication channel
期間刪除了REDO,重建了REDO,但是依然沒有解決問題。
而且報ORA-03113: end-of-file on communication channel的錯誤,後面並沒有ID資訊的提示。
後來去檢視init.ora檔案,發現與源庫對比少了DG的配置引數,把dg的配置引數primary的部分複製到目標機init.ora檔案裡面,然後用init.ora檔案以mount級別啟動資料庫,然後alter database open resetlogs,資料庫開啟了。
總結:
看來只報ORA-03113: end-of-file on communication channel,有可能就是引數檔案錯誤了。
----------------------------------------------------------------------------------
另外附一份關於REDO全部丟失,沒有備份,如何操作開啟庫。
----------------------------------------------------------------------------------
1.故障環境模擬
首先檢視一下資料字典裡的日誌檔案內容
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
3 ONLINE /u01/app/oracle/oradata/test1/redo03.log NO
2 ONLINE /u01/app/oracle/oradata/test1/redo02.log NO
1 ONLINE /u01/app/oracle/oradata/test1/redo01.log NO
4 STANDBY /u01/app/oracle/oradata/test1/redo04.log NO
5 STANDBY /u01/app/oracle/oradata/test1/redo05.log NO
6 STANDBY /u01/app/oracle/oradata/test1/redo06.log NO
7 STANDBY /u01/app/oracle/oradata/test1/redo07.log
把REDO檔案全部移走
[root@ora_test01 test1]# pwd
/u01/app/oracle/oradata/test1
[root@ora_test01 test1]# ls
control01.ctl redo01.log redo02.log redo03.log redo04.log redo05.log redo06.log redo07.log sysaux01.dbf system01.dbf temp01.dbf undotbs01.dbf users01.dbf
[root@ora_test01 test1]# mv redo* /ora_move/
在服務重啟資料庫
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 780824576 bytes
Fixed Size 2232432 bytes
Variable Size 482348944 bytes
Database Buffers 289406976 bytes
Redo Buffers 6836224 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 2706
Session ID: 191 Serial number: 3
這就報錯了
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
2.故障處理流程
手動重建REDO
SQL> alter database drop logfile group 4;
Database altered.
SQL> alter database drop logfile group 5;
Database altered.
SQL> alter database drop logfile group 6;
Database altered.
SQL> alter database drop logfile group 7;
Database altered.
SQL> alter database add logfile group 4 '/u01/app/redo4.log' size 50m;
Database altered.
SQL> alter database add logfile group 5 '/u01/app/redo5.log' size 50m;
Database altered.
SQL> alter database add logfile group 6 '/u01/app/redo6.log' size 50m;
Database altered.
這裡吧standby的REDO刪除,重建正常的,當然你可以重建standby的,這個無所謂,只為了下面複製的方面,因為REDO最少兩個,所以下面在作業系統級別複製3分REDO,
[root@ora_test01 app]# cp -p redo4.log redo1.log
[root@ora_test01 app]# cp -p redo5.log redo2.log
[root@ora_test01 app]# cp -p redo6.log redo3.log
然後 更改日誌檔案位置
SQL> alter database rename file '/u01/app/oracle/oradata/test1/redo01.log' to '/u01/app/redo1.log' ;
Database altered.
SQL> alter database rename file '/u01/app/oracle/oradata/test1/redo02.log' to '/u01/app/redo2.log' ;
Database altered.
SQL> alter database rename file '/u01/app/oracle/oradata/test1/redo03.log' to '/u01/app/redo3.log' ;
Database altered.
繼續強制開啟,依然報錯,看來還需要recover一下。
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
當還原的時候,提示不需要還原。
SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required
那就強制還原吧,首先設定兩個引數為true,這步驟最好做一下。
SQL> alter system set "_allow_resetlogs_corruption"=true scope=spfile ;
System altered.
SQL> alter system set "_allow_terminal_recovery_corruption"=true scope=spfile ;
System altered.
重啟資料庫
SQL> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 780824576 bytes
Fixed Size 2232432 bytes
Variable Size 482348944 bytes
Database Buffers 289406976 bytes
Redo Buffers 6836224 bytes
Database mounted.
開始強制還原
SQL> recover database until cancel;
Media recovery complete.
然後開啟庫
SQL> alter database open resetlogs ;
Database altered.
成功。
最後把兩個引數還原回去
SQL> alter system set "_allow_resetlogs_corruption"=false scope=spfile ;
System altered.
SQL>
SQL> alter system set "_allow_terminal_recovery_corruption"=false scope=spfile ;
System altered.
重啟庫,測試完成。
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 780824576 bytes
Fixed Size 2232432 bytes
Variable Size 482348944 bytes
Database Buffers 289406976 bytes
Redo Buffers 6836224 bytes
Database mounted.
Database opened.
3.總結
本次操作之適用於REDO丟掉沒備份,沒有歸檔,無法開啟庫的情況。
然後alter database open resetlogs繼續報錯,報ORA-03113: end-of-file on communication channel
期間刪除了REDO,重建了REDO,但是依然沒有解決問題。
而且報ORA-03113: end-of-file on communication channel的錯誤,後面並沒有ID資訊的提示。
後來去檢視init.ora檔案,發現與源庫對比少了DG的配置引數,把dg的配置引數primary的部分複製到目標機init.ora檔案裡面,然後用init.ora檔案以mount級別啟動資料庫,然後alter database open resetlogs,資料庫開啟了。
總結:
看來只報ORA-03113: end-of-file on communication channel,有可能就是引數檔案錯誤了。
----------------------------------------------------------------------------------
另外附一份關於REDO全部丟失,沒有備份,如何操作開啟庫。
----------------------------------------------------------------------------------
1.故障環境模擬
首先檢視一下資料字典裡的日誌檔案內容
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
3 ONLINE /u01/app/oracle/oradata/test1/redo03.log NO
2 ONLINE /u01/app/oracle/oradata/test1/redo02.log NO
1 ONLINE /u01/app/oracle/oradata/test1/redo01.log NO
4 STANDBY /u01/app/oracle/oradata/test1/redo04.log NO
5 STANDBY /u01/app/oracle/oradata/test1/redo05.log NO
6 STANDBY /u01/app/oracle/oradata/test1/redo06.log NO
7 STANDBY /u01/app/oracle/oradata/test1/redo07.log
把REDO檔案全部移走
[root@ora_test01 test1]# pwd
/u01/app/oracle/oradata/test1
[root@ora_test01 test1]# ls
control01.ctl redo01.log redo02.log redo03.log redo04.log redo05.log redo06.log redo07.log sysaux01.dbf system01.dbf temp01.dbf undotbs01.dbf users01.dbf
[root@ora_test01 test1]# mv redo* /ora_move/
在服務重啟資料庫
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 780824576 bytes
Fixed Size 2232432 bytes
Variable Size 482348944 bytes
Database Buffers 289406976 bytes
Redo Buffers 6836224 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 2706
Session ID: 191 Serial number: 3
這就報錯了
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
2.故障處理流程
手動重建REDO
SQL> alter database drop logfile group 4;
Database altered.
SQL> alter database drop logfile group 5;
Database altered.
SQL> alter database drop logfile group 6;
Database altered.
SQL> alter database drop logfile group 7;
Database altered.
SQL> alter database add logfile group 4 '/u01/app/redo4.log' size 50m;
Database altered.
SQL> alter database add logfile group 5 '/u01/app/redo5.log' size 50m;
Database altered.
SQL> alter database add logfile group 6 '/u01/app/redo6.log' size 50m;
Database altered.
這裡吧standby的REDO刪除,重建正常的,當然你可以重建standby的,這個無所謂,只為了下面複製的方面,因為REDO最少兩個,所以下面在作業系統級別複製3分REDO,
[root@ora_test01 app]# cp -p redo4.log redo1.log
[root@ora_test01 app]# cp -p redo5.log redo2.log
[root@ora_test01 app]# cp -p redo6.log redo3.log
然後 更改日誌檔案位置
SQL> alter database rename file '/u01/app/oracle/oradata/test1/redo01.log' to '/u01/app/redo1.log' ;
Database altered.
SQL> alter database rename file '/u01/app/oracle/oradata/test1/redo02.log' to '/u01/app/redo2.log' ;
Database altered.
SQL> alter database rename file '/u01/app/oracle/oradata/test1/redo03.log' to '/u01/app/redo3.log' ;
Database altered.
繼續強制開啟,依然報錯,看來還需要recover一下。
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
當還原的時候,提示不需要還原。
SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required
那就強制還原吧,首先設定兩個引數為true,這步驟最好做一下。
SQL> alter system set "_allow_resetlogs_corruption"=true scope=spfile ;
System altered.
SQL> alter system set "_allow_terminal_recovery_corruption"=true scope=spfile ;
System altered.
重啟資料庫
SQL> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 780824576 bytes
Fixed Size 2232432 bytes
Variable Size 482348944 bytes
Database Buffers 289406976 bytes
Redo Buffers 6836224 bytes
Database mounted.
開始強制還原
SQL> recover database until cancel;
Media recovery complete.
然後開啟庫
SQL> alter database open resetlogs ;
Database altered.
成功。
最後把兩個引數還原回去
SQL> alter system set "_allow_resetlogs_corruption"=false scope=spfile ;
System altered.
SQL>
SQL> alter system set "_allow_terminal_recovery_corruption"=false scope=spfile ;
System altered.
重啟庫,測試完成。
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 780824576 bytes
Fixed Size 2232432 bytes
Variable Size 482348944 bytes
Database Buffers 289406976 bytes
Redo Buffers 6836224 bytes
Database mounted.
Database opened.
3.總結
本次操作之適用於REDO丟掉沒備份,沒有歸檔,無法開啟庫的情況。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17172228/viewspace-1077974/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 單例項備份集恢復到RAC單例
- 單例項備份恢復成RAC單例
- 記錄一次Oracle 11.2.0.4 RAC異地恢復到單例項Oracle單例
- rac恢復到單例項單例
- 從nub備份恢復(同平臺)恢復RAC至單例項單例
- MySQL增量備份與恢復例項MySql
- rac到單例項的rman恢復單例
- RAC asm恢復到單例項ASM單例
- 從dataguard備份的恢復機制
- RMAN例項備份與恢復詳解
- 將RAC備份集恢復為單例項資料庫單例資料庫
- 恢復案例:熱備期間例項故障解決
- rac asm 恢復到 單例項 1ASM單例
- rac asm 恢復到 單例項 2ASM單例
- 【RAC】將單例項備份集恢復為rac資料庫單例資料庫
- 【RAC】將RAC備份集恢復為單例項資料庫單例資料庫
- 單例項環境利用備份恢復RAC資料庫(四)單例資料庫
- 單例項環境利用備份恢復RAC資料庫(三)單例資料庫
- 單例項環境利用備份恢復RAC資料庫(二)單例資料庫
- 單例項環境利用備份恢復RAC資料庫(一)單例資料庫
- RAC從帶庫到單例項的恢復單例
- RMAN異機恢復:RAC到單例項單例
- RAC恢復到單例項節點上單例
- 恢復rac db(raw)到單例項下單例
- Gitlab備份和恢復操作記錄Gitlab
- [記錄]oracle RMAN 備份恢復總結Oracle
- 資料庫的備份與恢復分析及例項資料庫
- 【備份恢復】之RMAN 恢復目錄庫(客戶端備份資訊註冊到目標庫恢復目錄中)客戶端
- RMAN備份恢復——備份到帶庫的效能
- oracle 11C rman 恢復到單例項Oracle單例
- 恢復RAC資料庫到單例項(ASM)資料庫單例ASM
- oracle實驗記錄 (恢復-恢復未備份的資料檔案)Oracle
- oracle實驗記錄 (恢復-rman增量備份)Oracle
- 【備份恢復】利用 備份控制檔案到指定目錄下的控制檔案 恢復控制檔案
- oracle實驗記錄 (恢復-使用resetlogs open前備份恢復)Oracle
- RMAN備份恢復——備份到帶庫的效能(二)
- Oracle 11g Data guard 物理備庫故障恢復重建例項Oracle
- 記一次Kafka叢集的故障恢復Kafka