View previous topic :: View next topic
|
Author |
Message |
Machani Hanuprasad
New User
Joined: 06 Jun 2012 Posts: 11 Location: India
|
|
|
|
I have a job which executes a SQL query which is saved as a member in a copybook library. When I submit the job I'm getting Sqlcode -905 in successful execution, resource limit exceeded. Actually the query should execute and output the rows in a flat file. Please can anyone helpme on this.
Thanks... |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
:: sigh :: Do you know what a "resource limit" is? What DB2 is telling you is your query is so badly written that it takes too many CPU seconds, etc., to run. Get together with your DBAs and ask them to aid you in making the query more efficient. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
Is it a new job and getting tested very first time? if so then follow Akatsukami.
Otherwise if it is running since long time in production and failed today once, then have a explain on your query and then talk to your DBAs as there might be chances of INDEXes getting removed. |
|
Back to top |
|
|
Machani Hanuprasad
New User
Joined: 06 Jun 2012 Posts: 11 Location: India
|
|
|
|
Thanks Akatsukami.
Regards |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
which was easily found when one would READ the explanation of the sqlcode :
Quote: |
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. |
|
|
Back to top |
|
|
Machani Hanuprasad
New User
Joined: 06 Jun 2012 Posts: 11 Location: India
|
|
|
|
Hi Friends Thanks for your suggestions.
This has been resolved.
Thanks & Regards |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
Quote: |
Hi Friends Thanks for your suggestions.
This has been resolved. |
Did you follow us? what solution you ended up with? this will be helpful infuture for similar questions. |
|
Back to top |
|
|
Machani Hanuprasad
New User
Joined: 06 Jun 2012 Posts: 11 Location: India
|
|
|
|
Actually the query is given by developers team which is not an optimized query. The condition specified is completly wrong and is fetching more number of records through which it is getting -905. We informed the same stating the problem over given query. So, finally DB team came into the picture and suggested with proper query a/c to requirement.
Regards |
|
Back to top |
|
|
|