|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Saturday, May 18, 2013 2:30 AM
Points: 106,
Visits: 545
|
|
| 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?
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 8:26 AM
Points: 6,737,
Visits: 11,791
|
|
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
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Saturday, May 18, 2013 2:30 AM
Points: 106,
Visits: 545
|
|
|
|
|