本文介绍了SQL select Crashes DB2 8.2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个SQL,每次运行时,都会使实例崩溃,完全关闭,每个人都关闭。我告诉那个运行它的人

只是为了将它分开,而且它的工作方式很好,但是我应该把它作为一个bug归结给IBM,因为我觉得没有SQL应该崩溃

实例?或者我错了,这个SQL只是垃圾。我检查了文档中的

限制部分,它似乎没有冒犯任何限制。

在AIX 5.3 ML1上以64位运行8.1FP8(8.2), 16GB RAM,8路P5机器。


这是违规的SQL:

选择''\''|| HEX(代表$ COID)||''\''||

HEX(代表$ COMPID ||''\ ROOT \ CATIA_MODEL \'',

rep.C_LASTMOD,cast($ CUR_ACC_MET_DATA s varchar(150)

for mixed data)

from ROOT.CATIA_MODEL rep,ROOT。$ EXT_LF extlf

其中rep。$ COID = extlf。$ COID和ep.C_COMPID_DATA = extlf。$ COMPID

和S_TYPE_REPIN('''3D'',''3D MODEL'',' 'COMP'',''详细''''''绘图'',

''组装'',''MASTER'',''LAYOUT'',''CATPart'',' 'CATPART'',''WELD'')和

date(rep.C_LASTMOD> date(''01/01/2006'')并且存在

(选择$ COID rom ROOT.PART_LIST其中$ COID代表$ COID

和_SITE_RESPONSIBLE =''HRA-O'')并不存在(从OOT中选择$ COID

。$ EXT_LF,其中$ COID = rep。$ COID

和$ COMPID_FATHER = rep。$ COMPID和REPRES_TYPE =''cgr'')

UNION select''\ '' || HEX (rep。$ COID)||''\''|| HEX(rep。$ COMPID)

||''\ ROOT \DOCCAD \'',rep.C_LASTMOD,

cast($ CUR_ACC_MET_DATA为varchar(150),用于混合数据)

来自ROOT.DOCCADrep,ROOT。$ EXT_LF extlf

其中rep。 $ COID = extlf。$ COID

和rep.C_COMPID_DATA = extlf。$ COMPID

和S_TYPE_REP IN('''3D'',''3D MODEL'',' 'COMP'',''详细''''''绘图'',

''组装'',''MASTER'',''LAYOUT'',''CATPart'',' 'CATPART'',''WELD'')

和日期(rep.C_LASTMOD)> date(''01/01/2006''

并且存在(从OOT.PART_LIST中选择$ COID

其中$ COID = rep。$ COID和C_SITE_RESPONSIBLE ='' HRA-O'')

和notexists(从ROOT中选择COID。$ EXT_LF

其中$ COID = rep。$ COID和$ COMPID_FATHER = rep。$ COMPID

和REPRES_TYPE =''cgr'')

UNION select''\''|| HEX(extlf。$ COID)||''\''

|| HEX(extlf。$ COMPID_FATHER)||''\ ROOT \DOCCAD \'',

dc.C_LASTMOD,

cast($ CUR_ACC_MET_DATA为varchar(150),用于混合数据)

来自ROOT。$ EXT_LF extlf,ROOT.DOCCAD dc

其中,extlf。$ COID = dc。$ COID AND存在(从ROOT.PART_LIST中选择$ COID

,其中$ COID dc。$ COID

和C_SITE_RESPONSIBLE =''HRA-O'')和$ CUR_ACC_MET_DATA

喜欢''U​​NIX PATH / n / share /%''和REPRES_TYPE =''cgr''

UNION select''\''|| HEX(extlf。$ COID )|| '' \ ||

HEX(extlf。$ COMPID_FATHER)||''\ ROOT \ CATIA_MODEL \,

cm.C_LASTMOD,cast($ CUR_ACC_MET_DATA as varchar(150) )混合数据
)来自ROOT的
。$ EXT_LF extlf,ROOT.CATIA_MODEL cm

其中,extlf。$ COID = cm。$ COID

AND存在(从ROOT.PART_LIST中选择$ COID

,其中$ COID = cm。$ COID和C_SITE_RESPONSIBLE =''HRA-O'')

和$ CUR_ACC_MET_DATA,如''UNIX PATH / n / share /%''

和REPRES_TYPE =''cgr''仅限获取


谢谢


We have an SQL that every time it''s run, will crash the instance, a
complete shutdown, everyone out and shutdown. I told the guy running it
just to break it apart, and it works fine that way, but should I subimt
this to IBM as a bug, because I think that no SQL should ever crash the
instance? Or am I wrong there and this SQL is just junk. I checked the
limits section in the docs, It doesn''t appear to be offending any limits.
Running 8.1FP8 (8.2) in 64bit on AIX 5.3 ML1, 16gb RAM , 8-way P5 machine.

Here is the offending SQL:
select ''\''|| HEX(rep.$COID)||''\''||
HEX(rep.$COMPID||''\ROOT\CATIA_MODEL\ '',
rep.C_LASTMOD,cast($CUR_ACC_MET_DATA s varchar(150)
for mixed data)
from ROOT.CATIA_MODEL rep, ROOT. $EXT_LF extlf
where rep.$COID = extlf.$COID and ep.C_COMPID_DATA =extlf.$COMPID
and S_TYPE_REPIN (''3D'',''3D MODEL'',''COMP'',''DETAILED'',''DRAWING'',
''ASSEMBLY'',''MASTER'',''LAYOUT'',''CATPart'',''CATPART'','' WELD'') and
date(rep.C_LASTMOD > date(''01/01/2006'') and exists
(select $COID rom ROOT.PART_LIST where $COID rep.$COID
and _SITE_RESPONSIBLE = ''HRA-O'') and not exists (select $COID
from OOT.$EXT_LF where $COID = rep.$COID
and $COMPID_FATHER = rep.$COMPID and REPRES_TYPE = ''cgr'')
UNION select ''\''||HEX(rep.$COID)||''\''||HEX(rep.$COMPID)
||''\ROOT\DOCCAD\ '', rep.C_LASTMOD,
cast($CUR_ACC_MET_DATA as varchar(150) for mixed data)
from ROOT.DOCCADrep, ROOT.$EXT_LF extlf
where rep.$COID = extlf.$COID
and rep.C_COMPID_DATA = extlf.$COMPID
and S_TYPE_REP IN (''3D'',''3D MODEL'',''COMP'',''DETAILED'',''DRAWING'',
''ASSEMBLY'',''MASTER'',''LAYOUT'',''CATPart'',''CATPART'','' WELD'')
and date(rep.C_LASTMOD) > date(''01/01/2006''
and exists (select $COID from OOT.PART_LIST
where $COID = rep.$COID and C_SITE_RESPONSIBLE = ''HRA-O'')
and notexists (select COID from ROOT. $EXT_LF
where $COID = rep.$COID and $COMPID_FATHER = rep.$COMPID
and REPRES_TYPE= ''cgr'')
UNION select ''\'' || HEX(extlf.$COID) ||''\''
|| HEX(extlf.$COMPID_FATHER) || ''\ROOT\DOCCAD\ '',
dc.C_LASTMOD,
cast($CUR_ACC_MET_DATA as varchar(150) for mixed data)
from ROOT.$EXT_LF extlf,ROOT.DOCCAD dc
where extlf.$COID=dc.$COID AND exists (select $COID
from ROOT.PART_LIST where $COID dc.$COID
and C_SITE_RESPONSIBLE = ''HRA-O'') and $CUR_ACC_MET_DATA
like ''UNIX PATH /n/share/%'' and REPRES_TYPE =''cgr''
UNION select ''\''||HEX(extlf.$COID)||''\''||
HEX(extlf.$COMPID_FATHER)||''\ROOT\CATIA_MODEL\ ,
cm.C_LASTMOD,cast($CUR_ACC_MET_DATA as varchar(150)
for mixed data)
from ROOT.$EXT_LF extlf,ROOT.CATIA_MODEL cm
where extlf.$COID=cm.$COID
AND exists (select$COID from ROOT.PART_LIST
where $COID = cm.$COID and C_SITE_RESPONSIBLE = ''HRA-O'')
and $CUR_ACC_MET_DATA like ''UNIX PATH /n/share/%''
and REPRES_TYPE = ''cgr'' for fetch only

Thanks
Ken

推荐答案




这篇关于SQL select Crashes DB2 8.2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-07 19:05