tapensa.blogg.se

Ado.net sql server connection string
Ado.net sql server connection string











To determine if an internal connection can be used for a current request by a SqlConnection, ADO.NET compares several (not all) connection string information. If a connection is not used for a longer time it becomes automatically closed by the ADO.NET connection pooler, to release resources on SQL Server. As soon as the connection is not needed any more it becomes sent back into the connection pool. If an existing, free connection is available ADO.NET wont create a new database connection but reuse the existing one. Whenever a new SqlConnection becomes opened it asks the connection pool for an existing, and currently not used, internal connection. NET framework is just a wrapper for the real, internal database connection. This means, the well known SqlConnection object from. To handle those two issues, ADO.NET uses connection pooling.

ado.net sql server connection string

On the other side, it does not make sense to keep keep connections open for the whole lifetime of a application, since this causes a higher session management overhead on server side due to many concurrent connections. The server needs to allocate new memory, create a new session, allocate all needed client information, authenticate the client and so on. The creation of a new database connection is a relatively expensive process on server side.













Ado.net sql server connection string