View previous topic :: View next topic
|
Author |
Message |
shell100
New User
Joined: 14 Apr 2006 Posts: 25 Location: Banglore,India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
User1 will not rollback work done by user2. |
|
Back to top |
|
|
shell100
New User
Joined: 14 Apr 2006 Posts: 25 Location: Banglore,India
|
|
|
|
Thanks Dick!!
Just to understand - would both the savepoints be different for both Stored proc transactions? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Yes. Each logical unit of work is managed separately. |
|
Back to top |
|
|
|