Scene
The database throws the following error at startup
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: [4194], [7], [7], [], [], [], [], []
Starting an error from the database can be seen in the recursive call to SQL errors, the final error is ora-600[4194].
Here try to block all undo segment to start, get the result or error. Add parameters by creating Pfile manually, turn on trace to see problem points
Database start mount state, recover DB;
Oradebug Setmypid
Oradebug Unlimit
Information before and after--dump rollback segment rollback
ALTER session SET Events ' 10015 Trace name context forever, Level 10 ';
--Error Errorstack
ALTER session SET Events ' 604 trace trace name errorstack level 10 ';
--sql Execution Order
ALTER session SET Events ' 10046 Trace name Context forever, Level 12 ';
Oradebug Tracefile_name
Analysis
See from Trace 10046.
----------------------------------------------
Wait #2: nam= ' control file sequential read ' ela= file#=0 block#=1 blocks=1 obj#=-1 tim=3207213661467
Wait #2: nam= ' control file sequential read ' ela= file#=1 block#=1 blocks=1 obj#=-1 tim=3207213661491
Wait #2: nam= ' control file sequential read ' ela= file#=2 block#=1 blocks=1 obj#=-1 tim=3207213661512
Wait #2: nam= ' control file sequential read ' ela= 8 file#=0 block#=15 Blocks=1 obj#=-1
Wait #2: nam= ' control file sequential read ' ela= 8 file#=0 block#=17 Blocks=1 obj#=-1
2015-08-25 18:18:56.341
Ksedmp:internal or fatal error
Ora-00600:internal error code, arguments: [4194], [7], [7], [], [], [], [], []
Current SQL statement for this session:
Update undo$ Set name=:2,file#=:3,block#=:4,status$=:5,user#=:6,undosqn=:7,xactsqn=:8,scnbas=:9,scnwrp=:10,inst#= : 11,ts#=:12,spare1=:13 where Us#=:1
The problem occurs when you see SQL Updata undo$ table.
Call stack
-----Call Stack Trace-----
Calling call entry argument values in hex
Location type point (? means dubious value)
-------------------- -------- -------------------- ----------------------------
ksedst+001c bl ksedst1 000000000? ffffffffffd868e?
ksedmp+0290 bl ksedst 104a2c670?
ksfdmp+0018 BL 03F263A4
kgeriv+0108 BL _ptrgl
Error 607 found in the attempt file because there is ORA-607 in the previous error number
Dump Event Group for session
10046 Trace name context level, forever
10015 Trace name context level, forever
Dump Event Group for SYSTEM
Error message 607 in Redo application callback-->607
– View the redo information below
typ:0 Cls:16 Afn:1 dba:0x00400191-->undo block address obj:4294967295 scn:0x0001.2483756a seq:1 op:5.1-->Undo blocks or Undo Segme NT Header-kturdb
Ktudb redo:siz:256 spc:6602 flg:0x0012 seq:0x0040 rec:0x07
xid:0x0000.03e.0000003d
Ktubl redo:slt:62 rci:0 opc:11.1 objn:15 objd:15
Undo Type:regular Undo Begin Trans Last buffer Split:no
Temp Object:no
Tablespace Undo:no
0x00000000 Prev CTL uba:0x00400191.0040.06-->uba Address
Prev CTL Max CMT SCN:0X0001.24833CCB prev TX CMT SCN:0X0001.24833D19
TXN start scn:0xffff.ffffffff logon user:0 prev brb:4194701 prev bcl:0 undo Record:
KTB Redo
op:0x04 ver:0x01
Op:l itl:xid:0x0000.028.0000003d uba:0x00400191.0040.06
FLG:C---lkc:0 scn:0x0001.248372a6
KDO Op code:urp Row Dependencies Disabled
Xtype:xa flags:0x00000000 bdba:0x0040006a hdba:0x00400069
--> Update block address--> The area header address of the update block (possibly a bitmap)
Itli:1 ispac:0 maxfr:4863
tabn:0 Slot:9 (0x9) flag:0x2c lock:0 ckix:0
Ncol:17 Nnew:12 size:0
Col 1: [9] 5f 4d-->_syssmu9$
Col 2: [2] C1-->2
Col 3: [2] C1-->
Col 4: [3] C2-->
Col 5: [6] C5 0d 25 37 21
Col 6: [2] C1 02
Col 7: [4] C3 0d 11 58
Col 8: [4] C3 05 63 43
Col 9: [1] 80
Col: [2] C1 06
Col: [2] C1 02
Col: [2] C1 02
Blocks after image is corrupt:
Buffer tsn:0 rdba:0x00400191 (1/401)
scn:0x0001.2483756a seq:0x01 flg:0x04 tail:0x756a0201
frmt:0x02 chkval:0xc677 type:0x02=ktu UNDO block
Hex dump of Block:st=0, typ_found=1
10046-bound variable
Parsing in CURSOR #2 len=148 dep=1 uid=0 oct=6 lid=0 tim=3207213633716 hv=3540833987 ad= ' 6e989e58 '
UPDATE undo$
SET Name=:2,
File#=:3,
Block#=:4,
Status$=:5,
User#=:6,
Undosqn=:7,
Xactsqn=:8,
Scnbas=:9,
Scnwrp=:10,
Inst#=:11,
Ts#=:12,
Spare1=:13
WHERE us#=:1
End of STMT
PARSE #2: c=10000,e=18293,p=5,cr=44,cu=0,mis=1,r=0,dep=1,og=4,tim=3207213633715
Binds #2:
Kkscoacd
Bind#0
Value= "_syssmu9$"
Bind#1
value=2
Bind#2
value=137
Bind#3
Value=6
Bind#4
Value=1
Bind#5
value=49866
Bind#6
value=121687
Bind#7
value=612365432
Bind#8
Value=1
Bind#9
Value=0
Bind#10
Value=1
Bind#11
Value=1
Bind#12
Value=9
Verify
Col name for A40
Select F_get_from_dump (replace (' 5f 4d ', ', ', '), ' varchar2 ') name from dual;
The information from the binding variable information is the same as that of the dump.
Some of the above values already show most of the meaning. Below we focus on a few points.
xid:0x0000.028.0000003d uba:0x00400191.0040.06
Xid=undo.segment.number+transaction.table.slot.number+wrap
Uba=address.of.last.undo.block.used+sequence+last.entry.in.undo.record.map
You can see from the XID that this undo segment segment number is 0. The system undo segment.
Uba for 0x00400191.
Now we know the address of undoblock, so we can go to dump the next block of information
RDBA 0x00400191
rdba:0x400191 (4194705) file:1, block:401
Dump Undo segment Header and undo block
alter system dump DataFile ' XXXX/SYSTEM01.DBF ' block 9;
alter system dump DataFile ' XXXX/SYSTEM01.DBF ' block 401;
Reason
Undo Segment Header Information
TRN CTL:: seq:0x0040 chd:0x003e ctl:0x0028 inc:0x00000000 nfb:0x0001 --> an idle list
& nbsp; mgc:0x8002 xts:0x0068 flg:0x0001 opt:2147483646 ( 0x7ffffffe)
uba:0x00400191.0040.06 SCN: 0X0001.24833CCB
--> The next time you use this block and the information above has been
VERSION:0X01
Free block pool:: -->freelist
uba:0x00400191.0040.06 ext:0x4&n Bsp spc:0x19ca --> 6602
uba:0x00000000.0035.37 ext:0x5 spc:0x80c
  &N Bsp uba:0x00000000.0034.37 ext:0x4 spc:0x550
uba:0x00000000.0000.00 ext:0x0 spc:0x0 uba:0x00000000.0000.00 ext:0x0 spc:0x0
The information found in Uba and above has been. Then view the undo block
Dump undo blocks
********************************************************************************
UNDO BLK:
XID: 0x0000.03e.0000003d seq:0x40 cnt:0x7 irb:0x7 icl:0x0 flg:0x0000
&NBSP
rec offset rec offset Rec Offset Rec offset rec Offset
---------------------------------- -----------------------------------------
0x01 0x1ee8 0x02 0x1de8 0x03 0x1ce8 0x04 0x1be8 0x05 0x1ae8
0x06 0x19e8 0x07 0x18e8 --> This shows Last.entry as 0x07
We all know Uba's last representative, Last.Entry.in.UNDO.Record.Map. There's been a problem here. The record for the 6,block is 7. So we find out why. Undo Segment Header record information is inconsistent with undo block.
Fixed
Here are two ways to repair
1. Change to undo segment block and undo block information consistent
2. Let undo use this block/or start from scratch
Undo_block.png
– Method One:
Refer to my previous operation cases
http://www.traveldba.com/archives/650
System Undo Block Calculation method
The space used for such blocks is Block_size–block_header_size (KCBH) –tailchk (4)
Everyone is worth the use of Oracle blocks from bottom to top. If I tell you my last record from offset is 6000, this is 6000 to blocksize-4 space is all used. So here compute the use space for
The size used is: blocsize–tailchk– the start position of the last record Offset–block_header
To be converted into data:
8192-4-0x18e8 (6376)-20 = 1792--Use size
Calculate the remaining space as:
Block_size-block_header_size (KCBH)-Tailchk (4) -14 (undo some basic information)-3*2-use size = free spaces
To be converted into data:
8192-20-4-14-7*2-1792 = 6348
By getting these values, we can modify the
version:0x01
Free Block POOL::-->freelist
uba:0x00400191.0040.06 ext:0x4 Spc:0x19ca--> 6602
Change 06 to 07,0x19ca (6602) to 6348
uba:0x00000000.0035.37 ext:0x5 spc:0x80c
uba:0x00000000.0034.37 ext:0x4 spc:0x550
uba:0x00000000.0000.00 ext:0x0 spc:0x0
uba:0x00000000.0000.00 ext:0x0 spc:0x0
-Method Two
$ bbed
Password:
Bbed:release 2.0.0.0.0-limited Production on Wed Aug 26 09:03:26 2015
Copyright (c) 1982, 2007, Oracle. All rights reserved.
************* !!! For Oracle Internal with only!!! ***************
bbed> SET filename '/oradata/orcl/system01.dbf '
Filename/u02/pic/plhis/system01.dbf
Bbed> Show All
file# 0
block# 1
OFFSET 0
DBA 0x00000000 (0 0,1)
Filename/u02/pic/plhis/system01.dbf
Bifile BIFILE.BBD
ListFile
BLOCKSIZE 8192
MODE Browse
EDIT Unrecoverable
IBase DEC
Obase DEC
WIDTH 80
COUNT 512
LOGFILE LOG.BBD
SPOOL No
bbed> SET Mode Edit
MODE Edit
Bbed> Show All
file# 0
block# 1
OFFSET 0
DBA 0x00000000 (0 0,1)
Filename/u02/pic/plhis/system01.dbf
Bifile BIFILE.BBD
ListFile
BLOCKSIZE 8192
MODE Edit
EDIT Unrecoverable
IBase DEC
Obase DEC
WIDTH 80
COUNT 512
LOGFILE LOG.BBD
SPOOL No
View block Information
Bbed> Set Block 9
block# 9
Bbed> map/v
File:/u02/pic/plhis/system01.dbf (0)
Block:9 dba:0x00000000
------------------------------------------------------------
Unlimited Undo Segment Header
struct KCBH, Bytes @0
Ub1 TYPE_KCBH @0
Ub1 FRMT_KCBH @1
Ub1 SPARE1_KCBH @2
Ub1 SPARE2_KCBH @3
UB4 RDBA_KCBH @4
UB4 BAS_KCBH @8
UB2 WRP_KCBH @12
Ub1 SEQ_KCBH @14
Ub1 FLG_KCBH @15
UB2 CHKVAL_KCBH @16
UB2 SPARE3_KCBH @18
struct Ktech, Bytes @20
UB4 Spare1_ktech @20
Word Tsn_ktech @24
UB4 Lastmap_ktech @28
UB4 Mapcount_ktech @32
UB4 Extents_ktech @36
UB4 Blocks_ktech @40
UB2 Mapend_ktech @44
struct Hwmark_ktech, Bytes @48
struct Locker_ktech, 8 bytes @80
UB4 Flag_ktech @88
struct KTEMH, Bytes @92
UB4 COUNT_KTEMH @92
UB4 NEXT_KTEMH @96
UB4 OBJ_KTEMH @100
UB4 FLAG_KTEMH @104
struct ktetb[6], bytes @108
UB4 KTETBDBA @108
UB4 KTETBNBK @112
struct KTUXC, Bytes @4148
struct KTUXCSCN, 8 bytes @4148
struct Ktuxcuba, 8 bytes @4156
SB2 KTUXCFLG @4164
UB2 Ktuxcseq @4166
SB2 KTUXCNFB @4168
UB4 Ktuxcinc @4172
SB2 Ktuxcchd @4176
SB2 Ktuxcctl @4178
UB2 KTUXCMGC @4180
UB4 ktuxcopt @4188
struct ktuxcfbp[5], bytes @4192
struct ktuxe[255], 10200 bytes @4252
UB4 Ktuxexid @4252
UB4 KTUXEBRB @4256
struct KTUXESCN, 8 bytes @4260
SB4 Ktuxesta @4268
Ub1 KTUXECFL @4269
SB2 Ktuxeuel @4270
UB4 Tailchk @8188
Set the idle list to empty
TRN CTL:: seq:0x0040 chd:0x003e ctl:0x0028 inc:0x00000000 nfb:0x0001--> an idle list
Bbed> Set Offset 4168
OFFSET 4168
Bbed> P
Ktuxc.ktuxcnfb
--------------
SB2 KTUXCNFB @4168 1
Bbed> Dump Count 1
File:/u02/pic/plhis/system01.dbf (0)
Block:9 offsets:4168 to 4168 dba:0x00000000
------------------------------------------------------------------------
00
<32 bytes per line>
Bbed> Dump Count 20
File:/u02/pic/plhis/system01.dbf (0)
Block:9 offsets:4168 to 4187 dba:0x00000000
------------------------------------------------------------------------
00010000 00000000 003e0028 80020001 00680000
<32 bytes per line>
bbed> m 0x0000
Warning:contents of previous bifile would be lost. Proceed? (y/n) Y
File:/u02/pic/plhis/system01.dbf (0)
Block:9 offsets:4168 to 4187 dba:0x00000000
------------------------------------------------------------------------
00000000 00000000 003e0028 80020001 00680000
<32 bytes per line>
Bbed> P
Ktuxc.ktuxcnfb
--------------
SB2 KTUXCNFB @4168 0
Empty undo Block Information
Free Block POOL::-->freelist
uba:0x00400191.0040.06 ext:0x4 Spc:0x19ca--> 6602
Bbed> P KTUXC
struct KTUXC, Bytes @4148
struct KTUXCSCN, 8 bytes @4148
UB4 Kscnbas @4148 0X24833CCB
UB2 KSCNWRP @4152 0x0001
struct Ktuxcuba, 8 bytes @4156
UB4 KUBADBA @4156 0x00400191
UB2 kubaseq @4160 0x0040
Ub1 Kubarec @4162 0x06
SB2 KTUXCFLG @4164 1 (KTUXCFSK)
UB2 ktuxcseq @4166 0x0040
SB2 KTUXCNFB @4168 0
UB4 ktuxcinc @4172 0x00000000
SB2 Ktuxcchd @4176 62
SB2 Ktuxcctl @4178 40
UB2 KTUXCMGC @4180 0x8002
UB4 ktuxcopt @4188 0x7ffffffe
struct ktuxcfbp[0], bytes @4192
struct Ktufbuba, 8 bytes @4192
UB4 KUBADBA @4192 0x00400191
UB2 kubaseq @4196 0x0040
Ub1 Kubarec @4198 0x06
SB2 Ktufbext @4200 4
SB2 KTUFBSPC @4202 6602
struct ktuxcfbp[1], bytes @4204
struct Ktufbuba, 8 bytes @4204
UB4 KUBADBA @4204 0x00000000
UB2 kubaseq @4208 0x0035
Ub1 Kubarec @4210 0x37
SB2 Ktufbext @4212 5
SB2 KTUFBSPC @4214 2060
struct ktuxcfbp[2], bytes @4216
struct Ktufbuba, 8 bytes @4216
UB4 KUBADBA @4216 0x00000000
UB2 kubaseq @4220 0x0034
Ub1 Kubarec @4222 0x37
SB2 Ktufbext @4224 4
SB2 KTUFBSPC @4226 1360
struct ktuxcfbp[3], bytes @4228
struct Ktufbuba, 8 bytes @4228
UB4 KUBADBA @4228 0x00000000
UB2 kubaseq @4232 0x0000
Ub1 Kubarec @4234 0x00
SB2 ktufbext @4236 0
SB2 KTUFBSPC @4238 0
struct ktuxcfbp[4], bytes @4240
struct Ktufbuba, 8 bytes @4240
UB4 KUBADBA @4240 0x00000000
UB2 kubaseq @4244 0x0000
Ub1 Kubarec @4246 0x00
SB2 ktufbext @4248 0
SB2 KTUFBSPC @4250 0
Bbed> P ktuxc.ktuxcfbp[0]
struct ktuxcfbp[0], bytes @4192
struct Ktufbuba, 8 bytes @4192
UB4 KUBADBA @4192 0x00400191
UB2 kubaseq @4196 0x0040
Ub1 Kubarec @4198 0x06
SB2 Ktufbext @4200 4
SB2 KTUFBSPC @4202 6602
Bbed> Set Offset 4192
OFFSET 4192
Bbed> Dump
File:/u02/pic/plhis/system01.dbf (0)
Block:9 offsets:4192 to 4211 dba:0x00000000
------------------------------------------------------------------------
00400191 00400600 000419ca 00000000 00353700
<32 bytes per line>
Bbed> M/x 00000000
File:/u02/pic/plhis/system01.dbf (0)
Block:9 offsets:4192 to 4211 dba:0x00000000
------------------------------------------------------------------------
00000000 00400600 000419ca 00000000 00353700
<32 bytes per line>
Bbed> P KCBH
struct KCBH, Bytes @0
Ub1 TYPE_KCBH @0 0x0e
Ub1 FRMT_KCBH @1 0xa2
Ub1 SPARE1_KCBH @2 0x00
Ub1 SPARE2_KCBH @3 0x00
UB4 RDBA_KCBH @4 0x00400009
UB4 BAS_KCBH @8 0x248372a6
UB2 WRP_KCBH @12 0x0001
Ub1 SEQ_KCBH @14 0x01
Ub1 FLG_KCBH @15 0x04 (KCBHFCKV)
UB2 CHKVAL_KCBH @16 0xbe32
UB2 SPARE3_KCBH @18 0x0000
Empty FLG_KCBH
Bbed> Set Offset 15
OFFSET 15
Bbed> m/x 00
File:/u02/pic/plhis/system01.dbf (0)
Block:9 offsets:15 to dba:0x00000000
------------------------------------------------------------------------
00be3200 00000000 00000000 00000000 00000000
<32 bytes per line>
Bbed> Set Offset 16
OFFSET 16
Empty Chkval
bbed> m/x 0000
File:/u02/pic/plhis/system01.dbf (0)
Block:9 Offsets:16 to dba:0x00000000
------------------------------------------------------------------------
00000000 00000000 00000000 00000000 00000000
<32 bytes per line>
Bbed> P KCBH
struct KCBH, Bytes @0
Ub1 TYPE_KCBH @0 0x0e
Ub1 FRMT_KCBH @1 0xa2
Ub1 SPARE1_KCBH @2 0x00
Ub1 SPARE2_KCBH @3 0x00
UB4 RDBA_KCBH @4 0x00400009
UB4 BAS_KCBH @8 0x248372a6
UB2 WRP_KCBH @12 0x0001
Ub1 SEQ_KCBH @14 0x01
Ub1 FLG_KCBH @15 0x00 (NONE)
UB2 CHKVAL_KCBH @16 0x0000
UB2 SPARE3_KCBH @18 0x0000
Bbed> P KTUXC
struct KTUXC, Bytes @4148
struct KTUXCSCN, 8 bytes @4148
UB4 Kscnbas @4148 0X24833CCB
UB2 KSCNWRP @4152 0x0001
struct Ktuxcuba, 8 bytes @4156
UB4 KUBADBA @4156 0x00400191
UB2 kubaseq @4160 0x0040
Ub1 Kubarec @4162 0x06
SB2 KTUXCFLG @4164 1 (KTUXCFSK)
UB2 ktuxcseq @4166 0x0040
SB2 KTUXCNFB @4168 0
UB4 ktuxcinc @4172 0x00000000
SB2 Ktuxcchd @4176 62
SB2 Ktuxcctl @4178 40
UB2 KTUXCMGC @4180 0x8002
UB4 ktuxcopt @4188 0x7ffffffe
struct ktuxcfbp[0], bytes @4192
struct Ktufbuba, 8 bytes @4192
UB4 KUBADBA @4192 0x00000000
UB2 kubaseq @4196 0x0040
Ub1 Kubarec @4198 0x06
SB2 Ktufbext @4200 4
SB2 KTUFBSPC @4202 6602
struct ktuxcfbp[1], bytes @4204
struct Ktufbuba, 8 bytes @4204
UB4 KUBADBA @4204 0x00000000
UB2 kubaseq @4208 0x0035
Ub1 Kubarec @4210 0x37
SB2 Ktufbext @4212 5
SB2 KTUFBSPC @4214 2060
struct ktuxcfbp[2], bytes @4216
struct Ktufbuba, 8 bytes @4216
UB4 KUBADBA @4216 0x00000000
UB2 kubaseq @4220 0x0034
Ub1 Kubarec @4222 0x37
SB2 Ktufbext @4224 4
SB2 KTUFBSPC @4226 1360
struct ktuxcfbp[3], bytes @4228
struct Ktufbuba, 8 bytes @4228
UB4 KUBADBA @4228 0x00000000
UB2 kubaseq @4232 0x0000
Ub1 Kubarec @4234 0x00
SB2 ktufbext @4236 0
SB2 KTUFBSPC @4238 0
struct ktuxcfbp[4], bytes @4240
struct Ktufbuba, 8 bytes @4240
UB4 KUBADBA @4240 0x00000000
UB2 kubaseq @4244 0x0000
Ub1 Kubarec @4246 0x00
SB2 ktufbext @4248 0
SB2 KTUFBSPC @4250 0
Bbed>
bbed> sum apply
Check value for File 0, block 9:
Current = 0x0000, required = 0x0000
Bbed> V
Dbverify-verification starting
FILE =/u02/pic/plhis/system01.dbf
Block = 9
Dbverify-verification Complete
Total Blocks examined:1
Total Blocks processed (Data): 0
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
Bbed>
Then open reset logs successfully started the database.