Start of change

-905   UNSUCCESSFUL EXECUTION DUE TO RESOURCE LIMIT BEING EXCEEDED, RESOURCE NAME = resource-name LIMIT = limit-amount1 CPU SECONDS (limit-amount2 SERVICE UNITS) DERIVED FROM limit-source

Explanation

The execution of the SQL statement was terminated because a resource limit was exceeded.
resource-name
The name of the resource whose limit was exceeded. It is also the name of the column in the DB2® table from which the limit was derived. The resource-name can be ASUTIME, which is the number of CPU seconds permitted for each SQL statement.
limit-amount1
The maximum number of CPU seconds permitted
limit-amount2
The maximum number in service units permitted
limit-source
The source used to derive the limit-amount: the name of a resource limit specification table, a system parameter, or the SYSIBM.SYSROUTINES catalog table. If the source is a system parameter, the resource limit specification table did not contain an applicable entry or an error occurred while accessing the table.

System action

If the limit-source was a resource limit specification table or a system parameter, the execution of this SQL statement is terminated.

In the case of a routine exceeded ASUTIME threshold, the current transaction is rolled back to the previous commit point. The thread is placed into a must rollback state, and no SQL statements can be processed before a ROLLBACK is issued.

A trace record containing more detailed information about this failure is generated. If an SQL cursor is associated with the failed instruction, its position is unchanged and a CLOSE or PREPARE statement can be issued. If any other operation is attempted with the cursor, it cannot be executed and SQLCODE -905 is returned. If there is no cursor, this statement was rolled back.

Programmer response

Determine why this SQL statement or stored procedure took so long and take appropriate action. Consider simplifying the SQL statement, restructuring tables and indexes, or contacting the installation group responsible for maintaining the resource limit specification tables.

If the limit-source was a resource limit specification table or a system parameter, the application program that receives this return code can execute additional SQL statements.

If SQLCODE -905 is issued in response to a dynamic statement that is monitored by the resource limit facility and that is inside a routine, increase the ASUTIME value that is specified for the top-level calling package in the resource limit table. The limit specified for the top-level calling package is applied for the entire thread.

SQLSTATE

57014

End of change