|
Comments
|
|
nice and simple...
|
|
|
I learn so much from you guys all the time - and I've been using SQL Server since version 7.
|
|
Steve Harris on
1/18/2010
what happens if you name your transaction block ... can you choose which block to commit?
|
|
|
Rollback decrement the @@Trancount to zero regardless of of the @@Trancount count. This is somewhat strange as I would expect the Rollback to decrement the Trancount by one. I am sure you are covering this in your future videos
|
|
|
excellent video
|
|
|
Good introduction!
|
|
|
From Books online:
Committing inner transactions is ignored by the SQL Server Database Engine. The transaction is either committed or rolled back based on the action taken at the end of the outermost transaction. If the outer transaction is committed, the inner nested transactions are also committed. If the outer transaction is rolled back, then all inner transactions are also rolled back, regardless of whether or not the inner transactions were individually committed.
|
|
|
Would like to have more..
|
|
|
Nice video, but I don't agree that you should always check the @@transcount value before committing a transaction. Almost all scenarios that I am familiar with, I would WANT commit transaction to throw an error if there was no open transaction. I would not want to have accidentally forgotten to open a transaction, and then never be notified that my script is non-transactional.
|
|
|
rollback transaction will rollback all changes since the outer-most begin transaction and reset @@trancount back to zero. For instance.
begin transaction
begin transaction
begin transaction
rollback transaction
-- @@trancount is now zero
|
|
|
Good. Why didn't he demonstrate WHILE @@trancount > 0 ?
|
|
|
Very helpful. Thank you....
|
|
Marc Moshman on
1/21/2010
What's the scope of a rollback? Back to the first 'begin tran' or does it behave like the 'commit tran's?
|
|
|
I didn't find it too much - it was fine.
|
|
|
very clear and easy to understand...
|
|
|
very clear and easy to understand...
|
|
|
Thanks for the great example.
|
|
|
gud
|
|
|
Good video, would have been nice if you explained how it works if you need to rollback. A single rollback will rollback all transactions.
|
|
|
Very informative, as usual.
|