By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,237 Members | 1,228 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,237 IT Pros & Developers. It's quick & easy.

SQL0338N

P: n/a
We have a user who is trying to generate a report from a db2 database. He is
using a tool from a third party vendor, where he first designs the report
and the tool then generates the SQL from the choices made by the user. When
this report is generated in our test environment it works fine, but in the
production environment it gives this error message:

"SuperOffice Caesar webCRM - An error occured
Description:
ERROR [42972][IBM][DB2/NT] SQL0338N An ON clause associated with a join
operator or in a MERGE statement is not valid. SQLSTATE=42972
Error type: IBM.Data.DB2.DB2Exception
Error source: IBM.Data.DB2
URL: /caesar/Applications/Reports/ShowResult.aspx
Version: 5.1.0.444"

The test and production environment both are Windows 2003 Enterprise Server,
and DB2 ESE version 8.1, fixpack 10. The test environment is 1 CPU 1 GHz, 2
GB RAM,
production has 2 CPU 3, 05 GHz, 3.75 GB RAM.

Now I start to wonder why thing works in the test environment but not in
production.
Of course there are much more going on in production than in test, and I
suppose that can
explain why this happens. The configuration on both instance and database
level also is
different in the two environments.

If the configuration is an issue here, which parameter(s) should I look at
first?

And is there a way to capture the SQL that is generated, to be certain that
this is
identical in test and production?

**************
Regards
Odd Bjørn Andersen
ErgoGroup AS, Oslo, Norway
Aug 9 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Odd Bjørn Andersen wrote:
We have a user who is trying to generate a report from a db2 database. He is
using a tool from a third party vendor, where he first designs the report
and the tool then generates the SQL from the choices made by the user. When
this report is generated in our test environment it works fine, but in the
production environment it gives this error message:

"SuperOffice Caesar webCRM - An error occured
Description:
ERROR [42972][IBM][DB2/NT] SQL0338N An ON clause associated with a join
operator or in a MERGE statement is not valid. SQLSTATE=42972
Error type: IBM.Data.DB2.DB2Exception
Error source: IBM.Data.DB2
URL: /caesar/Applications/Reports/ShowResult.aspx
Version: 5.1.0.444"

The test and production environment both are Windows 2003 Enterprise Server,
and DB2 ESE version 8.1, fixpack 10. The test environment is 1 CPU 1 GHz, 2
GB RAM,
production has 2 CPU 3, 05 GHz, 3.75 GB RAM.

Now I start to wonder why thing works in the test environment but not in
production.
Of course there are much more going on in production than in test, and I
suppose that can
explain why this happens. The configuration on both instance and database
level also is
different in the two environments.

If the configuration is an issue here, which parameter(s) should I look at
first?
Since this is an SQL compile error I don't see this as a configuration
issue in DB2. It could only be that your app generates different SQL
>
And is there a way to capture the SQL that is generated, to be certain that
this is
identical in test and production?
Snapshots won't help here since the statement never compiled.
You would need to trace the client or the communication.
I would start with a DRDA trace:
http://publib.boulder.ibm.com/infoce...e/r0001997.htm

W.r.t. how to get SQL338 look for:
SQL Functions in the on clause
Columns not local to the on clause
Subqueries in the on clause.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Aug 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.