[20190531]ORA-600 kokasgi1故障模拟与恢复.txt
[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.环境:
sys@book> @ 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.模拟:
sys@book> select rowid ,name from user$ where name like 'sys%';
rowid name
------------------ ----------------------------------------
aaaaakaabaaaadraab sys
aaaaakaabaaaaduaal sysman
aaaaakaabaaaadraag system
sys@book> @ rowid aaaaakaabaaaadraab
object file block row rowid_dba dba text
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
10 1 209 1 0x4000d1 1,209 alter system dump datafile 1 block 209 ;
sys@book> @ rowid aaaaakaabaaaadraag
object file block row rowid_dba dba text
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
10 1 209 6 0x4000d1 1,209 alter system dump datafile 1 block 209 ;
sys@book> update user$ set name=name||'dw' where name in( 'sys','system');
2 rows updated.
sys@book> commit ;
commit complete.
sys@book> select rowid ,name from user$ where name like 'sys%';
rowid name
------------------ ----------------------------------------
aaaaakaabaaaadraab sysdw
aaaaakaabaaaaduaal sysman
aaaaakaabaaaadraag systemdw
sys@book> shutdown immediate ;
database closed.
database dismounted.
oracle instance shut down.
sys@book> 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, arguments: [kokasgi1], [], [], [], [], [], [], [], [], [], [], []
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, arguments: [kokasgi1], [], [], [], [], [], [], [], [], [], [], []
errors in file /u01/app/oracle/diag/rdbms/book/book/trace/book_ora_55795.trc:
ora-00600: internal error code, arguments: [kokasgi1], [], [], [], [], [], [], [], [], [], [], []
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.分析:
sys@book> @ 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.
sys@book> alter database open ;
alter database open
*
error at line 1:
ora-01092: oracle instance terminated. disconnection forced
ora-00600: internal error code, arguments: [kokasgi1], [], [], [], [], [], [], [], [], [], [], []
process id: 55895
session id: 295 serial number: 3
sys@book> @ 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,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=1457651150,tim=1559267635846719
fetch #140302340540856:c=0,e=9,p=0,cr=1,cu=0,mis=0,r=0,dep=1,og=4,plh=1457651150,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,dep=1,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, arguments: [kokasgi1], [], [], [], [], [], [], [], [], [], [], []
ora-00600: internal error code, arguments: [kokasgi1], [], [], [], [], [], [], [], [], [], [], []
ora-00600: internal error code, arguments: [kokasgi1], [], [], [], [], [], [], [], [], [], [], []
*** 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#,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 #140302340501536:c=0,e=633,p=0,cr=0,cu=0,mis=1,r=0,dep=2,og=4,plh=0,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,p=0,cr=0,cu=0,mis=1,r=0,dep=2,og=4,plh=1457651150,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,cu=0,mis=0,r=1,dep=2,og=4,plh=1457651150,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,dep=2,type=0,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
----------
flag@5855: 0x00 (none)
lock@5856: 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
------------
flag@3074: 0x6c (kdrhfl, kdrhff, kdrhfh, kdrhfc)
lock@3075: 0x02
cols@3076: 22
ckix@3077: 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
----------
flag@2901: 0x6c (kdrhfl, kdrhff, kdrhfh, kdrhfc)
lock@2902: 0x02
cols@2903: 22
ckix@2904: 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
-------------
flag@7408: 0x6c (kdrhfl, kdrhff, kdrhfh, kdrhfc)
lock@7409: 0x02
cols@7410: 22
ckix@7411: 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
-------------
flag@7943: 0x6c (kdrhfl, kdrhff, kdrhfh, kdrhfc)
lock@7944: 0x02
cols@7945: 22
ckix@7946: 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
-------------
flag@7408: 0x6c (kdrhfl, kdrhff, kdrhfh, kdrhfc)
lock@7409: 0x02
cols@7410: 22
ckix@7411: 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
-------------
flag@7943: 0x6c (kdrhfl, kdrhff, kdrhfh, kdrhfc)
lock@7944: 0x02
cols@7945: 22
ckix@7946: 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
--//必须禁用索引,从别的机器获得如下信息.注意版本一定要一致.
sys@bookdg> 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))
sys@bookdg> @ 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
------------
flag@1754: 0x2c (kdrhfl, kdrhff, kdrhfh)
lock@1755: 0x01
cols@1756: 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.测试:
sys@book> 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.
sys@book> 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,可以跳过检查.测试看看,
sys@book> alter system set "_db_always_check_system_ts"=false ;
system altered.
sys@book> 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.
sys@book> 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
dba 0x004000d1 (4194513 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是否有效.
sys@book> connect system/oracle
error:
ora-01017: invalid username/password; logon denied
warning: you are no longer connected to oracle.
sys@book> connect system/manager
connected.
--//昏,修复有问题,指向最早的位置,不过应该不影响使用.
system@book> @ 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
-------------
flag@5298: 0x6c (kdrhfl, kdrhff, kdrhfh, kdrhfc)
lock@5299: 0x02
cols@5300: 22
ckix@5301: 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
-------------
flag@4959: 0x6c (kdrhfl, kdrhff, kdrhfh, kdrhfc)
lock@4960: 0x00
cols@4961: 22
ckix@4962: 5
col 0[6] @4963: system
col 1[2] @4970: 1
col 2[16] @4973: 2d594e86f93b17a1
col 3[1] @4990: 0
col 4[2] @4992: 3
col 5[7] @4995: 2013-08-24 11:37:40
col 6[7] @5003: 2015-11-24 09:13:26
col 7[7] @5011: 2013-08-24 12:07:04
col 8[7] @5019: 2013-08-24 12:07:04
col 9[1] @5027: 0
col 10[0] @5029: *null*
col 11[2] @5030: 1
col 12[0] @5033: *null*
col 13[0] @5034: *null*
col 14[1] @5035: 0
~~~~~~~~~~~~~~~~~~~~~
col 15[1] @5037: 0
col 16[22] @5039: default_consumer_group
col 17[0] @5062: *null*
col 18[1] @5063: 0
col 19[0] @5065: *null*
col 20[0] @5066: *null*
col 21[62] @5067: s:574f64cf334589628c7754569b8c88c0a2000c907997a2e079ad97b2b0e3
--//一些块没有恢复,不想做了,对应索引也没有修正,下午继续看看.
上一篇: 使用webpack构建应用的方法步骤
下一篇: Google 个性化搜索对SEO的影响