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

The Ultimate Running Requests Reporter Expand / Collapse
Author
Message
Posted Sunday, May 3, 2009 9:13 PM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Monday, October 21, 2013 4:37 PM
Points: 701, Visits: 211
Comments posted to this topic are about the item The Ultimate Running Requests Reporter


Post #709158
Posted Wednesday, May 27, 2009 10:41 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 11:05 AM
Points: 382, Visits: 1,157
Good one. Can you exclude the session_id where this script is running?

Sankar Reddy | http://SankarReddy.com/
Post #724789
Posted Tuesday, May 25, 2010 8:51 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 8:25 AM
Points: 312, Visits: 1,108
Hello,

Congrats on the great script. Very useful!

I have added below a script that would be a great addition to your code. It produces the IP address of the workstation connected. I found it at SQL Central. It would helpful if the user is connected with SQL authentication.

What do you think?

Rudy

SELECT ec.client_net_address AS 'IP Address of Client', es.[program_name] AS 'Name of Application',
es.[host_name] AS 'Host/Computer Name', es.login_name AS 'ID Used',
COUNT(ec.session_id) AS 'Connection Count', @@SERVICENAME AS 'Instance User Is Connected To'
FROM sys.dm_exec_sessions AS es
INNER JOIN sys.dm_exec_connections AS ec
ON es.session_id = ec.session_id
GROUP BY ec.client_net_address, es.[program_name], es.[host_name], es.login_name
ORDER BY ec.client_net_address, es.[program_name]



Post #927527
Posted Monday, December 27, 2010 4:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, March 26, 2014 2:16 PM
Points: 1, Visits: 18
Due to the use of Cross Apply, this will only return rows where the Statement and QueryPlans are available. Change it to an OUTER APPLY to gather all spids.

ie

OUTER APPLY sys.dm_exec_sql_text(sql_handle) AS Statements
OUTER APPLY sys.dm_exec_query_plan(plan_handle) AS QueryPlans
Post #1039366
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse