I have read a few articles on Connection pool
which gave me the basic knowledge as to how it works but i have a few doubts that i need some help with.
Connection pool's syntax according to me
According to me here is the implementation of connection pool in sql connection string is: -
Data Source=.\SQLEXPRESS;Initial Catalog=DBName;User Id=sa;password=123456789;MultipleActiveResultSets = True;Connection Lifetime=0;Min Pool Size=0;Max Pool Size=100;Pooling=true;"
How does maximum pool size work?
- Does it transfer every closed connection to the connection pool?
- If so, then will it maintain 100 such closed connections because of
Max Pool Size=100
? - Will these closed 100 connections in the connection pool still count as active connection to the SQL Server?
- If so, then won't the SQL Server run out of connections if multiple users try to connect it?
- If so, then will it maintain 100 such closed connections because of
- When is connection pool cleared?
- Does it clear automatically or we have to manually clear it?
It will be extremely helpful if you can help me with the above question or guide me to an informative article or a video.