6

I have a .net website connecting to SQL. Just wondering if connection pooling is enabled by default or is it something I have to activate myself?

Paul White
95.4k30 gold badges440 silver badges689 bronze badges
asked Feb 17, 2016 at 1:16
0

1 Answer 1

10

Essentially this is enabled by default when using the System.Data.SqlClient data provider. There is a very good article about the semantics which can be found here:

SQL Server Connection Pooling (ADO.NET)

Also, you can view the ConnectionString property reference of the SqlConnection class here:

SqlConnection.ConnectionString Property

This contains a lot of information about the options that are available when configuring a connection string for Sql Server.

You should also note that the actual connection pool itself is kept within the Application Pool assigned to the website/web application, so be aware that if you have multiple sites/web applications using the same Application Pool they will also share the same connection pool which may not be desirable to you.

As such, I would recommend assigning a new application pool for each website and each web application underneath the site itself. You can find information about application pools at the link below:

Application Pools

Paul White
95.4k30 gold badges440 silver badges689 bronze badges
answered Feb 17, 2016 at 3:52

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.