Home > database >  com.ibm.db2.jcc.am.SqlException: UNSUCCESSFUL EXECUTION CAUSED BY AN UNAVAILABLE RESOURCE. REASON 00
com.ibm.db2.jcc.am.SqlException: UNSUCCESSFUL EXECUTION CAUSED BY AN UNAVAILABLE RESOURCE. REASON 00

Time:02-01

I want to insert multiple records in a multi-thread function into DB and after inserting a specific amount of records i become always the following exception:

Outermost stacktrace: com.ibm.db2.jcc.am.SqlException: UNSUCCESSFUL EXECUTION CAUSED BY AN UNAVAILABLE RESOURCE. REASON 00C90096, TYPE OF RESOURCE 00000304, AND RESOURCE NAME X'0005AB8C'.X'02'. SQLCODE=-904, SQLSTATE=57011, DRIVER=4.31.10
    at com.ibm.db2.jcc.am.b7.a(b7.java:815)
    at com.ibm.db2.jcc.am.b7.a(b7.java:66)
    at com.ibm.db2.jcc.am.b7.a(b7.java:140)
    at com.ibm.db2.jcc.am.k_.b(k_.java:2491)
    at com.ibm.db2.jcc.am.k_.c(k_.java:2472)
    at com.ibm.db2.jcc.t4.ab.n(ab.java:917)
    at com.ibm.db2.jcc.t4.ab.a(ab.java:118)
    at com.ibm.db2.jcc.t4.p.a(p.java:50)
    at com.ibm.db2.jcc.t4.aw.b(aw.java:220)
    at com.ibm.db2.jcc.am.la.bm(la.java:3632)
    at com.ibm.db2.jcc.am.la.a(la.java:4677)
    at com.ibm.db2.jcc.am.la.b(la.java:4215)
    at com.ibm.db2.jcc.am.la.be(la.java:832)

Is that somthing because i tried to write into DB via multiple threads? What is the reason?

CodePudding user response:

According to IBM documentation:

The page or row lock on the page or subpage identified by the NAME resource-name value in message DSNT500I or DSNT501I caused the total number of page or row locks concurrently held to reach the installation maximum number of page or row locks (NUMLKUS) allowed for a single agent in the system

I assume that you have to reduce the number of dirty pages or in another word uncommitted changes into DB. Alternatively you can also commit your changes during the process to reduce the number uncommitted changes.

  • Related