Solved

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

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

Expert Comment

by:Big Monty
Comment Utility
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
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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.
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

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now