IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sqlcode -905, please help


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Machani Hanuprasad

New User


Joined: 06 Jun 2012
Posts: 11
Location: India

PostPosted: Thu Sep 27, 2012 7:32 pm
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Sep 27, 2012 7:46 pm
Reply with quote

:: 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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Thu Sep 27, 2012 7:52 pm
Reply with quote

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
View user's profile Send private message
Machani Hanuprasad

New User


Joined: 06 Jun 2012
Posts: 11
Location: India

PostPosted: Fri Sep 28, 2012 9:12 am
Reply with quote

Thanks Akatsukami.

Regards
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Fri Sep 28, 2012 2:12 pm
Reply with quote

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
View user's profile Send private message
Machani Hanuprasad

New User


Joined: 06 Jun 2012
Posts: 11
Location: India

PostPosted: Fri Sep 28, 2012 4:48 pm
Reply with quote

Hi Friends Thanks for your suggestions.
This has been resolved.

Thanks & Regards
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Fri Sep 28, 2012 4:53 pm
Reply with quote

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
View user's profile Send private message
Machani Hanuprasad

New User


Joined: 06 Jun 2012
Posts: 11
Location: India

PostPosted: Mon Oct 01, 2012 10:29 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts SQLCODE = -122 while using the scalar... DB2 4
No new posts SQLCODE = -16002 when using XMLEXISTS DB2 1
No new posts Is SQLCODE -811 possible while fetchi... DB2 1
No new posts SQLCODE=-204 SQLSTATE=42704 DB2 4
No new posts Getting sqlcode 805 while executing R... DB2 10
Search our Forums:

Back to Top