REM: The content of blow is not guaranteed to be accurate.
REM: Don’t run any code from the blog in production systems.
In some cases, oracle database can’t handle unexpected behaviors like index corruption, data corruption and then an ora-600 error might be singled and db might be crashed or not. There will be some blog posts about reproducing ora-600 problems in this category.
I have reproduced the following ora-600 errors successfully and I believe more can be reproduced as well as long as I am free to do so:
ora-600 [2662] (Just one scenario without db crash, in other scenarios db might be crashed and can’t be up )
ora-600 [qertbFetchByROWID] (index rowid corruption)
We can use “BBED” to edit the oracle block content to reproduce some ora-600 errors. It’s for sure that we can use “dd” and any editors which can handle binary data to do the same work, but “bbed” is better in the manner that we can use “map” to detect the block structure and also “sum apply” to avoid calculating block check sum manually.
1. Build “bbed”"bbed” is intended to be used by oracle support engineer internally only, thus we have to build it manually in 10g.Special steps should be carried out to make use of “bbed” in 11g.
2. Password and parameter filesOne password should be used to use “bbed”, but I don’t supply the password in this blog, you can simply search it in “google”.Also a parameter files should be used to tell “bbed” that which data files can be explored.
3. Useful commands of “bbed”
+ set: locate the file, block or offset
eg:
set file 4
set block 2000
set file 4 block 2000
set dba 0×100
set mode edit
+ dump: browse the block content with hex dump mode
eg:
dump
dump /v
+ map: to map the block to oracle data struture, the most useful command of “bbed”
eg:
map
map /v
REM: It’s very important to know the meaning of each block data struture; otherwise you don’t know what change can be applied to the block
+ modify: to modify the block content
eg:
modify /x 7890
+ print: to print the value of specific data structure
eg:
print *kdbr[3] (to print the 4th row of data block)
+ sum apply: to change the block checksum value after the change is applied
+ verify: to invoke dbv to check against one block
Things should be considered:
Endian of specific platform: in linux platform (little endian), number 1 might be stored as 01 00, but can be stored as 00 01 in solaris sparc platform (big endian, the same as HPUX, AIX)
Mar 14, 2011
—The end of this blog—