[20190531]ORA-600 kokasgi1故障模拟与恢复.txt
--//昨天看链接:http://www.xifenfei.com/2019/05/ora-600-kokasgi1-recovery.HTML,Google半天看到的还是惜分飞网站的链接.
--//既然他提到sys和system被人重命名,解决相对容易,通过测试说明问题.千万不要在生产系统做这样的测试.
--//再次提醒大家,下载oracle介质要选择官方网站并且要做md5sum,不对坚决不要使用!!一些工具下载也要注意检查里面的一些登录执行的sql脚本.
--//另外千万注意不要使用别人的电脑登录生产系统.以免口令外泄.
--//参考链接:http://blog.itpub.net/267265/vIEwspace-1085037/=>[20140221]login.sql与系统安全.txt
--//另外专业的修复不要找我,我不靠这个赚钱^_^.
1.环境:
[email protected]> @ ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
2.模拟:
[email protected]> select rowID,name from user$ where name like ‘SYS%‘;
ROWID name
------------------ ----------------------------------------
AAAAAKAABAAAADRAAB SYS
AAAAAKAABAAAADUAAL SYSMAN
AAAAAKAABAAAADRAAG SYstem
[email protected]> @ rowID AAAAAKAABAAAADRAAB
OBJECT file BLOCK ROW ROWID_DBA DBA TEXT
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
10 1 209 1 0x4000D1 1,209 alter system dump datafile 1 block 209 ;
[email protected]> @ rowID AAAAAKAABAAAADRAAG
OBJECT file BLOCK ROW ROWID_DBA DBA TEXT
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
10 1 209 6 0x4000D1 1,209 alter system dump datafile 1 block 209 ;
[email protected]> update user$ set name=name||‘DW‘ where name in( ‘SYS‘,‘SYstem‘);
2 rows updated.
[email protected]> commit ;
Commit complete.
[email protected]> select rowID,name from user$ where name like ‘SYS%‘;
ROWID name
------------------ ----------------------------------------
AAAAAKAABAAAADRAAB SYSDW
AAAAAKAABAAAADUAAL SYSMAN
AAAAAKAABAAAADRAAG SYstemDW
[email protected]> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
[email protected]> startup
ORACLE instance started.
Total System Global Area 643084288 bytes
Fixed Size 2255872 bytes
Variable Size 205521920 bytes
Database Buffers 427819008 bytes
Redo Buffers 7487488 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. disconnection forced
ORA-00600: internal error code,arguments: [kokasgi1],[],[]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Process ID: 55795
Session ID: 295 Serial number: 3
--//alert.log记录如下:
Errors in file /u01/app/oracle/diag/rdbms/book/book/trace/book_ora_55795.trc (incIDent=2920815):
ORA-00600: internal error code,[]
IncIDent details in: /u01/app/oracle/diag/rdbms/book/book/incIDent/incdir_2920815/book_ora_55795_i2920815.trc
Incremental checkpoint up to RBA [0x49dc.94c1.0],current log tail at RBA [0x49dc.94ff.0]
Use ADRCI or Support Workbench to package the incIDent.
See Note 411.1 at My Oracle Support for error and packaging details.
Errors in file /u01/app/oracle/diag/rdbms/book/book/trace/book_ora_55795.trc:
ORA-00600: internal error code,[]
Errors in file /u01/app/oracle/diag/rdbms/book/book/trace/book_ora_55795.trc:
ORA-00600: internal error code,[]
Error 600 happened during db open,shutting down database
USER (ospID: 55795): terminating the instance due to error 600
Instance terminated by USER,pID = 55795
ORA-1092 signalled during: ALTER DATABASE OPEN...
opiodr aborting process unkNown ospID (55795) as a result of ORA-1092
Fri May 31 09:41:55 2019
ORA-1092 : opitsk aborting process
3.分析:
[email protected]> @ 10046on 12
old 1: alter session set events ‘10046 trace name context forever,level &1‘
new 1: alter session set events ‘10046 trace name context forever,level 12‘
Session altered.
[email protected]> alter database open ;
alter database open
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. disconnection forced
ORA-00600: internal error code,[]
Process ID: 55895
Session ID: 295 Serial number: 3
[email protected]> @ 10046off
ERROR:
ORA-03114: not connected to ORACLE
--//检查跟踪文件发现:
=====================
PARSING IN CURSOR #140302340540856 len=189 dep=1 uID=0 oct=3 lID=0 tim=1559267635846185 hv=186852205 ad=‘7d1df0b8‘ sqlID=‘2tkw12w5k68vd‘
select user#,password,datats#,tempts#,type#,defrole,resource$,ptime,decode(defschclass,NulL,‘DEFAulT_CONSUMER_GROUP‘,defschclass),spare1,spare4,ext_username,spare2 from user$ where name=:1
END OF STMT
PARSE #140302340540856:c=0,e=269,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1559267635846184
BINDS #140302340540856:
Bind#0
oacdty=01 mxl=32(03) mxlc=00 mal=00 scl=00 pre=00
oacflg=18 fl2=0001 frm=01 csi=852 siz=32 off=0
kxsbbbfp=7f9aaf2b4568 bln=32 avl=03 flg=05
value="SYS"
EXEC #140302340540856:c=1000,e=472,plh=1457651150,tim=1559267635846719
FETCH #140302340540856:c=0,e=9,cr=1,mis=0,tim=1559267635846747
STAT #140302340540856 ID=1 cnt=0 pID=0 pos=1 obj=22 op=‘table ACCESS BY INDEX ROWID USER$ (cr=1 pr=0 pw=0 time=9 us)‘
STAT #140302340540856 ID=2 cnt=0 pID=1 pos=1 obj=46 op=‘INDEX UNIQUE SCAN I_USER1 (cr=1 pr=0 pw=0 time=8 us)‘
CLOSE #140302340540856:c=0,e=4,type=0,tim=1559267635846793
IncIDent 2922415 created,dump file: /u01/app/oracle/diag/rdbms/book/book/incIDent/incdir_2922415/book_ora_55895_i2922415.trc
ORA-00600: internal error code,[]
ORA-00600: internal error code,[]
ORA-00600: internal error code,[]
*** 2019-05-31 09:53:56.717
USER (ospID: 55895): terminating the instance due to error 600
--//往前看可以发现如下:
=====================
PARSING IN CURSOR #140302340501536 len=189 dep=2 uID=0 oct=3 lID=0 tim=1559267635703833 hv=186852205 ad=‘7d1df0b8‘ sqlID=‘2tkw12w5k68vd‘
select user#,spare2 from user$ where name=:1
END OF STMT
PARSE #140302340501536:c=0,e=633,dep=2,tim=1559267635703831
BINDS #140302340501536:
Bind#0
oacdty=01 mxl=32(05) mxlc=00 mal=00 scl=00 pre=00
oacflg=18 fl2=0001 frm=01 csi=852 siz=32 off=0
kxsbbbfp=7f9aaf2aabd0 bln=32 avl=05 flg=05
value="SYSDW"
EXEC #140302340501536:c=999,e=1015,tim=1559267635704985
WAIT #140302340501536: nam=‘db file sequential read‘ ela= 11 file#=1 block#=417 blocks=1 obj#=46 tim=1559267635705054
FETCH #140302340501536:c=0,e=83,p=1,cr=2,r=1,tim=1559267635705108
STAT #140302340501536 ID=1 cnt=1 pID=0 pos=1 obj=22 op=‘table ACCESS BY INDEX ROWID USER$ (cr=2 pr=1 pw=0 time=76 us)‘
STAT #140302340501536 ID=2 cnt=1 pID=1 pos=1 obj=46 op=‘INDEX UNIQUE SCAN I_USER1 (cr=1 pr=1 pw=0 time=67 us)‘
CLOSE #140302340501536:c=0,e=7,tim=1559267635705213
=====================
--//dba = 1,417 是索引I_USER1.也就是修复要禁用这个索引.
4.bbed观察:
Bbed> set dba 1,417
DBA 0x004001a1 (4194721 1,417)
Bbed> find /c SYSDW top
file: /mnt/ramdisk/book/system01.dbf (1)
Block: 417 Offsets: 5864 to 5927 Dba:0x004001a1
------------------------------------------------------------------------------------------------------------------------------------------------
53595344 57000200 4000d100 06085359 5354454d 44570000 004000d2 00100448 49533500 00004000 d2000f0b 4a415641 5f444550 4c4f5900 00004000 d500010a
<64 bytes per line>
Bbed> x /rc *kd_off[87]
rowdata[4] @5855
----------
[email protected]: 0x00 (NONE)
[email protected]: 0x02
keydata[6]: 0x00 0x40 0x00 0xd1 0x00 0x01
data key:
col 0[5] @5864: SYSDW
--//rowID = 0x00 0x40 0x00 0xd1 0x00 0x01,dba 0x004000d1=4194513
--//4194513= alter system dump datafile 1 block 209
Bbed> set dba 1,209
DBA 0x004000d1 (4194513 1,209)
Bbed> p kdbt
struct kdbt[0],4 bytes @106
sb2 kdbtoffs @106 0
sb2 kdbtnrow @108 21
struct kdbt[1],4 bytes @110
sb2 kdbtoffs @110 21
sb2 kdbtnrow @112 22
--//SYS.user$是CLUSTER table中的一个表.
Bbed> x /rcncnnttttncnnnnnccnnncct *kdbr[22]
rowdata[173] @3074
------------
[email protected]: 0x6c (KDRHFL,KDRHFF,KDRHFH,KDRHFC)
[email protected]: 0x02
[email protected]: 22
[email protected]: 1
col 0[5] @3078: SYSDW
col 1[2] @3084: 1
col 2[16] @3087: 8A8F025737A9097A
col 3[1] @3104: 0
col 4[2] @3106: 3
col 5[7] @3109: 2013-08-24 11:37:40
col 6[7] @3117: 2017-02-15 08:35:57
col 7[7] @3125: 2013-08-24 12:07:04
col 8[7] @3133: 2013-08-24 12:07:04
col 9[1] @3141: 0
col 10[0] @3143: *NulL*
col 11[2] @3144: 1
col 12[0] @3147: *NulL*
col 13[0] @3148: *NulL*
col 14[1] @3149: 0
col 15[1] @3151: 0
col 16[22] @3153: DEFAulT_CONSUMER_GROUP
col 17[0] @3176: *NulL*
col 18[1] @3177: 0
col 19[0] @3179: *NulL*
col 20[0] @3180: *NulL*
col 21[62] @3181: S:757313FFE2E6EF9A6335E271A6AC31A5183587AB5A50C8C99611A375F95E
Bbed> x /rcncnnttttncnnnnnccnnncct *kdbr[27]
rowdata[0] @2901
----------
[email protected]: 0x6c (KDRHFL,KDRHFC)
[email protected]: 0x02
[email protected]: 22
[email protected]: 5
col 0[8] @2905: SYstemDW
col 1[2] @2914: 1
col 2[16] @2917: 2D594E86F93B17A1
col 3[1] @2934: 0
col 4[2] @2936: 3
col 5[7] @2939: 2013-08-24 11:37:40
col 6[7] @2947: 2019-02-28 09:14:04
col 7[7] @2955: 2016-08-24 11:45:42
col 8[7] @2963: 2013-08-24 12:07:04
col 9[1] @2971: 0
col 10[0] @2973: *NulL*
col 11[2] @2974: 1
col 12[0] @2977: *NulL*
col 13[0] @2978: *NulL*
col 14[1] @2979: 0
col 15[1] @2981: 0
col 16[22] @2983: DEFAulT_CONSUMER_GROUP
col 17[0] @3006: *NulL*
col 18[1] @3007: 0
col 19[0] @3009: *NulL*
col 20[0] @3010: *NulL*
col 21[62] @3011: S:71B503269929F92E4BC275D2B9EBAB760C5C6D3A6BC4BD408F5EB6A0CF63
--//找到原来的位置.
Bbed> set offset 7000
OFFSET 7000
Bbed> find /c SYS curr
file: /mnt/ramdisk/book/system01.dbf (1)
Block: 209 Offsets: 7413 to 7476 Dba:0x004000d1
------------------------------------------------------------------------------------------------------------------------------------------------
53595354 454d02c1 02104434 44463739 33314142 31333045 33370180 02c10407 78710818 0c262907 78710818 0c2629ff ff0180ff 02c102ff ff018001 80164445
<64 bytes per line>
Bbed> dump /v
file: /mnt/ramdisk/book/system01.dbf (1)
Block: 209 Offsets: 7413 to 7476 Dba:0x004000d1
-----------------------------------------------------------------------------------------------------------
53595354 454d02c1 02104434 44463739 33314142 31333045 33370180 02c10407 l SYstem....D4DF7931AB130E37......
78710818 0c262907 78710818 0c2629ff ff0180ff 02c102ff ff018001 80164445 l xq...&).xq...&)...............DE
<32 bytes per line>
--//7413-5 = 7408
Bbed> set offset +6
OFFSET 7419
Bbed> find /c SYS
file: /mnt/ramdisk/book/system01.dbf (1)
Block: 209 Offsets: 7948 to 8011 Dba:0x004000d1
------------------------------------------------------------------------------------------------------------------------------------------------
53595302 c1021044 34433530 31363038 36423244 43364101 8002c104 07787108 180c2629 07787108 180c2629 ffff0180 ff02c102 ffff0180 01801644 45464155
<64 bytes per line>
Bbed> dump /v
file: /mnt/ramdisk/book/system01.dbf (1)
Block: 209 Offsets: 7948 to 8011 Dba:0x004000d1
-----------------------------------------------------------------------------------------------------------
53595302 c1021044 34433530 31363038 36423244 43364101 8002c104 07787108 l SYS....D4C5016086B2DC6A......xq.
180c2629 07787108 180c2629 ffff0180 ff02c102 ffff0180 01801644 45464155 l ..&).xq...&)...............DEFAU
<32 bytes per line>
--//7948-5 = 7943
Bbed> x /rcncnnttttncnnnnnccnnncct offset 7408
rowdata[4507] @7408
-------------
[email protected]: 0x6c (KDRHFL,KDRHFC)
[email protected]: 0x02
[email protected]: 22
[email protected]: 5
col 0[6] @7412: SYstem
col 1[2] @7419: 1
col 2[16] @7422: D4DF7931AB130E37
col 3[1] @7439: 0
col 4[2] @7441: 3
col 5[7] @7444: 2013-08-24 11:37:40
col 6[7] @7452: 2013-08-24 11:37:40
col 7[0] @7460: *NulL*
col 8[0] @7461: *NulL*
col 9[1] @7462: 0
col 10[0] @7464: *NulL*
col 11[2] @7465: 1
col 12[0] @7468: *NulL*
col 13[0] @7469: *NulL*
col 14[1] @7470: 0
col 15[1] @7472: 0
col 16[22] @7474: DEFAulT_CONSUMER_GROUP
col 17[0] @7497: *NulL*
col 18[1] @7498: 0
col 19[0] @7500: *NulL*
col 20[0] @7501: *NulL*
col 21[62] @7502: S:5E9BBAFD8CE1E16065CAF66B09741B79CC45E9EBAAB3F99F34BF5FCE5445
Bbed> x /rcncnnttttncnnnnnccnnncct offset 7943
rowdata[5042] @7943
-------------
[email protected]: 0x6c (KDRHFL,KDRHFC)
[email protected]: 0x02
[email protected]: 22
[email protected]: 1
col 0[3] @7947: SYS
col 1[2] @7951: 1
col 2[16] @7954: D4C5016086B2DC6A
col 3[1] @7971: 0
col 4[2] @7973: 3
col 5[7] @7976: 2013-08-24 11:37:40
col 6[7] @7984: 2013-08-24 11:37:40
col 7[0] @7992: *NulL*
col 8[0] @7993: *NulL*
col 9[1] @7994: 0
col 10[0] @7996: *NulL*
col 11[2] @7997: 1
col 12[0] @8000: *NulL*
col 13[0] @8001: *NulL*
col 14[1] @8002: 0
col 15[1] @8004: 0
col 16[22] @8006: DEFAulT_CONSUMER_GROUP
col 17[0] @8029: *NulL*
col 18[1] @8030: 0
col 19[0] @8032: *NulL*
col 20[0] @8033: *NulL*
col 21[62] @8034: S:52F9294AFEF93815CFC0D8F13BA88B935944095E6CD1101ECE75290A383E
--//可以发现2条记录的偏移在7408,7943.kdbr记录的是相对偏移从kdbh位置开始,要减去92.
Bbed> p kdbh
struct kdbh,14 bytes @92
ub1 kdbhflag @92 0x00 (NONE)
sb1 kdbhntab @93 2
sb2 kdbhnrow @94 43
sb2 kdbhfrre @96 -1
sb2 kdbhfsbo @98 108
sb2 kdbhfSEO @100 2809
sb2 kdbhavsp @102 5516
sb2 kdbhtosp @104 5516
--//7408 - 92 = 7316,name=‘SYstem‘的记录偏移
--//7943 - 92 = 7851,name=‘SYS‘的记录偏移
Bbed> assign kdbr[22]=7851
Warning: contents of prevIoUs BIfile will be lost. Proceed? (Y/N) y
sb2 kdbr[0] @158 7851
Bbed> assign kdbr[27]=7316
sb2 kdbr[0] @168 7316
Bbed> x /rcncnnttttncnnnnnccnnncct *kdbr[27]
rowdata[4507] @7408
-------------
[email protected]: 0x6c (KDRHFL,KDRHFC)
[email protected]: 0x02
[email protected]: 22
[email protected]: 5
col 0[6] @7412: SYstem
col 1[2] @7419: 1
col 2[16] @7422: D4DF7931AB130E37
col 3[1] @7439: 0
col 4[2] @7441: 3
col 5[7] @7444: 2013-08-24 11:37:40
col 6[7] @7452: 2013-08-24 11:37:40
col 7[0] @7460: *NulL*
col 8[0] @7461: *NulL*
col 9[1] @7462: 0
col 10[0] @7464: *NulL*
col 11[2] @7465: 1
col 12[0] @7468: *NulL*
col 13[0] @7469: *NulL*
col 14[1] @7470: 0
col 15[1] @7472: 0
col 16[22] @7474: DEFAulT_CONSUMER_GROUP
col 17[0] @7497: *NulL*
col 18[1] @7498: 0
col 19[0] @7500: *NulL*
col 20[0] @7501: *NulL*
col 21[62] @7502: S:5E9BBAFD8CE1E16065CAF66B09741B79CC45E9EBAAB3F99F34BF5FCE5445
Bbed> x /rcncnnttttncnnnnnccnnncct *kdbr[22]
rowdata[5042] @7943
-------------
[email protected]: 0x6c (KDRHFL,KDRHFC)
[email protected]: 0x02
[email protected]: 22
[email protected]: 1
col 0[3] @7947: SYS
col 1[2] @7951: 1
col 2[16] @7954: D4C5016086B2DC6A
col 3[1] @7971: 0
col 4[2] @7973: 3
col 5[7] @7976: 2013-08-24 11:37:40
col 6[7] @7984: 2013-08-24 11:37:40
col 7[0] @7992: *NulL*
col 8[0] @7993: *NulL*
col 9[1] @7994: 0
col 10[0] @7996: *NulL*
col 11[2] @7997: 1
col 12[0] @8000: *NulL*
col 13[0] @8001: *NulL*
col 14[1] @8002: 0
col 15[1] @8004: 0
col 16[22] @8006: DEFAulT_CONSUMER_GROUP
col 17[0] @8029: *NulL*
col 18[1] @8030: 0
col 19[0] @8032: *NulL*
col 20[0] @8033: *NulL*
col 21[62] @8034: S:52F9294AFEF93815CFC0D8F13BA88B935944095E6CD1101ECE75290A383E
--OK,修改正确!!
Bbed> sum apply
Check value for file 1,Block 209:
current = 0xb8d7,required = 0xb8d7
--//必须禁用索引,从别的机器获得如下信息.注意版本一定要一致.
[email protected]> select rowID x,a.* from bootstrap$ a where sql_text like ‘%I_USER%‘;
X liNE# OBJ# sql_TEXT
------------------------------ ------------ ------------ ------------------------------------------------------------
AAAAA7AABAAAAIKAAM 11 11 CREATE INDEX I_USER# ON CLUSTER C_USER# PCTFREE 10 INITRANS
2 MAXTRANS 255 STORAGE ( INITIAL 64K NEXT 1024K mineXTENTS
1 MAXEXTENTS 2147483645 PCTINCREASE 0 OBJNO 11 EXTENTS (file
1 BLOCK 216))
AAAAA7AABAAAAIKAAT 46 46 CREATE UNIQUE INDEX I_USER1 ON USER$(name) PCTFREE 10 INITRA
NS 2 MAXTRANS 255 STORAGE ( INITIAL 64K NEXT 1024K mineXTEN
TS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 OBJNO 46 EXTENTS (F
ILE 1 BLOCK 416))
AAAAA7AABAAAAIKAAU 47 47 CREATE UNIQUE INDEX I_USER2 ON USER$(USER#,TYPE#,SPARE1,SPAR
E2) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE ( INITIAL 64
K NEXT 1024K mineXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE
0 OBJNO 47 EXTENTS (file 1 BLOCK 424))
[email protected]> @ rowID AAAAA7AABAAAAIKAAT
OBJECT file BLOCK ROW ROWID_DBA DBA TEXT
------------ ------------ ------------ ------------ -------------------- -------------------- ----------------------------------------
59 1 522 19 0x40020A 1,522 alter system dump datafile 1 block 522 ;
--//继续修改:
Bbed> set dba 1,522
DBA 0x0040020a (4194826 1,522)
Bbed> x /rnnc *kdbr[19]
rowdata[228] @1754
------------
[email protected]: 0x2c (KDRHFL,KDRHFH)
[email protected]: 0x01
[email protected]: 3
col 0[2] @1757: 46
col 1[2] @1760: 46
col 2[197] @1763: CREATE UNIQUE INDEX I_USER1 ON USER$(name) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE ( INITIAL 64K NEXT 1024K mineXTENTS 1 MAXEXTENTS
2147483645 PCTINCREASE 0 OBJNO 46 EXTENTS (file 1 BLOCK 416))
--//修改标识flag=0x3c 表示删除.
Bbed> assign offset 1754=0x3c;
ub1 rowdata[0] @1754 0x3c
Bbed> sum apply
Check value for file 1,Block 522:
current = 0x1ef8,required = 0x1ef8
4.测试:
[email protected]> startup
ORACLE instance started.
Total System Global Area 643084288 bytes
Fixed Size 2255872 bytes
Variable Size 205521920 bytes
Database Buffers 427819008 bytes
Redo Buffers 7487488 bytes
Database mounted.
Database opened.
[email protected]> connect system/oracle
ERROR:
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],[209],[6110],[]
ORA-01017: invalID username/password; logon denIEd
Warning: You are no longer connected to ORACLE.
--//必须修复该块.正好前一阵子做tab$删除恢复时,别人提醒参数_db_always_check_system_ts=false,可以跳过检查.测试看看,
[email protected]> alter system set "_db_always_check_system_ts"=false ;
System altered.
[email protected]> startup mount
ORACLE instance started.
Total System Global Area 643084288 bytes
Fixed Size 2255872 bytes
Variable Size 205521920 bytes
Database Buffers 427819008 bytes
Redo Buffers 7487488 bytes
Database mounted.
[email protected]> alter database open ;
alter database open
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. disconnection forced
ORA-00604: error occurred at recursive sql level 2
ORA-01578: ORACLE data block corrupted (file # 1,block # 209)
ORA-01110: data file 1: ‘/mnt/ramdisk/book/system01.dbf‘
Process ID: 56447
Session ID: 295 Serial number: 3
--//昏,已经标志坏块.
Bbed> set dba 1,209)
Bbed> verify
DBVERIFY - Verification starting
file = /mnt/ramdisk/book/system01.dbf
BLOCK = 209
Block Checking: DBA = 4194513,Block Type = KTB-managed data block
Found block already marked corrupted
Bbed> p kcbh.seq_kcbh
ub1 seq_kcbh @14 0xff
Bbed> assign kcbh.seq_kcbh = 0x01
Bbed> p tailchk
ub4 tailchk @8188 0x000006ff
Bbed> assign tailchk=0x00000601
ub4 tailchk @8188 0x00000601
Bbed> sum apply
Check value for file 1,Block 209:
current = 0x016d,required = 0x016d
Bbed> verify
DBVERIFY - Verification starting
file = /mnt/ramdisk/book/system01.dbf
BLOCK = 209
Block Checking: DBA = 4194513,Block Type = KTB-managed data block
data header at 0x1414e5c
kdbchk: the amount of space used is not equal to block size
used=2548 fsc=0 avsp=5516 dtl=8096
Block 209 Failed with check code 6110
--//继续看看参数_db_always_check_system_ts=false是否有效.
[email protected]> connect system/oracle
ERROR:
ORA-01017: invalID username/password; logon denIEd
Warning: You are no longer connected to ORACLE.
[email protected]> connect system/manager
Connected.
--//昏,修复有问题,指向最早的位置,不过应该不影响使用.
@L_419_50@> @ bbvi 1 209
BVI_COMMAND
----------------------------------------------------------------------------------------------------
bvi -b 1712128 -s 8192 /mnt/ramdisk/book/system01.dbf
xxd -c16 -g 2 -s 1712128 -l 8192 /mnt/ramdisk/book/system01.dbf
dd if=/mnt/ramdisk/book/system01.dbf bs=8192 skip=209 count=1 of=1_209.dd conv=notrunc 2>/dev/null
od -j 1712128 -N 8192 -t x1 -v /mnt/ramdisk/book/system01.dbf
hexdump -s 1712128 -n 8192 -C -v /mnt/ramdisk/book/system01.dbf
alter system dump datafile ‘/mnt/ramdisk/book/system01.dbf‘ block 209;
alter session set events ‘immediate trace name set_tsn_p1 level 1‘;
alter session set events ‘immediate trace name buffer level 4194513‘;
9 rows selected.
$ dd if=/mnt/ramdisk/book/system01.dbf bs=8192 skip=209 count=1 of=1_209.dd conv=notrunc 2>/dev/null
$ strings -td -3 1_209.dd | grep SYS
2276 SYstem
2433 SYstem
2591 SYstem
2748 SYstem
2906 SYstemDW
3079 SYSDW
3249 SYstem
3420 SYstem
3592 SYstem
3763 SYstem
3935 SYstem
4106 SYstem
4278 SYstem
4449 SYstem
4621 SYstem
4792 SYstem
4964 SYstem
5135 SYS
5303 SYstem
5475 SYS
5644 GATHER_SYstem_STATISTICS
7413 SYstem
7948 SYS
Bbed> x /rcncnnttttncnnnnnccnnncct offset 5298
rowdata[3027] @5298
-------------
[email protected]: 0x6c (KDRHFL,KDRHFC)
[email protected]: 0x02
[email protected]: 22
@L_404_54@: 5
col 0[6] @5302: SYstem
col 1[2] @5309: 1
col 2[16] @5312: 2D594E86F93B17A1
col 3[1] @5329: 0
col 4[2] @5331: 3
col 5[7] @5334: 2013-08-24 11:37:40
col 6[7] @5342: 2015-11-24 09:13:26
col 7[7] @5350: 2013-08-24 12:07:04
col 8[7] @5358: 2013-08-24 12:07:04
col 9[1] @5366: 0
col 10[0] @5368: *NulL*
col 11[2] @5369: 1
col 12[0] @5372: *NulL*
col 13[0] @5373: *NulL*
col 14[2] @5374: 9
~~~~~~~~~~~~~~~~~~~~
col 15[1] @5377: 0
col 16[22] @5379: DEFAulT_CONSUMER_GROUP
col 17[0] @5402: *NulL*
col 18[1] @5403: 0
col 19[0] @5405: *NulL*
col 20[0] @5406: *NulL*
col 21[62] @5407: S:574F64CF334589628C7754569B8C88C0A2000C907997A2E079AD97B2B0E3
Bbed> x /rcncnnttttncnnnnnccnnncct offset 4959
rowdata[2688] @4959
-------------
[email protected]: 0x6c (KDRHFL,KDRHFC)
[email protected]: 0x00
[email protected]: 22
[email protected]: 5col 0[6] @4963: SYstemcol 1[2] @4970: 1col 2[16] @4973: 2D594E86F93B17A1col 3[1] @4990: 0col 4[2] @4992: 3col 5[7] @4995: 2013-08-24 11:37:40col 6[7] @5003: 2015-11-24 09:13:26col 7[7] @5011: 2013-08-24 12:07:04col 8[7] @5019: 2013-08-24 12:07:04col 9[1] @5027: 0col 10[0] @5029: *NulL*col 11[2] @5030: 1col 12[0] @5033: *NulL*col 13[0] @5034: *NulL*col 14[1] @5035: 0~~~~~~~~~~~~~~~~~~~~~col 15[1] @5037: 0col 16[22] @5039: DEFAulT_CONSUMER_GROUPcol 17[0] @5062: *NulL*col 18[1] @5063: 0col 19[0] @5065: *NulL*col 20[0] @5066: *NulL*col 21[62] @5067: S:574F64CF334589628C7754569B8C88C0A2000C907997A2E079AD97B2B0E3--//一些块没有恢复,不想做了,对应索引也没有修正,下午继续看看.
以上是内存溢出为你收集整理的[20190531]ORA-600 kokasgi1故障模拟与恢复.txt全部内容,希望文章能够帮你解决[20190531]ORA-600 kokasgi1故障模拟与恢复.txt所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)