Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Savepoint & Rollback

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
shell100

New User


Joined: 14 Apr 2006
Posts: 25
Location: Banglore,India

PostPosted: Thu May 07, 2009 3:43 pm    Post subject: Savepoint & Rollback
Reply with quote

Need help to understand the significance of putting save point & rollback as below in the case described below

----------------------------------------------------------
EXEC SQL
SAVEPOINT A ON ROLLBACK RETAIN CURSORS
END-EXEC.
-----------------------------------------------------------
IF ERROR-FOUND

EXEC SQL
ROLLBACK TO SAVEPOINT A
END-EXEC
-----------------------------------------------------------

Lets take the scenario -
User1 invoked the SP to update Row1 which will take Save point - A
User2 also invoked the same SP to update Row2 which will again take Save point. Lets assume this transaction get completed.
Now user1 got some issue due to which rollback happened. Would it Rollback included updation done by User2 or it would only rollback user1 transaction.

Thanks in advance
Back to top
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Thu May 07, 2009 8:14 pm    Post subject:
Reply with quote

Hello,

User1 will not rollback work done by user2.
Back to top
View user's profile Send private message
shell100

New User


Joined: 14 Apr 2006
Posts: 25
Location: Banglore,India

PostPosted: Tue May 12, 2009 2:42 pm    Post subject: Reply to: Savepoint & Rollback
Reply with quote

Thanks Dick!!

Just to understand - would both the savepoints be different for both Stored proc transactions?
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Tue May 12, 2009 7:40 pm    Post subject:
Reply with quote

Hello,

Yes. Each logical unit of work is managed separately.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TWA variable having junk value after ... Gopalakrishnan V CICS 1 Tue May 13, 2014 7:59 pm
No new posts Handle ROLLBACK in EXCI interface Pandora-Box CICS 12 Fri Sep 21, 2012 2:38 pm
No new posts Rollback does not remove messages? Susan Talbot Java & MQSeries 5 Fri Sep 23, 2011 11:38 pm
No new posts MQ ROLLBACK? anshuljain26 Java & MQSeries 6 Tue Aug 02, 2011 12:31 am
No new posts Error in CICS SYNCPOINT ROLLBACK enrico-sorichetti CICS 4 Thu Mar 31, 2011 6:22 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us