February 11, 2013 at 10:08 am
What actually opens a transaction? For example, if I look at the currently running queries, several may say running but it one my have open_transaction_count = 0 while the other may be = 1. How can a request be be running but not be considered an open transaction? Is it just explicit transcations? I thought any running statment in SQL server was considered to be an transaction, just implicitly. Can someone explain?
February 11, 2013 at 8:19 pm
All statements are atomic, either they complete successfully or they fail, so yes they maintain their own transactions internally to ensure that all work done by the statement either completes or none of it completes. That said, those do not register as open transactions because technically the transaction is managed internally by SQL Server. sys.dm_exec_requests only shows open explicit transactions of running sessions.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
February 12, 2013 at 8:15 am
Got it, thanks!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply