If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Help : DB2 UDB and jdbc

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-16-07, 03:51
sara123 sara123 is offline
Registered User
 
Join Date: Jun 2007
Posts: 1
Question 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
Reply With Quote
  #2 (permalink)  
Old 06-16-07, 09:58
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #3 (permalink)  
Old 06-16-07, 16:23
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
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/
Reply With Quote
  #4 (permalink)  
Old 06-17-07, 04:04
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
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.
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/

Last edited by Peter.Vanroose; 06-17-07 at 04:07.
Reply With Quote
  #5 (permalink)  
Old 06-17-07, 12:23
ASHOKJOSE ASHOKJOSE is offline
Registered User
 
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
Reply With Quote
  #6 (permalink)  
Old 06-17-07, 12:30
ASHOKJOSE ASHOKJOSE is offline
Registered User
 
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
Reply With Quote
  #7 (permalink)  
Old 06-17-07, 13:52
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
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!
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/

Last edited by Peter.Vanroose; 06-17-07 at 14:37.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On