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 > who can help me? about jdbc

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-16-05, 22:56
ludongyan ludongyan is offline
Registered User
 
Join Date: Aug 2003
Location: china
Posts: 13
who can help me? about jdbc

I connect to db2 use jdbc ,the programe is :

try{
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
Connection db = DriverManager.getConnection("jdbc:db2:dl","db2inst 1","db2inst1");
Statement stmt = db.createStatement();
System.out.println("11111111111111");
Connection db_exec = DriverManager.getConnection("jdbc:db2:dl","db2inst 1","db2inst1");
System.out.println("22222222222222");
Statement ppstmt = db_exec.createStatement();

........


the result of run is :

$ java ImChangeData 3 Dj
11111111111111
[IBM][CLI Driver] SQL1224N A database agent could not be started to service a request, or was terminated as a result of a database system shutdown or a force command. SQLSTATE=55032
Reply With Quote
  #2 (permalink)  
Old 10-17-05, 11:34
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
jdbc

or the instance crashed (see db2diag.log) or you have been forced by system
should give -911
check diaglog on server or activate local trace in db2cli.ini... and see details
__________________
Best Regards, Guy Przytula
DB2/ORA/SQL Services
DB2 DBA & Advanced DBA Certified
DB2 Dprop Certified
http://users.skynet.be/przytula/dbss.html
Reply With Quote
  #3 (permalink)  
Old 10-17-05, 12:29
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by przytula
or the instance crashed (see db2diag.log) or you have been forced by system
...or the maximum number of agents has been reached...
...or it was a personal edition that only allows one connection at a time...
Reply With Quote
  #4 (permalink)  
Old 10-18-05, 04:48
ludongyan ludongyan is offline
Registered User
 
Join Date: Aug 2003
Location: china
Posts: 13
thanks

I check all about you say ,and this programe had run in another system ,but now it can't run.I don't know why.

I change then programe:
try{
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
Connection db = DriverManager.getConnection("jdbc:db2:dl","db2inst 1","db2inst1");
Statement stmt = db.createStatement();
System.out.println("11111111111111");
//Connection db_exec = DriverManager.getConnection("jdbc:db2:dl","db2inst 1","db2inst1");
System.out.println("22222222222222");
Statement ppstmt = db.createStatement();

then it's ok
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