Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2007
    Posts
    1

    Question Unanswered: Help : DB2 UDB and jdbc

    Hi folks,

    i'm trying to connect to DB2 UDB v 7.2.9 using JDBC Type 4 driver
    [com.ibm.db2.jcc.DB2Driver].

    I'm getting following error

    DB2 SQL error: SQLCODE: -805, SQLSTATE: 51002, SQLERRMC: NULLID.SYSSH200

    What should I do to resolve this?

    Thanks
    sara

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I would try to upgrade the DB2 server to the latest V7 fixpack if you are having trouble using a V8 client/driver to connect.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    Quote Originally Posted by sara123
    SQLCODE: -805, SQLSTATE: 51002
    This is an incompatible consistency token.
    Normally, it should suffice to recompile (and bind) your program.
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

  4. #4
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    Quote Originally Posted by Peter.Vanroose
    This is an incompatible consistency token.
    Actually, the LUW manual states it as follows:
    Package NULLID.SYSSH200 was not found.
    Explanation: The statement cannot complete because the necessary package was not found in the catalog.

    So, as I said, just recompile and bind the program.
    Last edited by Peter.Vanroose; 06-17-07 at 05:07.
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

  5. #5
    Join Date
    Jun 2007
    Posts
    8

    Stored Procedure Retreive

    Hello,

    I need an help with retrving results from a stored procedure, I need to correct the syntax which I am not able to get through

    Given below are 3 commads, here 1) and 2) works fine, my problem is I need 3) to work fine too.

    1) create table emp1 (empno int,SALARY int) (works fine)
    2) CREATE PROCEDURE UPDATE_SALARY_10 (IN EMPLOYEE_NUMBER int,IN RATE int) LANGUAGE SQL MODIFIES SQL DATA UPDATE EMP1 SET SALARY = SALARY * RATE WHERE EMPNO = EMPLOYEE_NUMBER (works fine)
    3) CREATE PROCEDURE dd (OUT result int) LANGUAGE SQL CONTAINS SQL select empno from emp1 (gives 104 error)

    Can someone please help me here, I know its a syntax error but I am not able to get through it.

    Thank you
    Ashok

  6. #6
    Join Date
    Jun 2007
    Posts
    8
    Quote Originally Posted by sara123
    Hi folks,

    i'm trying to connect to DB2 UDB v 7.2.9 using JDBC Type 4 driver
    [com.ibm.db2.jcc.DB2Driver].

    I'm getting following error

    DB2 SQL error: SQLCODE: -805, SQLSTATE: 51002, SQLERRMC: NULLID.SYSSH200

    What should I do to resolve this?

    Thanks
    sara

    You need to bind I think, the 805 error is because you dont bind from the client to the server.
    Try using the below two commands

    java com.ibm.db2.jcc.DB2Binder -url jdbc:db2://<machinename>.com:<portno>/<databasename> -user <user name> -password <password> -action replace
    java com.ibm.db2.jcc.DB2Binder -url jdbc:db2://<machinename>.com:<portno>/<databasename> -user <user name> -password <password> -collection DSNJDBC -action replace



    Try

  7. #7
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    Quote Originally Posted by ASHOKJOSE
    CREATE PROCEDURE dd (OUT result int)
    LANGUAGE SQL CONTAINS SQL select empno from emp1
    Try the following instead:
    Code:
    CREATE PROCEDURE dd (OUT result int)
    LANGUAGE SQL READS SQL DATA select empno into result from emp1
    Make sure that you don't get a -811 at runtime!
    Last edited by Peter.Vanroose; 06-17-07 at 15:37.
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

Posting Permissions

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