-
rollback of sp calling another sp
If you have a begin tran in a sp that calls another sp and that called sp fails. can you execute a roll back from the called sp, or should it return and error which will roll back the begin tran in the original sp
-
Yes you can call ROLLBACK in called sp. You have to remember that no matter how many begin tran you have issued, ROLLBACK rollsback every thing. This is in contrast to COMMIT, which commits the inner most level only.
Look for "nested transactions" in BOL.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|