Solved

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

Posted on 2014-03-13
2
1,362 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL SELECT query help 7 38
VB.net and sql server 4 35
sqlserver get datetime field and create a string 5 18
Bot attack question 11 22
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

773 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