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

Need Clarification On Rollback in Db2


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

New User


Joined: 29 May 2008
Posts: 15
Location: CHENNAI

PostPosted: Tue Jul 07, 2009 10:39 am
Reply with quote

If a program opens a cursor and tried to fetch values, in the meantime it was deadlocked with some other transaction.
Now, the rollback process happens as a recovery of deadlock
after the roll back, what would be the status of the CURSOR whcih was opened earlier ?
Can anyone please clarify ..?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jul 07, 2009 7:24 pm
Reply with quote

Hello,

When a rollback occurs, all of the updates for that unit of work are "undone".

You would need to either have restart code that would re-sync and open a new cursor to continue or reload the data from the beginning of the run an restart from the beginning.

If you are experiencing a deadlock (rather than a timeout), it is probably a design error and correcting the code will eliminate the deadlock. If you are unable or unwilling to correct the design that permits the deadlock, you might avoid the deadlock by scheduling.
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 filter COMMIT/ROLLBACK statements DFSORT/ICETOOL 13
No new posts Need clarification of VSAM FCT and DF... CICS 15
No new posts Clarification regarding BUFNI & B... JCL & VSAM 14
No new posts TWA variable having junk value after ... CICS 1
No new posts DB2 9 - Utilities - COPY,REORG Clarif... DB2 3
Search our Forums:

Back to Top