Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I tell how many SQL Connections I have open in a windows service?

I'm seeing some errors that would indicate a "connection leak". That is, connections that were not closed properly and the pool is running out. So, how do I go about instrumenting this to see exactly how many are open at a given time?

like image 648
Kilhoffer Avatar asked Sep 18 '08 20:09

Kilhoffer


People also ask

How do I find the maximum number of connections in SQL Server?

Using SQL Server Management Studio Select the Connections node. Under Connections, in the Max number of concurrent connections box, type or select a value from 0 through 32767 to set the maximum number of users that are allowed to connect simultaneously to the instance of SQL Server.


1 Answers

If you're using .net, there's the .net data provider for SQL server in PerfMon. You can look at NumberOfPooledConnections there

screenshot of perf monitor

like image 126
Danimal Avatar answered Sep 22 '22 14:09

Danimal