SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


The Ultimate Running Requests Reporter


The Ultimate Running Requests Reporter

Author
Message
YeshuaAgapao
YeshuaAgapao
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1297 Visits: 211
Comments posted to this topic are about the item The Ultimate Running Requests Reporter



Sankar Reddy
Sankar Reddy
SSC Eights!
SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)SSC Eights! (850 reputation)

Group: General Forum Members
Points: 850 Visits: 1250
Good one. Can you exclude the session_id where this script is running?

Sankar Reddy | http://SankarReddy.com/
Rudy Panigas
Rudy Panigas
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2400 Visits: 1322
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]



kevin.karlin
kevin.karlin
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 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
Iwas Bornready
Iwas Bornready
SSC-Insane
SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)

Group: General Forum Members
Points: 22410 Visits: 885
Thanks for the script.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search