too many parse errors

too many parse errors

Table of Contents

1 现象

在alert日志中包含如下信息:

  XHJ(11):Additional information: hd=0x19a987dd8 phd=0x19a95b708 flg=0x28 cisid=131 sid=131 ciuid=131 uid=131 sqlid=37qs9jgx9awp2
XHJ(11):...Current username=UCR_JOUR
XHJ(11):...Application: JDBC Thin Client Action:
2020-08-11T16:54:59.469071+08:00
XHJ(11):WARNING: too many parse errors, count=13301 SQL hash=0xdeb7102d
XHJ(11):PARSE ERROR: ospid=32548, error=2019 for statement:
2020-08-11T16:54:59.469492+08:00
XHJ(11):select 'EOS_REL_01' as mwcId,  a.* from ( select  'eos_rel_01' MWC_WORK_ID,
       A.BUSIFORM_NODE_ID,
       A.STEP_ID,
       A.REL_STEP_ID,
       A.BUSIFORM_ID,
       A.EXT_ID,
       '0' STATE
  FROM (select T.BUSIFORM_NODE_ID,
               T.STEP_ID,
               T1.REL_STEP_ID,
               T.BUSIFORM_ID,
               T.EXT_ID
          from  t, t@dblink_c as t1
         where t.rel_id = t1.rel_id
           and t.state = 'B') A
 WHERE exists (select 1
          from t2
         where t2.busiform_node_id = a.busiform_node_id
           and t2.step_id = a.rel_step_id
           and t2.ext_id = a.ext_id
           and t2.state = '9')
       AND ROWNUM < 50) a where rownum <100

2 原因

Oracle 12.2 之后数据研发的新功能,当解析失败次数超过一定限制(默认100次,由参数_kks_parse_error_warning控制), 会将失败的信息写入到alert日志中。

set lines 200;
set pages 200;
col inst_id format 99;
col con_id format 99;
col name for a35;
col description for a30;
col value for a10;
col ismod for a6
col isdefault for a10

select
  x.inst_id,
  y.con_id,
  x.ksppinm  name,
  x.ksppdesc description,
  y.ksppstvl  value,
  y.ksppstdf  isdefault,
  decode(bitand(y.ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE')  ismod,
  decode(bitand(y.ksppstvf,2),2,'TRUE','FALSE')  isadj
from sys.x$ksppi x,
     sys.x$ksppcv y
where 1=1
  and x.inst_id = y.inst_id
  and x.indx = y.indx
  and x.ksppinm like '%parse_error%'
order by translate(x.ksppinm, ' _', ' '),x.inst_id,y.con_id;

执行示例:

INST_ID CON_ID NAME                                DESCRIPTION                    VALUE      ISDEFAULT  ISMOD  ISADJ
------- ------ ----------------------------------- ------------------------------ ---------- ---------- ------ ---------------
      1      1 _kks_cached_parse_errors            KKS cached parse errors        0          TRUE       FALSE  FALSE
      1      1 _kks_parse_error_warning            Parse error warning            100        TRUE       FALSE  FALSE

根据原因是解析失败,那么一般是SQL本身的问题。

3 解决

从上面的示例中,将sql语句取出,执行,发现db link 不可用。将dblink 修复后即完好 。

Author: halberd.lee

Created: 2020-08-11 Tue 17:40

Validate

posted @ 2020-08-11 17:40  halberd.lee  阅读(1239)  评论(0编辑  收藏  举报