how many open connection is recommended to leave - in sql server 2008 Enterprise Edition
i have my C# program that work with sql-server 2008 Enterprise Edition
i have 40 users that connect to this开发者_如何学运维 database.
i dont close the connection.
how many open connection is recommended to leave ? or is it better to close connection ?
thank's in advance
Always close your connections, so they can return to the connection pool.
Not doing so may cause the pool to empty up and no new connections will be available, so no new clients (or connections) will be able to connect to the database.
You really should ask yourself how many connections to configure on the connection pool. The optimal number will vary. (Thanks for the comment, Henk).
This is like asking how many faucets and lights you can have on in your house simultaneously. Turn them off!! :)
In general you can set this value in the connection string "Max Pool Size and Default value is 100"
This is an interested article: Connection pool myths
Any way, your application should close connections to release resources.
精彩评论