Oracle REDO損壞
Oracle REDO損壞
一:透過警告日誌alert_PROD2.log定位損壞的redolog名稱和所屬日誌組;
二:透過v$log檢視損壞redolog狀態;
三:
(1)如果狀態為STATUS=INACTIVE,ARC=YES;
說明已經完成歸檔,可以透過下面的命令清空損壞的日誌組,並且不會造成資料丟失;
SQL> alter database clear logfile group 2;
---數字代表組號
(2)如果狀態為STATUS=ACTIVE,表示正在歸檔,清空日誌組可能會丟失部分資料;
SQL> alter database clear unarchived logfile group 2;
---DG環境下如果執行了這個命令需要重新搭建DG
(3)如果狀態為STATUS=CURRENT,即當前日誌組損壞;
非歸檔模式無備份:
sql>startup mount;
sql>alter system set "_allow_resetlogs_corruption"=true
scope=spfile;
sql>shutdown immediate;
sql>startup mount;
sql>recover database until cancel;
sql>alter database open resetlogs;
歸檔模式下,有備份
# database point-in-time recovery
SQL> startup mountSQL> restore database until scn 1335185;
SQL> recover database until scn 1335185;
SQL> alter database open resetlogs;
===========================================================
案例:
DB:11.2.0.3.0
OS:Enterprise Linux Enterprise Linux Server release 5.4
故障:啟動資料庫報錯ORA-00333
SQL> startup
ORACLE instance started.
Total System Global Area 941600768 bytes
Fixed Size 1348860 bytes
Variable Size 524290820 bytes
Database Buffers 411041792 bytes
Redo Buffers 4919296 bytes
Database mounted.
ORA-00333: redo log read error block 12158 count 4011
警告日誌:
Started redo scan
Incomplete read from log member '/u01/app/oracle/oradata/PROD2/redo02.log'. Trying next member.
Aborting crash recovery due to error 333
Errors in file /u01/app/oracle/diag/rdbms/prod2/PROD2/trace/PROD2_ora_5470.trc:
ORA-00333: redo log read error block 12158 count 4011
Errors in file /u01/app/oracle/diag/rdbms/prod2/PROD2/trace/PROD2_ora_5470.trc:
ORA-00333: redo log read error block 12158 count 4011
ORA-333 signalled during: ALTER DATABASE OPEN...
SQL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 INACTIVE
3 INACTIVE
2 CURRENT
/*
SQL> alter database clear logfile group 2;
alter database clear logfile group 2
*
ERROR at line 1:
ORA-01624: log 2 needed for crash recovery of instance PROD2 (thread 1)
ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/PROD2/redo02.log'
SQL> alter database clear unarchived logfile group 2;
alter database clear unarchived logfile group 2
*
ERROR at line 1:
ORA-01624: log 2 needed for crash recovery of instance PROD2 (thread 1)
ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/PROD2/redo02.log'
*/
SQL> alter system set "_allow_resetlogs_corruption"=TRUE scope=spfile;
SQL> shutdown immediate
SQL> startup
ORACLE instance started.
Total System Global Area 941600768 bytes
Fixed Size 1348860 bytes
Variable Size 524290820 bytes
Database Buffers 411041792 bytes
Redo Buffers 4919296 bytes
Database mounted.
ORA-00333: redo log read error block 12158 count 4011
SQL> recover database until cancel;
ORA-00279: change 990943 generated at needed for thread 1
Specify log: {=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/app/oracle/oradata/PROD2/system01.dbf'
ORA-01112: media recovery not started
SQL> alter database open resetlogs;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29785807/viewspace-2139043/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- redo日誌損壞
- oracle - redo 損壞或刪除處理方法Oracle
- 【Oracle】Current online Redo 和 Undo 損壞的處理方法Oracle
- oracle redo各種狀態(inactive、active、current)損壞的處理方式Oracle Redo
- REDO檔案丟失或者損壞的恢復
- redo損壞修復啟動資料庫辦法資料庫
- Online Redo Log損壞處理實驗(上)
- Online Redo Log損壞處理實驗(中)
- Online Redo Log損壞處理實驗(下)
- Oracle資料庫塊的物理損壞與邏輯損壞Oracle資料庫
- Undo和Current Online Redo損壞的處理方法
- Current online Redo 和 Undo 損壞的處理方法
- oracle10g rac 表決盤損壞、ocr損壞處理Oracle
- Redo Log File(inactive、active)損壞,處理恢復對策
- REDO日誌損壞,非歸檔模式資料檔案恢復模式
- Oracle asm磁碟損壞異常恢復OracleASM
- Oracle 控制檔案損壞解決方案Oracle
- ORACLE中修復資料塊損壞Oracle
- Oracle online redo log日誌 (當前或非當前日誌) 損壞之後的DB恢復Oracle
- Oracle塊損壞恢復(有rman備份)Oracle
- (轉)oracle redolog損壞的處理辦法Oracle Redo
- Oracle資料庫UNDO損壞後的恢復Oracle資料庫
- Oracle中匯出修復資料塊損壞Oracle
- Oracle中模擬修復資料塊損壞Oracle
- 伺服器Oracle資料庫損壞修復伺服器Oracle資料庫
- 資料塊損壞ORA-1578(發現損壞塊)
- index損壞恢復Index
- undo 檔案損壞
- 線上日誌損壞
- 處理塊損壞
- 轉載:Oracle資料塊損壞恢復總結Oracle
- Oracle不同檔案丟失/損壞的恢復方法Oracle
- 陣列櫃故障造成控制檔案損壞,資料檔案損壞陣列
- 如何查詢損壞塊
- 【REDO】Oracle redo undo 學習Oracle Redo
- 處理 Oracle 塊損壞 (文件 ID 1526911.1)Oracle
- Oracle升級導致ocr檔案損壞一例Oracle
- oracle crs voting disk損壞一例(asm+rac)OracleASM