Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2003
    Location
    PRChina
    Posts
    2

    Angry Unanswered: no clue for -904

    When i tried to run a JAVA program which access DB2 in s/390 environment, it gave me such response as -904 upon making the connection which means "Unavailable resource" , with which there should be something like REASON code to make a clue for tracing problems, but i can not find it anywhere in that output stream, why is it ?
    =========================
    Caught an SQLException:
    SQLSTATE: 57011
    Error code: -904
    Message: DB2SQLJConnection error in native method: constructor: 00D3440E 000010
    00 DDF SQLSTATE=57011 and SQLCODE=-904
    -- stack trace --
    com.ibm.db2.jcc.DB2SQLException: DB2SQLJConnection error in native method: const
    ructor: 00D3440E 00001000 DDF SQLSTATE=57011 and SQLCODE=-904
    at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.setEr ror(DB2SQLJConnecti
    on.java:1662)
    at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.<init >(DB2SQLJConnection
    .java:289)
    at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJDriver.connect(D B2SQLJDriver.java:1
    285)
    at java.sql.DriverManager.getConnection(DriverManager .java:76)
    at java.sql.DriverManager.getConnection(DriverManager .java:119)
    at Hello2.main(Hello2.java:37)
    -- end of stack trace --
    Can't get connection - exiting.
    =====================
    source clip:
    static protected String driver = "ibm.sql.DB2Driver";
    static protected String url = "jdbc:db2os390sqlj:bb01" ;
    con = DriverManager.getConnection(url)

  2. #2
    Join Date
    Sep 2002
    Posts
    456

    Re: no clue for -904

    Originally posted by jarsonlee
    When i tried to run a JAVA program which access DB2 in s/390 environment, it gave me such response as -904 upon making the connection which means "Unavailable resource" , with which there should be something like REASON code to make a clue for tracing problems, but i can not find it anywhere in that output stream, why is it ?
    =========================
    Caught an SQLException:
    SQLSTATE: 57011
    Error code: -904
    Message: DB2SQLJConnection error in native method: constructor: 00D3440E 000010
    00 DDF SQLSTATE=57011 and SQLCODE=-904
    -- stack trace --
    com.ibm.db2.jcc.DB2SQLException: DB2SQLJConnection error in native method: const
    ructor: 00D3440E 00001000 DDF SQLSTATE=57011 and SQLCODE=-904
    at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.setEr ror(DB2SQLJConnecti
    on.java:1662)
    at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.<init >(DB2SQLJConnection
    .java:289)
    at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJDriver.connect(D B2SQLJDriver.java:1
    285)
    at java.sql.DriverManager.getConnection(DriverManager .java:76)
    at java.sql.DriverManager.getConnection(DriverManager .java:119)
    at Hello2.main(Hello2.java:37)
    -- end of stack trace --
    Can't get connection - exiting.
    =====================
    source clip:
    static protected String driver = "ibm.sql.DB2Driver";
    static protected String url = "jdbc:db2os390sqlj:bb01" ;
    con = DriverManager.getConnection(url)

  3. #3
    Join Date
    Sep 2002
    Posts
    456

    Re: no clue for -904

    well, there could be many reasons but check if the tablespace(table data and indexes) you are trying to access are online. Ask the DBA in your company to make sure the above.

    dollar

    Originally posted by jarsonlee
    When i tried to run a JAVA program which access DB2 in s/390 environment, it gave me such response as -904 upon making the connection which means "Unavailable resource" , with which there should be something like REASON code to make a clue for tracing problems, but i can not find it anywhere in that output stream, why is it ?
    =========================
    Caught an SQLException:
    SQLSTATE: 57011
    Error code: -904
    Message: DB2SQLJConnection error in native method: constructor: 00D3440E 000010
    00 DDF SQLSTATE=57011 and SQLCODE=-904
    -- stack trace --
    com.ibm.db2.jcc.DB2SQLException: DB2SQLJConnection error in native method: const
    ructor: 00D3440E 00001000 DDF SQLSTATE=57011 and SQLCODE=-904
    at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.setEr ror(DB2SQLJConnecti
    on.java:1662)
    at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.<init >(DB2SQLJConnection
    .java:289)
    at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJDriver.connect(D B2SQLJDriver.java:1
    285)
    at java.sql.DriverManager.getConnection(DriverManager .java:76)
    at java.sql.DriverManager.getConnection(DriverManager .java:119)
    at Hello2.main(Hello2.java:37)
    -- end of stack trace --
    Can't get connection - exiting.
    =====================
    source clip:
    static protected String driver = "ibm.sql.DB2Driver";
    static protected String url = "jdbc:db2os390sqlj:bb01" ;
    con = DriverManager.getConnection(url)

  4. #4
    Join Date
    Apr 2003
    Location
    Florida
    Posts
    79
    Have your mainframe DBA run this:

    -DISPLAY DB(<database name>) SPACENAM(*) LIMIT(*)

    or ask them if they use a tool to monitor db2 thread error messages (like Insight) - that will tell you exactly who is holding your resource.

    Rick

  5. #5
    Join Date
    Apr 2003
    Location
    Trier, Germany
    Posts
    28
    Iīm sorry, but RICK is worng...
    It is correct to use
    -DIS DB(*) space(*) RES to see, if one tablespace is in restricted state, because you get this, too, if a corresponding tablespace is in a restricted state.

    You should take a look in the z/OS-Log, because -904 always puts a more detailed record (including the REASON-Code) in the system log.

    Ingo

    Originally posted by Rick-dba
    Have your mainframe DBA run this:

    -DISPLAY DB(<database name>) SPACENAM(*) LIMIT(*)

    or ask them if they use a tool to monitor db2 thread error messages (like Insight) - that will tell you exactly who is holding your resource.

    Rick

  6. #6
    Join Date
    Apr 2003
    Location
    Florida
    Posts
    79

    Red face

    ooops - I was wrong.... I meant to say:

    -DISPLAY DB(<your db name>) SPACENAM(*) CLAIMERS

    This will tell you if the tablespace is open for read/write access, and who is holding the resource.

    Sorry for the mis-information.

    Rick

  7. #7
    Join Date
    Apr 2003
    Location
    PRChina
    Posts
    2

    Talking thanx

    i found it mainly an environmental problem

    i did connect to DB2 with another SSID

    but the former SSID i used was not properly authorized to PUBLIC with the DBRM DSNJDBC2 be bound to PLAN DSNACLI

    but when i changed the SSID and did my job again, everthing became crystal

    thanks again RICK & WizardOfGermany

Posting Permissions

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