When the Oracle database is started, it encounters bad blocks, especially some underlying tables in the SYSTEM tablespace, such as UNDO $ and OBJ $, which may cause the database to fail to open normally, of course, you can add some hidden parameters to skip the Bad blocks to start the database, or you can use the bbed tool to manually fix the blocks. The following error occurs in a test environment. It can be fixed using the bbed tool.
1. database version
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@www.htz.pw ~ $ Sqlplus/as sysdba
SQL * Plus: Release 11.2.0.3.0 Production on Sun May 25 04:36:03 2014
Copyright (c) 1982,201 1, 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. startup Error
Oracle@www.htz.pw ~ $ Sqlplus/as sysdba
SQL * Plus: Release 11.2.0.3.0 Production on Sun May 25 04:20:44 2014
Copyright (c) 1982,201 1, 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 upted (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
This block is the block used to store the undo $ base table. When the database is started, the undo block needs to be read during restoration. Therefore, an error is reported.
3. Repair Bad blocks with bbed
BBED> verify
DBVERIFY-Verification starting
FILE =/oracle/app/oracle/oradata/orcl1123/system01.dbf
BLOCK = 1, 225
Block Checking: DBA = 4194529, Block Type = KTB-managed data block
Found block already marked specified upted
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 Blocks upt: 0
Total Blocks Influx: 0
Message 531 not found; product = RDBMS; facility = BBED
Here we find that the block is marked as a bad block. In fact, we know that the seq is changed to FF. Now we can modify it back.
BBED> p kcbh
Struct kcbh, 20 bytes @ 0
Ub1 type_kcbh @ 0 0x06
Ub1 frmt_kcbh @ 1 0xa2
Ub1 sparejavaskcbh @ 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 0000 aabe
<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>
Bb> modify/x 00 offset 8188
File:/oracle/app/oracle/oradata/orcl1123/system01.dbf (0)
Block: 225 Offsets: 8188 to 8191 Dba: 0x00000000
------------------------------------------------------------------------
0006 aabe
<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 = 1, 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 Blocks upt: 0
Total Blocks Influx: 0
Message 531 not found; product = RDBMS; facility = BBED
Here we see some things about ITL, because the data was manually submitted during the experiment.
The Error Code indicates that the slot = 20 is locked and occupies itl2.
Below is the dump database. Let's take a look at the lb mark of 21st.
Tl: 58 fb: -- H-FL -- lb: 0x1 cc: 17
Col 0: [2] c1 15
Col 1: [10] 5f 53 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 = 1, 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 Blocks upt: 0
Total Blocks Influx: 0
Message 531 not found; product = RDBMS; facility = BBED
Block does not report an error. Verification passed
4. The database is opened normally.
SQL> alter database open;
Database altered.
Undo block can be accessed normally
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.
Detailed illustration of the entire process of VMware + Linux + Oracle 10G RAC
Install Oracle 11gR2 (x64) in CentOS 6.4)
Steps for installing Oracle 11gR2 in vmwarevm
Install Oracle 11g XE R2 In Debian
Steps for installing Oracle 11gR2 in vmwarevm