生产环境巡检发现alert日志发现ora-600 [kpncxcc-1], [12], [5], [7],mos搜索未发现相关文档自己分析测试一下。
一、数据库报错
errors in file /oracle/app/oracle/diag/rdbms/orcl/orcl1/trace/orcl1_ora_126023.trc (incident=3297342):
ora-00600: 内部错误代码, 参数: [kpncxcc-1], [12], [5], [7], [], [], [], [], [], [], [], []
incident details in: /oracle/app/oracle/diag/rdbms/orcl/orcl1/incident/incdir_3297342/orcl1_ora_126023_i3297342.trc
2023-03-30t22:21:27.468661 08:00
*****************************************************************
an internal routine has requested a dump of selected redo.
this usually happens following a specific internal error, when
analysis of the redo logs will help oracle support with the
diagnosis.
it is recommended that you retain all the redo logs generated (by
all the instances) during the past 12 hours, in case additional
redo dumps are required to help with the diagnosis.
*****************************************************************
2023-03-30t22:22:01.689354 08:00
use adrci or support workbench to package the incident.
see note 411.1 at my oracle support for error and packaging details.
2023-03-30t22:22:02.041203 08:00
dumping diagnostic data in directory=[cdmp_20230330222202], requested by (instance=1, osid=126023), summary=[incident=3297342].
2023-03-30t22:22:25.222870 08:00
errors in file /oracle/app/oracle/diag/rdbms/orcl/orcl1/trace/orcl1_ora_126023.trc (incident=3297343):
ora-00600: 内部错误代码, 参数: [kpncxcc-1], [12], [5], [7], [], [], [], [], [], [], [], []
incident details in: /oracle/app/oracle/diag/rdbms/orcl/orcl1/incident/incdir_3297343/orcl1_ora_126023_i3297343.trc
2023-03-30t22:22:26.812063 08:00
use adrci or support workbench to package the incident.
see note 411.1 at my oracle support for error and packaging details.
2023-03-30t22:22:33.145742 08:00
errors in file /oracle/app/oracle/diag/rdbms/orcl/orcl1/trace/orcl1_ora_126023.trc (incident=3297344):
ora-00600: 内部错误代码, 参数: [kpncxcc-1], [12], [5], [7], [], [], [], [], [], [], [], []
incident details in: /oracle/app/oracle/diag/rdbms/orcl/orcl1/incident/incdir_3297344/orcl1_ora_126023_i3297344.trc
2023-03-30t22:22:34.716414 08:00
use adrci or support workbench to package the incident.
see note 411.1 at my oracle support for error and packaging details.
2023-03-30t22:23:04.762995 08:00
lgwr (pid:58568): srl selected to archive t-1.s-108890
lgwr (pid:58568): srl selected for t-1.s-108890 for lad:2
2023-03-30t22:23:04.796678 08:00
thread 1 advanced to log sequence 108890 (lgwr switch), current scn: 16366158269708
current log# 3 seq# 108890 mem# 0: datadg/orcl/onlinelog/group_3.263.1082216491
current log# 3 seq# 108890 mem# 1: archdg/orcl/onlinelog/group_3.389.1082216495
2023-03-30t22:23:06.378766 08:00
errors in file /oracle/app/oracle/diag/rdbms/orcl/orcl1/trace/orcl1_ora_126023.trc (incident=3297345):
ora-00600: 内部错误代码, 参数: [kpncxcc-1], [12], [5], [7], [], [], [], [], [], [], [], []
incident details in: /oracle/app/oracle/diag/rdbms/orcl/orcl1/incident/incdir_3297345/orcl1_ora_126023_i3297345.trc
2023-03-30t22:23:07.794571 08:00
use adrci or support workbench to package the incident.
see note 411.1 at my oracle support for error and packaging details.
2023-03-30t22:23:08.171584 08:00
dumping diagnostic data in directory=[cdmp_20230330222308], requested by (instance=1, osid=126023), summary=[incident=3297345].
二、检查incident日志,找到报错sql
----- current sql statement for this session (sql_id=1z2zftmbax53q) -----
select * from cy.test1@to_cy
where rowid = :plsqldev_rowid
三、测试该sql
sql> select count(*) from cy.test1@to_cy;
count(*)
----------
10853
sql> select * from cy.test1@to_cy;
store_id org_id status status_date share_type exp_date eff_date
-------------------------------- -------------------------------- -------------------------------- ------------------- -------------------------------- ------------------- -------------------
test.03.s01 test.03.05.02.23 valid 2023-03-30 15:54:47 specified
test.03.s01 test.03.05.02.24 valid 2023-03-30 15:54:47 specified
test.03.s01 test.03.05.02.25 valid 2023-03-30 15:54:47 specified
test.03.s01 test.03.05.02.26 valid 2023-03-30 15:54:47 specified
test.03.s01 test.03.05.02.27 valid 2023-03-30 15:54:47 specified
test.03.s01 test.03.05.02.28 valid 2023-03-30 15:54:47 specified
test.03.s01 test.03.05.02.29 valid 2023-03-30 15:54:47 specified
test.03.s01 test.03.05.06 valid 2023-03-30 15:54:47 specified
test.03.s01 test.03.06 valid 2023-03-30 15:54:47 specified
error:
ora-00600: internal error code, arguments: [kpncxcc-1], [12], [5], [7], [], [], [], [], [], [], [], []
四、按列测试
sql> select distinct status_date from cy.test1@to_cy;
status_date
-------------------
2023-03-30 15:54:50
2021-06-15 10:45:49
2022-08-19 11:19:33
2022-08-16 18:25:08
2022-10-01 16:42:59
2022-08-16 18:01:48
2021-06-15 10:47:21
2021-12-01 15:30:02
^cerror:
ora-01013: user requested cancel of current operation
ora-00600: internal error code, arguments: [kpncxcc-1], [12], [5], [7], [], [], [], [], [], [], [], []
45 rows selected.
五、去目标库测试
sql> select distinct status_date from cy.test1;
status_da
---------
01-dec-21
error:
ora-01858: a non-numeric character was found where a numeric was expected
45 rows selected.
六、带上rowid测试
sql> select rowid,rownum, status_date from cy.test1 ;
aaiwcpabuaaowmoaae 2278 18-aug-22
aaiwcpabuaaowmoaaf 2279 18-aug-22
aaiwcpabuaaowmoaag 2280 18-aug-22
error:
ora-01858: a non-numeric character was found where a numeric was expected
sql> select status_date from cy.test1 where rowid='aaiwcpabuaaowmoaah';
error:
ora-01858: a non-numeric character was found where a numeric was expected
七、dump看下
sql> select dump(org_id),dump(status_date) from cy.test1 where rowid='aaiwcpabuaaowmoaah';
dump(org_id)
--------------------------------------------------------------------------------
dump(status_date)
--------------------------------------------------------------------------------
typ=1 len=15: 78,88,46,48,49,46,48,54,46,48,51,46,49,48,48 -->test.01.06.03.100-->4e 58 2e 30 36 2e 30 06 2e 31 30 30
typ=12 len=5: 86,65,76,73,68 -->valid
sql> select dump(org_id),dump(status_date) from cy.test1 where rowid='aaiwcpabuaaowmoaaa';
dump(org_id)
--------------------------------------------------------------------------------
dump(status_date)
--------------------------------------------------------------------------------
typ=1 len=15: 78,88,46,48,49,46,48,55,46,48,51,46,52,51,56 -->test.01.07.03.438 -->4e 58 2e 30 31 2e 30 37 2e 30 33 2e 34 33 38
typ=12 len=7: 120,122,8,16,18,38,10 -->时间
sql> select dump(org_id),dump(status_date),org_id,status_date from cy.test1 where rowid='aaiwcpabuaaowmoaaa';
dump(org_id)
--------------------------------------------------------------------------------
dump(status_date)
--------------------------------------------------------------------------------
org_id status_da
-------------------------------- ---------
typ=1 len=15: 78,88,46,48,49,46,48,55,46,48,51,46,52,51,56
typ=12 len=7: 120,122,8,16,18,38,10
test.01.07.03.438 16-aug-22
select * from cy.test1 where status_date='valid';
sql> select * from cy.test1 where status_date='valid';
select * from cy.test1 where status_date='valid'
*
error at line 1:
ora-01858: a non-numeric character was found where a numeric was expected
select rowid,dump(status_date) from cy.test1;
sql> select rowid,dump(status_date) from cy.test1;
rowid dump(status_date)
------------------ ------------------------------------------------------------
aaiwcpabuaaowmoaag typ=12 len=7: 120,122,8,18,11,35,51
aaiwcpabuaaowmoaah typ=12 len=5: 86,65,76,73,68
aaiwcpabuaaowmpaad typ=12 len=7: 120,122,6,23,10,53,29
只有这行的status_date列存储为’86,65,76,73,68’,转换卫字符是valid。对比所有相关行,只有这行dump结果为86,65,76,73,68。
sql> select dbms_rowid.rowid_object(rowid) data_object_id#,dbms_rowid.rowid_relative_fno(rowid) rfile#, dbms_rowid.rowid_block_number(rowid) block#, dbms_rowid.rowid_row_number(rowid) row#, rowid from cy.test1 where rowid='aaiwcpabuaaowmoaah';
data_object_id# rfile# block# row# rowid
--------------- ---------- ---------- ---------- ------------------
2295593 84 3869096 7 aaiwcpabuaaowmoaah
sql> alter system dump datafile 84 block 3869096;
system altered.
数据块搜索4e 58 2e 30 36 2e 30 06 2e 31 30 30,为发现,应该是还没有写入
col 0: [ 3] c2 0a 34
col 1: [17] 31 30 34 35 35 32 39 30 31 32 33 30 36 33 33 33 38
col 2: [12] 72 73 63 6c 52 44 5a 43 7a 6a 33 30
col 3: [ 8] 4f 55 54 53 54 4f 52 45
col 4: [ 6] 4e 4f 52 4d 41 4c
col 5: [ 7] 78 6f 02 15 11 10 31
col 6: [ 4] 53 41 4c 45
col 7: [ 7] 33 33 33 38 32 39 38
col 8: [ 1] 31
col 9: [14] 4e 58 2e 30 31 2e 30 36 2e 30 33 2e 35 33 --test.01.06.03.53
col 10: [14] 4e 58 2e 30 31 2e 30 36 2e 30 33 2e 35 33
col 11: [ 6] 4e 4f 52 4d 41 4c
col 12: [ 4] 55 53 45 44
col 13: *null*
col 14: *null*
col 15: *null*
col 16: *null*
col 17: [ 7] 78 6f 0c 08 01 01 01
col 18: [ 7] 78 6e 0c 09 01 01 01
col 19: [ 7] 78 70 03 1f 01 01 01
col 20: *null*
col 21: *null*
col 22: [ 4] 55 53 45 44
col 23: [ 6] 61 6b 66 30 30 31
col 24: [ 2] 4e 58 -->test
col 25: [ 7] 78 6e 0c 0a 02 16 2b
col 26: [11] 32 30 30 38 72 66 74 74 65 73 74
col 27: *null*
col 28: [ 1] 80
col 29: [ 1] 80
col 30: *null*
col 31: *null*
col 32: *null*
col 33: [11] 31 35 30 30 38 36 36 36 34 34 36
col 34: *null*
col 35: [11] 31 35 30 30 38 36 36 36 34 34 36
col 36: *null*
col 37: [ 7] 78 6f 02 1a 18 33 2c
col 38: *null*
col 39: *null*
col 40: [ 6] 4e 4f 52 4d 41 4c'
那么这里推测[kpncxcc-1], [12], [5], [7]分别代表块类型type,目前行长度length和目标行长度7
八、复现
sql> select * from scott.emp;
empno ename job mgr hiredate sal comm deptno
---------- -------------------- ------------------ ---------- ------------ ---------- ---------- ----------
7369 smith clerk 7902 17-dec-80 800 20
7499 allen salesman 7698 20-feb-81 1600 300 30
7521 ward salesman 7698 22-feb-81 1250 500 30
7566 jones manager 7839 02-apr-81 2975 20
7654 martin salesman 7698 28-sep-81 1250 1400 30
7698 blake manager 7839 01-may-81 2850 30
7782 clark manager 7839 09-jun-81 2450 10
7788 scott analyst 7566 19-apr-87 3000 20
7839 king president 17-nov-81 5000 10
7844 turner salesman 7698 08-sep-81 1500 0 30
7876 adams clerk 7788 23-may-87 1100 20
empno ename job mgr hiredate sal comm deptno
---------- -------------------- ------------------ ---------- ------------ ---------- ---------- ----------
7900 james clerk 7698 03-dec-81 950 30
7902 ford analyst 7566 03-dec-81 3000 20
7934 miller clerk 7782 23-jan-82 1300 10
14 rows selected.
1、确定数据所在块
sql> select dbms_rowid.rowid_block_number(rowid),dbms_rowid.rowid_relative_fno(rowid) from emp;
dbms_rowid.rowid_block_number(rowid) dbms_rowid.rowid_relative_fno(rowid)
------------------------------------ ------------------------------------
5406 7
5406 7
5406 7
5406 7
5406 7
5406 7
5406 7
5406 7
5406 7
5406 7
5406 7
dbms_rowid.rowid_block_number(rowid) dbms_rowid.rowid_relative_fno(rowid)
------------------------------------ ------------------------------------
5406 7
5406 7
5406 7
14 rows selected.
2、bbed测试
bbed> set dba 7,5403
dba 0x01c0151b (29365531 7,5403)
bbed> map /v
file: /u01/app/oracle/oradata/orcl/users01.dbf (7)
block: 5403 dba:0x01c0151b
------------------------------------------------------------
ktb data block (table/cluster)
struct kcbh, 20 bytes @0
ub1 type_kcbh @0
ub1 frmt_kcbh @1
ub2 wrp2_kcbh @2
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
3、修改数据
bbed> p kdbr
sb2 kdbr[0] @118 8050
sb2 kdbr[1] @120 8007
sb2 kdbr[2] @122 7964
sb2 kdbr[3] @124 7923
sb2 kdbr[4] @126 7878
sb2 kdbr[5] @128 7837
sb2 kdbr[6] @130 7796
sb2 kdbr[7] @132 7756
sb2 kdbr[8] @134 7718
sb2 kdbr[9] @136 7675
sb2 kdbr[10] @138 7637
sb2 kdbr[11] @140 7599
sb2 kdbr[12] @142 7560
sb2 kdbr[13] @144 7521
bbed> p *kdbr[0]
rowdata[529]
------------
ub1 rowdata[529] @8150 0x2c
bbed> x /rnccntnnnnnnnnnn
rowdata[529] @8150
------------
flag@8150: 0x2c (kdrhfl, kdrhff, kdrhfh)
lock@8151: 0x01
cols@8152: 8
col 0[3] @8153: 7369
col 1[5] @8157: smith
col 2[5] @8163: clerk
col 3[3] @8169: 7902
col 4[7] @8173: 17-dec-80
col 5[2] @8181: 800
col 6[0] @8184: *null*
col 7[2] @8185: 20
bbed> set offset 8174
offset 8174
bbed> d
file: /u01/app/oracle/oradata/orcl/users01.dbf (7)
block: 5406 offsets: 8174 to 8191 dba:0x01c0151e
------------------------------------------------------------------------
77b40c11 01010102 c209ff02 c1150106 efbf
bbed> modify /c valid
file: /u01/app/oracle/oradata/orcl/users01.dbf (7)
block: 5406 offsets: 8174 to 8191 dba:0x01c0151e
------------------------------------------------------------------------
56414c49 44303030 3030ff02 c1150106 efbf
<32 bytes per line>
bbed> sum apply
check value for file 7, block 5406:
current = 0x962b, required = 0x962b
bbed>
4、查询
sql> alter system flush buffer_cache;
system altered.
sql> select * from scott.emp;
error:
ora-01858: a non-numeric character was found where a numeric was expected
no rows selected
sql> select dump(hiredate) from scott.emp where empno=7369;
dump(hiredate)
-------------------------------------
typ=12 len=7: 86,65,76,73,68,48,48
最后修改时间:2023-04-19 11:19:19
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【米乐app官网下载的版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。