How to check current pool size of SQL Server

后端 未结 2 1767
情话喂你
情话喂你 2021-02-13 18:29

Is there a way to check the current connection pool size in SQL Server? I am not talking about the max connection pool size, but the current pool size. Let\'s say the max pool s

2条回答
  •  自闭症患者
    2021-02-13 19:30

    I think to accomplish this, you would want to use the NumberOfActiveConnections performance counter in ADO.Net (if that is an option for you). This article talks about that specific counter:

    http://msdn.microsoft.com/en-us/library/ms254503(v=vs.110).aspx

    It's off by default, so you'll have to add some configuration to enable it. That is detailed in the following link. The following link also has some sample code to read the counter.

    http://msdn.microsoft.com/en-us/library/ms254503(v=vs.110).aspx#ActivatingOffByDefault

    Hope this helps!

提交回复
热议问题