开发者

How can one restart/reset SQL connection pool in .Net?

开发者 https://www.devze.com 2023-01-04 06:30 出处:网络
I am having a near critical issue with my app using SqlClient against a MS SQL server. The problem is that the SQL server is clustered in a Failover Cluster. If one of the nodes fails or the other no

I am having a near critical issue with my app using SqlClient against a MS SQL server.

The problem is that the SQL server is clustered in a Failover Cluster. If one of the nodes fails or the other node is made active, it seems like the connectionpool is still connected to the old server.

The result is that I get exceptions as that node is probably either offline or has turned off all rights for all users to prevent access (dont know how the system does it).

A system tech gave me the idea that the connectionpool could be an issue as they had solved similar problems with webapps by 开发者_如何学JAVAdoing a IISRESET which you should not do in a 100% uptime environment as my app is a part of.

So. Does anyone know how to reset or restart the connectionpool so that it reconnects to the right server? (the active server)

(unsure if the question is a duplicate. pressed post but nothing happened)


You could take a look at the ClearAllPools static method.

0

精彩评论

暂无评论...
验证码 换一张
取 消