How to get SQL Text and Query Plan for statements which are executing now
Posted by Karthick P.K on February 1, 2010
SELECT getdate() as "RunTime", st.text as batch, SUBSTRING(st.text,statement_start_offset / 2+1 , ( (CASE WHEN a.statement_end_offset = -1 THEN (LEN(CONVERT(nvarchar(max),st.text)) * 2) ELSE a.statement_end_offset END) - a.statement_start_offset) / 2+1) as current_statement ,qp.query_plan, a.* FROM sys.dm_exec_requests a CROSS APPLY sys.dm_exec_sql_text(a.sql_handle) as st CROSS APPLY sys.dm_exec_query_plan(a.plan_handle) as qp order by CPU_time desc
If you liked this post, do like us on Facebook at https://www.facebook.com/mssqlwiki and join our Facebook group https://www.facebook.com/mssqlwiki#!/groups/454762937884205/
Thank you,
Karthick P.K |My Facebook Page |My Site| Blog space| Twitter
then visit Emmanuel Adegbola to find the best advice on cheap mlm lead for you. cheap mlm lead said
Hey there are using WordPress for your blog platform?
I’m new to the blog world but I’m trying to get started and set up my own.
Do you need any html coding expertise to make your own blog?
Any help would be really appreciated!
reputable credit card debt relief companies reputable credit card debt settlement companies request a credit limit increase chase request a credit limit increase chase freedom request a credit line increase chase request a credit line increase chase credi said
Excellent happy synthetic eyesight just for fine detail and can foresee issues prior to they will happen.
choi co tuong said
Mix – Zing is available in a free version that includes ads and a
pay version that makes the lock-screen widget available.
MP3tunes Locker, MP3 Music Download Advance, Music Box, and Music Junk are four more music apps designed for Android.
This is typical of positions that have a lot of flaws in pawn structure, which
is why you should avoid having these weaknesses in your own games.
Top SQL Server blogs from MSSQLWIKI « MSSQLWIKI said
[…] How to get SQL Text and Query Plan for statements which are executing now […]
smoothie recipes kale pineapple said
If your preferred fruit isn’t in season, use a package of frozen fruit with its syrup.
Ways to attain the best advantages from
your healthy and balanced smoothie recipes is always to look at the proper mix
of fruit and veggies. cup frozen strawberries, and one scoop vanilla
protein powder in a blender and blend until smooth and
frosty.
Debt Advice said
I believe what you said made a lot of sense.
However, what about this? what if you added a little content?
I mean, I don’t wish to tell you how to run your blog, however suppose you added a post title that grabbed
people’s attention? I mean How to get SQL Text and Query Plan for statements
which are executing now MSSQLWIKI is kinda plain. You might peek at
Yahoo’s home page and watch how they create news headlines to grab viewers
interested. You might try adding a video or a picture or two to grab readers excited about what you’ve written.
Just my opinion, it would make your website a little livelier.
compare said
Qualіty posts is the secret to invite the users to pay a quick visit
the sіte, that’s what tһis web site іs providіng.