Solved

View how many SQL connections are active in an IIS application pool?

Posted on 2014-03-13
2
1,397 Views
Last Modified: 2014-03-18
I can use Perfmon.exe to view the number of active SQL connections, but i don't know how to further narrow that down to see how many active connections exist in a particular IIS application pool.  Is there anyway for me to see, via a SQL command, or an IIS command or a Perfmon counter....how many active SQL connections are being utilized in a given IIS application pool?  Thanks!

MSSQL 2012, Windows 2012 R2 Server, IIS8
0
Comment
Question by:arthurh88
2 Comments
 
LVL 33

Expert Comment

by:Big Monty
ID: 39929502
you may want to look into the free version of this tool, it'll analyze all sorts of data based off of your iis logs:

http://www.smartertools.com/smarterstats/web-analytics-seo-software.aspx
0
 
LVL 19

Accepted Solution

by:
Melih SARICA earned 500 total points
ID: 39929635
SELECT sqltext.TEXT,req.session_id,req.status,req.command,req.cpu_time,req.total_elapsed_time,ses.program_name,ses.client_interface_name,ses.login_name,con.client_net_address
FROM sys.dm_exec_requests req
inner join sys.dm_exec_sessions ses on req.session_id = ses.session_id
inner join sys.dm_exec_connections con on req.session_id = con.session_id
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext	 where req.session_id <> @@SPID

Open in new window


Query above Shows u the recent running queries and its text and also the active connections with username,programname( if u set application parameter in connectionstring) , ClientIp adress etc..
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question