January 11, 2014 at 11:14 pm
Comments posted to this topic are about the item Dynamic Management Functions
January 11, 2014 at 11:18 pm
Simple, yet good question, thank you Steve.
Thanks & Best Regards,
Hany Helmy
SQL Server Database Consultant
January 12, 2014 at 4:40 pm
Good question, foiled by haste.
Hope this helps...
Ford Fairlane
Rock and Roll Detective
January 13, 2014 at 12:13 am
Easy question to start the week, thanks!
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
January 13, 2014 at 12:37 am
This was removed by the editor as SPAM
January 13, 2014 at 1:35 am
For SQL Server 2008 R2 there is no valid answer, as sys.dm_exec_sessions does not contain the open tran count. But thanks to this, I have learned that this column is new in SQL Server 2012 π
Best Regards,
Chris BΓΌttner
January 13, 2014 at 5:06 am
Christian Buettner-167247 (1/13/2014)
For SQL Server 2008 R2 there is no valid answer, as sys.dm_exec_sessions does not contain the open tran count. But thanks to this, I have learned that this column is new in SQL Server 2012 π
Chris:
You are correct. 2012 is where the open transaction field\count was added to the dm_exec_sessions. But you can get the transaction count in 2008 by joining (cross apply, join, etc.) with exec_requests and cross applying sql_text and query_plan to generate a "monitoring" tool.
However, this is a question I had on one of my tests and believe it or not, they took it directly from BOL and TechNet and I got it wrong because of the open tran count per session.:ermm:
January 13, 2014 at 7:58 am
Thanks for the question Steve. Good way to start the week.
January 13, 2014 at 11:13 am
Christian Buettner-167247 (1/13/2014)
For SQL Server 2008 R2 there is no valid answer, as sys.dm_exec_sessions does not contain the open tran count. But thanks to this, I have learned that this column is new in SQL Server 2012 π
+ 1. Nice question. Thanks!
January 13, 2014 at 12:29 pm
Great Question for a Monday. I do have to say that I had to research if Open Tran count was part of any version of sys.dm_exec_sessions contained Tran count before selecting an answer. π
January 13, 2014 at 12:32 pm
Sweat that one out. I must stop thinking everyone is out to trick me!
January 14, 2014 at 10:10 am
Nice headscratcher, Steve - thanks!
January 17, 2014 at 1:24 am
KWymore (1/13/2014)
Christian Buettner-167247 (1/13/2014)
For SQL Server 2008 R2 there is no valid answer, as sys.dm_exec_sessions does not contain the open tran count. But thanks to this, I have learned that this column is new in SQL Server 2012 π+ 1. Nice question. Thanks!
+1
February 12, 2014 at 2:24 am
Might be useful to state which SQL version, as some estates have several versions available.
Btw, isn't sys.dm_exec_cursors the only DMF, the others are DMV's?
I went with the only function as it looked like a trick question!
Thanks.
Viewing 15 posts - 1 through 15 (of 15 total)
You must be logged in to reply to this topic. Login to reply