Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2014
    Posts
    294

    Unanswered: Sqlcode=-901, sqlstate=58004

    Hi,

    I am getting issue as I am having a procedure as

    CREATE or REPLACE PROCEDURE Pn()
    DYNAMIC RESULT SETS 5
    P1: BEGIN
    --CALL p1();

    CALL p2();

    commit;
    --CALL P3();

    CALL P4();

    commit;
    CALL P5();

    END P1

    When I m running this procedure Pn, it is giving the following error:

    The SQL statement or command failed because of a database system error. (Reason "pNestedTrustedStack->ucIntfc.pConHandle is NULL! Connection is not ava".). SQLCODE=-901, SQLSTATE=58004, DRIVER=4.17.30
    Run of routine failed.

    In the same way If i ran p1,p2,p3,p4,p5 procedures independently I can get the desired result.

    Previously this issue used to come only once. But now it's not allowing me run my procedures at all.

    can someone kindly suggest me what is this error & resolution too.
    I m using db2 cexpress on linux.

    thanks

  2. #2
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    Possibly a programming error, you should narrow down which statement(s) trigger this symptom, by ensuring you have adequate comprehensive exception handling in each of the sprocs that log the context of the error.
    Also check what entries appear in db2diag.log, if necessary temporarily increasing DIAGLEVEL to 4.
    Also check db2level for your Express-C (if that is what you mean by cexpress) and ensure it is the latest available build.

  3. #3
    Join Date
    Oct 2013
    Location
    Toronto, Canada
    Posts
    23
    You will probably need to patch db2 (get a fix from IBM).. or update to the latest level that has this patch..

  4. #4
    Join Date
    Jul 2014
    Posts
    294
    Is there any way to solve this without using fix packs. As I m running some free ware.

  5. #5
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    deadlock or lock-timeout
    you should add additional debugging code to see where this is happening
    who is blocking who
    maybe create/activate deadlock event monitor to see details

    901 system error
    see diaglog and if needed set diaglevel to 4

    maybe todo with intermediate commit - try without
    Last edited by przytula_guy; 06-23-15 at 10:28.
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  6. #6
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    -901 is a programming error.
    Normally you open PMR for that.
    If you want to avoid it without a fixpack then you should try to rewrite your code.
    For example, is it really necessarily to commit inside the Pn procedure?
    Can you try to comment out these commit statements and check if the error still appears?
    Regards,
    Mark.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •