March 9, 2008 at 11:38 pm
Comments posted to this topic are about the item Who did what?
..>>..
MobashA
March 10, 2008 at 11:39 am
Nice. I will keep this one.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 11, 2008 at 12:48 am
thanks.
do any one have a solution if i need to run this select every 2 seconds?
i have been trying but am stuck in a dead end.
..>>..
MobashA
March 24, 2008 at 5:18 pm
After playing with it a little this is definitely a useful query, but the article could certainly go with more explanation about what its intent is and how it functions. That would make it a bit easier to understand.
---
Timothy A Wiseman
SQL Blog: http://timothyawiseman.wordpress.com/
March 24, 2008 at 5:29 pm
Probably should be listed under "Scripts" instead of "Articles".
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 24, 2008 at 5:34 pm
mobasha (3/11/2008)
thanks.do any one have a solution if i need to run this select every 2 seconds?
i have been trying but am stuck in a dead end.
Well, this does what you asked for, but probably is not what you want:
While (1=1)
BEGIN
Waitfor Delay '00:00:02'
{your query's}
END
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 24, 2008 at 5:39 pm
I don't know any tricks to get periodic query refreshing inside SSMS, I always write a VB.net client to do this kind of stuff.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 25, 2008 at 12:46 am
thanks all.
ur solution were v.smart.
thanks a lot for the help.
..>>..
MobashA
March 25, 2008 at 7:06 am
March 25, 2008 at 11:53 pm
MobashA, you're welcome.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 28, 2008 at 11:57 am
Hi,
Is this script for 2005 only or does it work for 2000? Thanks.
April 28, 2008 at 3:34 pm
Looks like good info to have. . ., but my SSMS query keeps rejecting the code. It complains about the three inline queries for the elements from dm_exec_sql_text function, doesn't like the '.' within the function argument. Is this a database compatibility issue?
Any ideas?:)
October 27, 2008 at 8:26 am
I like to know when who is doing in the query.
Can anybody help?
Thanks.
Ke
December 19, 2008 at 12:39 pm
Very helpful script. Thanks. I changed it a bit to make the code cleaner. This produces the same result:
USE MASTER
SELECT
s.session_id, s.host_name, s.program_name, s.client_interface_name, s.login_name
,s.nt_domain, s.nt_user_name, c.client_net_address, c.local_net_address
--,c.connection_id,c.parent_connection_id, c.most_recent_sql_handle
,(SELECT text FROM sys.dm_exec_sql_text(c.most_recent_sql_handle)) as sqlscript
,(SELECT db_name(dbid) FROM sys.dm_exec_sql_text(c.most_recent_sql_handle)) as databasename
,(SELECT object_id(objectid) FROM sys.dm_exec_sql_text(c.most_recent_sql_handle)) as objectname
FROM
sys.dm_exec_sessions as s
INNER JOIN
sys.dm_exec_connections as c
ON c.session_id = s.session_id
January 6, 2012 at 3:32 pm
nice script ...amazing result which i want to see it.
thanks
Viewing 15 posts - 1 through 15 (of 20 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy