From: Neo on
I am trying the execute and admittedly large SQL query against our DB2
database. The query pasted into MS-Word has 2800 words, 21000
characters (w/o spaces), 26000 (w/ spaces) and 1000 lines. There are
UNION ALLS, and subqueries LEFT JOINing to other subqueries. That
said, when it runs, I get a message that says:

ODBC--call failed.

[IBM][CLI Driver][DB2] SQL0905N Unsuccessful execution due to
resource limit being exceeded. Resource = 'ASUTIME", limit =
"000000002181" CPU seconds ("000050000000" service units) dervived
from "TDB2.DSNRLST01". SQLSTATE=57014
(#-905)

Can someone tell me what I'm dealing with here? I have gotten a query
nearly this complex to work in the past. I am submitting it via a pass-
through query from MS-Access.

TIA.

From: Ian on
Neo wrote:
> I am trying the execute and admittedly large SQL query against our DB2
> database. The query pasted into MS-Word has 2800 words, 21000
> characters (w/o spaces), 26000 (w/ spaces) and 1000 lines. There are
> UNION ALLS, and subqueries LEFT JOINing to other subqueries. That
> said, when it runs, I get a message that says:
>
> ODBC--call failed.
>
> [IBM][CLI Driver][DB2] SQL0905N Unsuccessful execution due to
> resource limit being exceeded. Resource = 'ASUTIME", limit =
> "000000002181" CPU seconds ("000050000000" service units) dervived
> from "TDB2.DSNRLST01". SQLSTATE=57014
> (#-905)
>

You're dealing with a configured limit for the amount of CPU time that
your query can use. Talk to your system admin (sysprog? I'm not a
mainframe guy) about this limit.


From: Bernd Hohmann on
Ian wrote:

>> [IBM][CLI Driver][DB2] SQL0905N Unsuccessful execution due to
>> resource limit being exceeded. Resource = 'ASUTIME", limit =
>> "000000002181" CPU seconds ("000050000000" service units) dervived
>> from "TDB2.DSNRLST01". SQLSTATE=57014
>> (#-905)
>>
>
> You're dealing with a configured limit for the amount of CPU time that
> your query can use. Talk to your system admin (sysprog? I'm not a
> mainframe guy) about this limit.

Optimizing the query (using an index, avoid tablescans, check execution
order ....) could do the job too. I had this message years ago where a
stored procedure went mad because of a dropped index.

Bernd
From: Neo on
Now I'm getting...

CLI0115E Invalid cursor state.

Explanation: The statement is not positioned on a row.

User Response: Position the statement on a row by calling SQLFetch or
SQLExtendedFetch and retry the operation.

This is VERY cryptic to me. I'm not a DB2 guy.

From: rpri122 on
On Apr 24, 11:47 pm, Neo <S_p_a_m__S_...(a)hotmail.com> wrote:
> I am trying the execute and admittedly large SQL query against our DB2
> database. The query pasted into MS-Word has 2800 words, 21000
> characters (w/o spaces), 26000 (w/ spaces) and 1000 lines. There are
> UNION ALLS, and subqueries LEFT JOINing to other subqueries. That
> said, when it runs, I get a message that says:
This is a message from the resource limit facility of the db2 z/OS
system.

Your user is limited to a total of 2181 CPU seconds per SQL statement
and the statement you are trying to execute exceeds this limit. So it
is canceled.

In your case these limitations are stored in the TDB2.DSNRLST01 table
so talk to the maintainer of this table to give you some extra CPU
time or let someone have a look on the explain of your sql statement.

Regards

Karl


>
> ODBC--call failed.
>
> [IBM][CLI Driver][DB2] SQL0905N Unsuccessful execution due to
> resource limit being exceeded. Resource = 'ASUTIME", limit =
> "000000002181" CPU seconds ("000050000000" service units) dervived
> from "TDB2.DSNRLST01". SQLSTATE=57014
> (#-905)
>
> Can someone tell me what I'm dealing with here? I have gotten a query
> nearly this complex to work in the past. I am submitting it via a pass-
> through query from MS-Access.
>
> TIA.