Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Location
    china
    Posts
    13

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

  2. #2
    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

  3. #3
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    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...

  4. #4
    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

Posting Permissions

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