Solved

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

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp web application 3 39
Need help with another query 10 37
Blocking outside IP Addresses 16 46
Display info from DB to Label in asp.net 7 10
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…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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 UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

756 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