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

SQL7962 Error When Selecting From AS400 DB2 Database

P: n/a
Hello.

I have a curious problem.

Occasionally executing a simple select against an AS400 DB2 database
through JDBC fails with the following error: (SQLState = 57014) -
java.sql.SQLException: [SQL7962] Cursor CRSR0002 opened.

Does anyone know what might be causing this error?

Thanks.

- Mat

May 4 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a

<mp******@forzani.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Hello.

I have a curious problem.

Occasionally executing a simple select against an AS400 DB2 database
through JDBC fails with the following error: (SQLState = 57014) -
java.sql.SQLException: [SQL7962] Cursor CRSR0002 opened.

Does anyone know what might be causing this error?

You haven't given us a lot of clues to unravel this mystery - particularly
the source code for your program - so this is strictly a wild guess: maybe
the cursor is already open and you are trying to open it a second time?

--
Rhino
May 4 '06 #2

P: n/a
mp******@forzani.com wrote:
Hello.

I have a curious problem.

Occasionally executing a simple select against an AS400 DB2 database
through JDBC fails with the following error: (SQLState = 57014) -
java.sql.SQLException: [SQL7962] Cursor CRSR0002 opened.

Does anyone know what might be causing this error?

SQLSTATE 57014 normally yields SQLCODE -952, which indicates some type
of abnormal end of processing (see below). SQL7962 is an info message
(not an error) and should not be related to SQLSTATE 57014.

Your best bet is probably examining the job log of the job associated
with the JDBC client (often a QSQSRVR or QZDASOINIT prestart job). Find
the SQL0952 message and look for any messages in the job log previous to
that. Often another message will explain the root cause.
wrkmsgd sql0952 qsqlmsg


Message ID . . . . . . . . . : SQL0952

Message file . . . . . . . . : QSQLMSG

Library . . . . . . . . . : QSYS

Message . . . . : Processing of the SQL statement ended. Reason code
&1.
Cause . . . . . : The SQL operation was ended before normal
completion. The
reason code is &1. Reason codes and their meanings are:

1 -- An SQLCancel API request has been processed, for example from
ODBC.
2 -- SQL processing was ended by sending an exception.

3 -- Abnormal termination.

4 -- Activation group termination.

5 -- Reclaim activation group or reclaim resources.

6 -- Process termination.

7 -- An EXIT function was called.

8 -- Unhandled exception.

9 -- A Long Jump was processed.

10 -- A cancel reply to an inquiry message was received.

11 -- Open Database File Exit Program (QIBM_QDB_OPEN).

0 -- Unknown cause.

Recovery . . . : If the reason code is 1, a client request was made
to cancel SQL processing. For all other reason codes, see previous
messages to determine why SQL processing was ended.
--
Karl Hanson
May 5 '06 #3

P: n/a
I appreciate the fact that the information I have provided much
information. The reason no JDBC or SQL code has been posted is because
it is actually burried in a third-party component which seems to work
fine except for this one case. I'm actually starting to suspect some
kind of incompatability between the driver and the back-end. Thank you
for taking the time to reply. I appreciate it.

May 5 '06 #4

P: n/a
Thank you very much for the advice. The reason code we came up with is
0 -- Unknown cause, which seems odd. I'm starting to suspect some kind
of incompatability between the driver and the back-end. What do you
think?

May 5 '06 #5

P: n/a
mp******@forzani.com wrote:
Thank you very much for the advice. The reason code we came up with is
0 -- Unknown cause, which seems odd. I'm starting to suspect some kind
of incompatability between the driver and the back-end. What do you
think?


(re-posting, since it appears the previous attempt failed)

The 0 reason code does sound odd. If there are no previous messages in
the job log related to the failure, and you know the client isn't
initiating the cancel, you could:
1) Check that your (AS/400 | iSeries | i5) server has the latest group
PTFs (fixpacks) installed:
http://www.ibm.com/servers/eserver/s...xes/index.html
2) If the latest group PTFs are installed and the problem persists, work
with your IBM service provider to further diagnose the problem.

--
Karl Hanson
May 8 '06 #6

P: n/a
Karl.

We are using a third party driver right now and we have just switched
to the corresponding driver from IBM to see if that improves our
situation. That way, if we get the same problem we'll be able to go to
IBM for support.

Thank you so much for your help.

May 8 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.