資料庫啟動時遇到ORA-01578錯誤
資料庫啟動的時候遇到壞塊,特別是SYSTEM表空間中的一些底層表,如UNDO$,OBJ$等一些表,會導致資料庫不能正常open,當然我們可以透過增加一些隱藏引數來達到跳過壞塊來啟動資料庫,也可以透過bbed工具來手動修復塊來。下面是自己的一個測試環境遇到這樣的錯誤,透過bbed工具來修復
1,資料庫版本
SQL> select * from v$version;
BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production PL/SQL Release 11.2.0.3.0 - Production CORE 11.2.0.3.0 Production TNS for Linux: Version 11.2.0.3.0 - Production NLSRTL Version 11.2.0.3.0 - Production
[oracle@ ~]$sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sun May 25 04:36:03 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup ORACLE instance started.
Total System Global Area 237998080 bytes Fixed Size 2227216 bytes Variable Size 146801648 bytes Database Buffers 83886080 bytes Redo Buffers 5083136 bytes Database mounted. ORA-01092: ORACLE instance terminated. Disconnection forced ORA-00604: error occurred at recursive SQL level 1 ORA-00607: Internal error occurred while making a change to a data block ORA-00600: internal error code, arguments: [kdBlkCheckError], [1], [225], [6108], [], [], [], [], [], [], [], [] Process ID: 12178 Session ID: 1 Serial number: 5 |
2,啟動報錯
[oracle@ ~]$sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sun May 25 04:20:44 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup ORACLE instance started.
Total System Global Area 237998080 bytes Fixed Size 2227216 bytes Variable Size 146801648 bytes Database Buffers 83886080 bytes Redo Buffers 5083136 bytes Database mounted. ORA-01092: ORACLE instance terminated. Disconnection forced ORA-00604: error occurred at recursive SQL level 1 ORA-01578: ORACLE data block corrupted (file # 1, block # 225) ORA-01110: data file 1: '/oracle/app/oracle/oradata/orcl1123/system01.dbf' Process ID: 1617 Session ID: 1 Serial number: 5
此塊就是儲存undo$基表的塊,在資料庫啟動的時候,做恢復的時候,是需要去讀undo塊的,所以導致報錯 |
3,bbed修復壞塊
BBED> verify DBVERIFY - Verification starting FILE = /oracle/app/oracle/oradata/orcl1123/system01.dbf BLOCK = 225
Block Checking: DBA = 4194529, Block Type = KTB-managed data block Found block already marked corrupted
DBVERIFY - Verification complete
Total Blocks Examined : 1 Total Blocks Processed (Data) : 1 Total Blocks Failing (Data) : 0 Total Blocks Processed (Index): 0 Total Blocks Failing (Index): 0 Total Blocks Empty : 0 Total Blocks Marked Corrupt : 0 Total Blocks Influx : 0 Message 531 not found; product=RDBMS; facility=BBED 這裡發現塊被標記為壞塊,其實這裡知道就是把seq更改為FF了,下面我們修改回來就可以了 BBED> p kcbh struct kcbh, 20 bytes @0 ub1 type_kcbh @0 0x06 ub1 frmt_kcbh @1 0xa2 ub1 spare1_kcbh @2 0x00 ub1 spare2_kcbh @3 0x00 ub4 rdba_kcbh @4 0x004000e1 ub4 bas_kcbh @8 0x0021beaa ub2 wrp_kcbh @12 0x0000 ub1 seq_kcbh @14 0xff ub1 flg_kcbh @15 0x04 (KCBHFCKV) ub2 chkval_kcbh @16 0x4cba ub2 spare3_kcbh @18 0x0000
BBED> set mode edit MODE Edit
BBED> set count 16 COUNT 16
BBED> modify /x 00 offset 14 Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y File: /oracle/app/oracle/oradata/orcl1123/system01.dbf (0) Block: 225 Offsets: 14 to 29 Dba:0x00000000 ------------------------------------------------------------------------ 0004ba4c 00000100 00000f00 0000aabe
<32 bytes per line>
BBED> set offset 8188 OFFSET 8188
BBED> dump File: /oracle/app/oracle/oradata/orcl1123/system01.dbf (0) Block: 225 Offsets: 8188 to 8191 Dba:0x00000000 ------------------------------------------------------------------------ ff06aabe
<32 bytes per line>
BBED> modify /x 00 offset 8188 File: /oracle/app/oracle/oradata/orcl1123/system01.dbf (0) Block: 225 Offsets: 8188 to 8191 Dba:0x00000000 ------------------------------------------------------------------------ 0006aabe
<32 bytes per line>
BBED> p tailchk ub4 tailchk @8188 0xbeaa0600
BBED> sum apply Check value for File 0, Block 225: current = 0x4cba, required = 0x4cba
BBED> verify DBVERIFY - Verification starting FILE = /oracle/app/oracle/oradata/orcl1123/system01.dbf BLOCK = 225
Block Checking: DBA = 4194529, Block Type = KTB-managed data block data header at 0x2a98b8725c kdbchk: row locked by non-existent transaction table=0 slot=20 lockid=1 ktbbhitc=2 Block 225 failed with check code 6101
DBVERIFY - Verification complete
Total Blocks Examined : 1 Total Blocks Processed (Data) : 1 Total Blocks Failing (Data) : 1 Total Blocks Processed (Index): 0 Total Blocks Failing (Index): 0 Total Blocks Empty : 0 Total Blocks Marked Corrupt : 0 Total Blocks Influx : 0 Message 531 not found; product=RDBMS; facility=BBED 這裡看到報了ITL相當的一些東西,原因是由於原來做實驗的時候,手動提交了資料。 報錯程式碼的意思是,slot=20的行被鎖住,佔用了itl2.
下面是dump資料庫看一下第21號的lb標記符 tl: 58 fb: --H-FL-- lb: 0x1 cc: 17 col 0: [ 2] c1 15 col 1: [10] 5f 53 59 53 53 4d 55 32 30 24 col 2: [ 2] c1 02 col 3: [ 2] c1 06 col 4: [ 3] c2 03 49 col 5: [ 5] c4 02 62 0a 09 col 6: [ 1] 80 col 7: [ 3] c2 03 2a col 8: [ 3] c2 02 3e col 9: [ 1] 80 col 10: [ 2] c1 04 col 11: [ 2] c1 06 col 12: *NULL* col 13: *NULL* col 14: *NULL* col 15: *NULL* col 16: [ 2] c1 0
BBED> p *kdbr[20] rowdata[634] ------------ ub1 rowdata[634] @1823 0x2c
BBED> set offset 1823 OFFSET 1823
BBED> dump File: /oracle/app/oracle/oradata/orcl1123/system01.dbf (0) Block: 225 Offsets: 1823 to 1838 Dba:0x00000000 ------------------------------------------------------------------------ 2c011102 c1150a5f 53595353 4d553230 BBED> modify /x 2c00 File: /oracle/app/oracle/oradata/orcl1123/system01.dbf (0) Block: 225 Offsets: 1823 to 1838 Dba:0x00000000 ------------------------------------------------------------------------ 2c001102 c1150a5f 53595353 4d553230
<32 bytes per line>
BBED> sum apply Check value for File 0, Block 225: current = 0x6ec1, required = 0x6ec1
BBED> verify DBVERIFY - Verification starting FILE = /oracle/app/oracle/oradata/orcl1123/system01.dbf BLOCK = 225
DBVERIFY - Verification complete
Total Blocks Examined : 1 Total Blocks Processed (Data) : 1 Total Blocks Failing (Data) : 0 Total Blocks Processed (Index): 0 Total Blocks Failing (Index): 0 Total Blocks Empty : 0 Total Blocks Marked Corrupt : 0 Total Blocks Influx : 0 Message 531 not found; product=RDBMS; facility=BBED
塊不在報錯。驗證透過 |
4,資料庫正常開啟
SQL> alter database open;
Database altered.
undo塊能正常訪問 SQL> select name from undo$;
NAME ------------------------------ SYSTEM _SYSSMU1$ _SYSSMU10$ _SYSSMU11$ _SYSSMU12$ _SYSSMU13$ _SYSSMU14$ _SYSSMU15$ _SYSSMU16$ _SYSSMU17$ _SYSSMU18$
NAME ------------------------------ _SYSSMU19$ _SYSSMU2$ _SYSSMU20$ _SYSSMU3$ _SYSSMU4$ _SYSSMU5$ _SYSSMU6$ _SYSSMU7$ _SYSSMU8$ _SYSSMU9$
21 rows selected. |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27677261/viewspace-1169595/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 資料庫restore時遇到1119錯誤資料庫REST
- 解決升級資料庫時遇到的Text file busy錯誤資料庫
- 啟動資料庫的其中一個錯誤資料庫
- 啟動oracle資料庫的時候報ORA-00205錯誤:Oracle資料庫
- 資料庫啟動出現ORA-27037錯誤資料庫
- 恢復資料庫引數錯誤無法啟動資料庫
- 啟動資料庫出現ORA-9925錯誤資料庫
- dbua後資料庫無法啟動錯誤的解決資料庫
- 啟動資料庫出現ORA-27123錯誤資料庫
- 資料庫啟動出現ORA-27102錯誤資料庫
- 遇到用toad 監控資料庫時的ora-00600 [17281] 錯誤資料庫
- mysql還原資料庫遇到Unknown command 錯誤MySql資料庫
- 一次儲存故障引起的資料庫啟動錯誤資料庫
- AIX系統啟動資料庫出現ORA-27504錯誤AI資料庫
- 資料庫啟動出現ORA-30036錯誤資料庫
- 啟動 Laravel-Sail 服務時遇到的 /usr/bin/env: 'bash\r' 錯誤LaravelAI
- AIX RAC9i 節點2啟動時遭遇到7445錯誤AI
- 嘗試無引數啟動資料庫時報錯ORA-304錯誤資料庫
- 將資料庫設定為ARCHIVELOG模式時遇到ORA-12514錯誤資料庫Hive模式
- 恢復MySQL資料庫建立儲存過程是遇到錯誤MySql資料庫儲存過程
- ORA-39700錯誤(一般升級資料庫容易遇到)資料庫
- SPFILE 錯誤導致資料庫無法啟動(ORA-01565)資料庫
- Linux上資料庫啟動出現ORA-27125錯誤Linux資料庫
- 啟動PHP時提示初始化錯誤PHP
- vmware server啟動時503錯誤解決Server
- 通過資料庫鏈匯出遇到ORA-39126錯誤資料庫
- 以只讀模式開啟物理備庫的時候,遇到ORA-16006錯誤模式
- 又一例SPFILE設定錯誤導致資料庫無法啟動資料庫
- 使用React Hooks時遇到的錯誤提示ReactHook
- 使用flashback database 特性時遇到的錯誤Database
- Ubuntu網站開啟時提示建立資料庫連線錯誤怎麼解決Ubuntu網站資料庫
- mysql 啟動錯誤MySql
- 10G建立資料庫時發生的錯誤資料庫
- 網站資料庫連線時錯誤怎麼辦?網站資料庫
- 惡意程式造成資料庫啟動報錯資料庫
- EXP匯出ORA-01578(資料塊損壞)錯誤解決方法
- 啟動10.2.0.5的OEM時,遇到ssl: Open wallet failed, ret = 28750的錯誤解決方案AI
- sqlplus執行指令碼時遇到錯誤自動停止SQL指令碼