17 may
2019

SQLConnection pool size and active connection count in C#

In C# it is possible to enable/disable Connection Pooling by using "Pooling=True" and "Max Pool Size=XY" in connection string.

Like: What is maximum allowable value of "Max Pool Size" in sql connection string

Is it possible to ask how many connections to SQL server is active and what is the current pool size programmatically?

COMENTARIOS

Vlad Rudenko

You can use NumberOfActiveConnections or NumberOfPooledConnections ADO.NET performance counter:

https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/performance-counters

DEJA TU COMENTARIO

© 2017 website by Rubit Corporation