SQL7962 Error When Selecting From AS400 DB2 Database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mperkins@forzani.com

    SQL7962 Error When Selecting From AS400 DB2 Database

    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.SQLExc eption: [SQL7962] Cursor CRSR0002 opened.

    Does anyone know what might be causing this error?

    Thanks.

    - Mat

  • Rhino

    #2
    Re: SQL7962 Error When Selecting From AS400 DB2 Database


    <mperkins@forza ni.com> wrote in message
    news:1146780126 .911462.305750@ i39g2000cwa.goo glegroups.com.. .[color=blue]
    > 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.SQLExc eption: [SQL7962] Cursor CRSR0002 opened.
    >
    > Does anyone know what might be causing this error?
    >[/color]
    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


    Comment

    • Karl Hanson

      #3
      Re: SQL7962 Error When Selecting From AS400 DB2 Database

      mperkins@forzan i.com wrote:[color=blue]
      > 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.SQLExc eption: [SQL7962] Cursor CRSR0002 opened.
      >
      > Does anyone know what might be causing this error?
      >[/color]

      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.
      [color=blue]
      > wrkmsgd sql0952 qsqlmsg[/color]

      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

      Comment

      • mperkins@forzani.com

        #4
        Re: SQL7962 Error When Selecting From AS400 DB2 Database

        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.

        Comment

        • mperkins@forzani.com

          #5
          Re: SQL7962 Error When Selecting From AS400 DB2 Database

          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?

          Comment

          • Karl Hanson

            #6
            Re: SQL7962 Error When Selecting From AS400 DB2 Database

            mperkins@forzan i.com wrote:[color=blue]
            > 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?
            >[/color]

            (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:

            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

            Comment

            • mperkins@forzani.com

              #7
              Re: SQL7962 Error When Selecting From AS400 DB2 Database

              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.

              Comment

              Working...