ORA-00600: [qerrmObnd1], [932], [ORA-00932: inconsistent datatypes

     今天帮客户巡检数据库,数据库报以下错误:

ORA-00600: internal error code, arguments: [qerrmObnd1], [932], [ORA-00932: inconsistent datatypes: expected  got
根据trace查出来的sql如下:

    select to_char(bq.rk_rq,:"SYS_B_00") ZS_XM,:"SYS_B_01" ZS_PM,bq.bqrk_je BQRK_JE,to_char(bq.rk_rq,:"SYS_B_02") RK_RQ--,sq.bqrk_je SNTQ_JE,case when sq.bqrk_je>0 then (bq.bqrk_je-sq.bqrk_je)/sq.bqrk_je when sq.bqrk_je =0 then 1 end ZJL,bq.bqrk_je-nvl(sq.bqrk_je,0) ZJ_JE
,decode((select nsrnbm from  t_dcfx_dcfxbg where nsrnbm = :"SYS_B_03" and bgssq_z = to_char(bq.rk_rq,:"SYS_B_04") ),:"SYS_B_05",:"SYS_B_06",:"SYS_B_07") fxbg
   from
(select :"SYS_B_08" ZS_XM,:"SYS_B_09" ZS_PM,(sum(nvl(a.bqrkse,:"SYS_B_10")) -sum(nvl(a.bqtkse,:"SYS_B_11"))) BQRK_JE,trunc(a.sj,:"SYS_B_12") RK_RQ
  from dw.fact_zdsyssfx@gzods a
  where
     trunc(a.sj,:"SYS_B_13") = trunc(to_date(:"SYS_B_14",:"SYS_B_15"), :"SYS_B_16")
    and a.nsrnbm =:"SYS_B_17"  group by trunc(a.sj,:"SYS_B_18"))bq,
(select :"SYS_B_19" ZS_XM,:"SYS_B_20" ZS_PM,(sum(nvl(a.bqrkse,:"SYS_B_21")) -sum(nvl(a.bqtkse,:"SYS_B_22"))) BQRK_JE,trunc(a.sj,:"SYS_B_23") RK_RQ
  from dw.fact_zdsyssfx@gzods a
  where
     trunc(a.sj,:"SYS_B_24") = trunc(add_months(to_date(:"SYS_B_25",:"SYS_B_26"),-:"SYS_B_27"), :"SYS_B_28")
    and a.nsrnbm =:"SYS_B_29"  group by trunc(a.sj,:"SYS_B_30"))sq
    where
      bq.RK_RQ = add_months(SQ.RK_RQ,:"SYS_B_31")

根据查metalink,有可能是bug

检查下数据库参数为 cursor_sharing=SIMILAR  触发这个bug

以下是metalink解释

Bug 4254094 - OERI[qerrmObnd1][932] possible for queries over DB links
  文档 ID: 4254094.8 类型: PATCH
  上次修订日期: 24-SEP-2008 状态: PUBLISHED
function getdoc2(docstr,mlstr) { pos=docstr.indexOf(':'); docid=docstr.substring(pos+1,docstr.length); tgt="_self"; if ( location.href.slice(7,12) == "webiv" || location.href.slice(7,11) == "rmsu" ) { loc="Get?WwwID=note:" + docid; } else { if ( location.href.slice(7,12) == "metal" || location.href.slice(7,12) == "suppo" ) { loc=mlstr + docid; } else { loc="http://metalink.oracle.com/metalink/plsql/"+mlstr+docid; } } window.open(loc,tgt); return; } function getdoc(docstr) { getdoc2(docstr,"showdoc?db=NOT&id="); } function taghelp(str) { getdoc2('NOTE:245840.1#'+str,"ml2_documents.showNOT?p_id="); }

Bug 4254094  OERI[qerrmObnd1][932] possible for queries over DB links

 This note gives a brief overview of bug 4254094.
 The content was last updated on: 03-APR-2008
 Click here for details of each of the sections below.

Affects:

Product (Component) Oracle Server (Rdbms)
Range of versions believed to be affected Versions < 11
Versions confirmed as being affected
Platforms affected Generic (all / most platforms affected)

 It is believed to be a regression in default behaviour thus:
   Regression introduced in 9.2.0.6

Fixed:

This issue is fixed in

Symptoms:

Related To:

Description

This problem appears to have been introduced in 9.2.0.6 .

When CURSOR_SHARING = FORCE or SIMILAR then SQL over database
links which involves replaced date format mask information 
can result in ORA-600 [qerrmObnd1] and a dump in qerrmOdcl.

Workaround:
  A workaround in 9.2.0.6 is to set the hidden parameter
  "_adjust_literal_replacement" = TRUE
  This enables the fix for bug 3128363.

Please note: The above is a summary description only. Actual symptoms can vary. Matching to any symptoms here does not confirm that you are encountering this problem. Always consult with Oracle Support for advice.

References

Bug 4254094 (This link will only work for PUBLISHED bugs)
Note 245840.1 Information on the sections in this article

 

解决方法:

改参数 cursor_sharing=exact

或添加隐含参数 "_adjust_literal_replacement" = TRUE

请使用浏览器的分享功能分享到微信等