Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
djj55
Constraint Violating Yak Guru
352 Posts |
Posted - 2013-09-19 : 11:18:13
|
Hello, If I use BEGIN TRAN and COMMIT TRAN within a stored procedure will the locks be removed?CREATE PROCEDURE myproc ASBEGINBEGIN TRAN.. Locking/blocking codeCOMMIT TRAN.. Other codeEND So will the lock be released after the commit or help until the procedure finishes?Thank you,djj |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2013-09-19 : 12:32:36
|
Once you have committed or rolled back the transaction, the locks are removed.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
djj55
Constraint Violating Yak Guru
352 Posts |
Posted - 2013-09-19 : 13:12:44
|
Thank you. djj |
|
|
|
|
|