Solved

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

Posted on 2014-03-13
2
1,498 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
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.
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…

717 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