Question & Answer
Question
This problem happens on z/OS®. When I run a query with an OR clause that should return
a lot of results, such as the following,
'/Employee[.//Degree/@Degree = "MBA" OR .//Job/@JobCategory = "Manager"]'
I get this exception:
com.ibm.mm.sdk.common.DKUsageError: DGL5050A: SQL error executing query.
XQPE query: /Employee[.//Degree/@Degree = "MBA" OR .//Job/@JobCategory = "Manager"].
Return code: 7015. Reason code: 0. Extended return code: -904. Extended
reason code: 0.;
ICM7015: During an SQL operation in the library server, an unexpected error occurred.
For details on the error, refer to the database document. (SERVER RC) : 7015 at com.ibm.mm.sdk.server.DKResultSetCursorICM.throwSQLException(DKResultSetCursorICM.java:1072) at com.ibm.mm.sdk.server.DKResultSetCursorICM.prepareAndExecuteSp(DKResultSetCursorICM.java:893) at com.ibm.mm.sdk.server.DKResultSetCursorICM.prepareAndExecuteSp(DKResultSetCurso rICM.java:768)
at com.ibm.mm.sdk.server.DKResultSetCursorICM.open(DKResultSetCursorICM.java:1159)
at com.ibm.mm.sdk.server.DKResultSetCursorICM.Init(DKResultSetCursorICM.java:221)
at com.ibm.mm.sdk.server.DKResultSetCursorICM.
Cause
From the DB2® Messages and Codes, sqlcode -904 and reason code 00C90084 shows that the error is caused by a lack of temporary space. Because the query is returning a lot of results, the 4 KB temporary space was insufficient.
Answer
Ask your DB2 system administrator to give enough space on the temporary table. Your database administrator or the DB2 manuals will have suggestions about the appropriate size of the temporary table. After the temporary database table size has been increased by the database administrator, and DB2 has been restarted, you can run the query again.
From the DB2 Messages and Codes:
> Resource 00000230 is Temporary file / Name 4K (your workfile database 4k
> tablespace - "DSNDB07" or equivalent)
>
> Check your system log for additional messages.
>
> Reason Code 00C90084 explains "An error was detected either during the
> opening of the page set or during the formatting of the header and the
> space map pages of the page set."
>
> Let your system personnel know! If this continues to occur they may need
> to perform the User Response.
>
> Response: Delete and redefine the temporary data set(s) in question, and
> then issue the -START DATABASE
Another solution is to modify the query that can be executed in the database more efficiently. See the related technote # 1231501 for details.
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21233587