Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

What causes open transactions sys.dm_exec_requests? Expand / Collapse
Author
Message
Posted Monday, February 11, 2013 10:08 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-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?
Post #1418541
Posted Monday, February 11, 2013 8:19 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

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
Post #1418721
Posted Tuesday, February 12, 2013 8:15 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, May 18, 2013 2:30 AM
Points: 106, Visits: 545
Got it, thanks!
Post #1418994
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse