Search code examples
.netsql-serverado.netsqlconnection

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?


Solution

  • 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