View previous topic :: View next topic
|
Author |
Message |
muhammad
New User
Joined: 25 Oct 2007 Posts: 19 Location: hyderabad
|
|
|
|
Hi
A program fails with -911 during a FETCH statement for a cursor.... It fetches around 30000 records properly and then -911 occurs... And i guess, those 30000 records will be inserted into another table...
The program is coded with restart logic, so that when restarting, in the next run it will ignore those inserted records in the previous run... But restaring again fails with -803..
I am not sure if something needs to be done to avoid -803, but can this -911 be handled? Can we check for -911 after the fetch statement and do somthing to have the deadlock fixed?
Suggestions please... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
It may be that the -803 is caused because the restart logic is incorrect. If this is true, the code needs to be corrected regardless of the -911 situation.
This from IBM on the 911 error:
Quote: |
-911 THE CURRENT UNIT OF WORK HAS BEEN ROLLED BACK DUE TO DEADLOCK OR
TIMEOUT. REASON reason-code, TYPE OF RESOURCE resource-type, AND
RESOURCE NAME resource-name
|
Have you identified the reason-code, resouse-type, and resource-name from the problem sql statement?
More complee information on the -911 is available here:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dsnmc0f7/2.1.7.322? |
|
Back to top |
|
|
muhammad
New User
Joined: 25 Oct 2007 Posts: 19 Location: hyderabad
|
|
|
|
Yes... I have identified the reason code, type, resource name...
What should I do with that? |
|
Back to top |
|
|
muhammad
New User
Joined: 25 Oct 2007 Posts: 19 Location: hyderabad
|
|
|
|
reason code 00C90097
resource type 210 |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
Dulicate Index?
Rebuild? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
muhammad
New User
Joined: 25 Oct 2007 Posts: 19 Location: hyderabad
|
|
|
|
yes.. issue with restart logic... i have found a fix to avoid -803...
but is there a way to handle -911??? |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
Quote: |
but is there a way to handle -911??? |
Handled via the program : trap the SQLCODE and act with retries ... to a certain point. |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Muhammad,
-911, DEADLOCK or TIMEOUT.
if you are fetching data from one table(SELECT) & inserting into another table(INSERT). you can fetch the data using WITH UR; because the data you are trying to fetch, someone else is using it.
If the data is critical don't use WITH UR, reduce the number of fetches.
Sushanth |
|
Back to top |
|
|
|