. NET database connection pool configuration skills (default)
Source: Internet
Author: User
Control the connection pool with the connection string keyword
The connectionstring attribute is an attribute of the sqlconnection object. It supports a connection string/value pair, which is used to adjust the connection pool behavior. The following table lists the connectionstring values and explanations.
Name
Default Value
Description
Connection lifetime
0
When a connection returns a pool, its time is released if it exists more than the connection lifetime compared to the creation time. This is useful for balancing the servers that are added to the cluster. A value of 0 can guarantee the maximum connection time limit.
Connection Reset
'True'
Determines whether the database connection is reset when the database is moved from the pool.
Enlist
'True'
If it is true, pooler automatically lists the operation context of the currently created thread, if the operation context exists.
Max pool size
100
The maximum number of connections allowed in the pool.
Min pool size
0
The minimum number of connections allowed in the pool.
Pooling
'True'
If the value is true, the connection is retrieved from the corresponding pool. If you need to create or add the connection to the corresponding pool.
Performance calculator of Connection Pool
SQL Server. NET data provider has added some performance counters so that you can adjust the connection pool feature. Below are some calculators:
Counter
Description
Sqlclient: Number of buffered and unbuffered connections
Current number of connections
Sqlclient: number of currently buffered connections
All connections associated with the current process in the pool
Sqlclient: current number of connection pools
Number of pools connected to the current process
Sqlclient: Maximum number of buffer connections
The maximum number of connections used since the start of the process. This counter makes sense only when associated with a specific process. _ The total number of global instances returned is 0.
Sqlclient: Total number of failed connections
Total failures
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service