Re: SqlConnection Pooling question
From: David Browne (meat_at_hotmail.com)
Date: 03/15/04
- Next message: William Ryan eMVP: "Re: Adding Records to a Record set"
- Previous message: Cor: "Re: Adding Records to a Record set"
- In reply to: Vance Kessler: "SqlConnection Pooling question"
- Next in thread: Kevin Yu [MSFT]: "Re: SqlConnection Pooling question"
- Reply: Kevin Yu [MSFT]: "Re: SqlConnection Pooling question"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 15 Mar 2004 12:02:20 -0600
"Vance Kessler" <vkessler@peachtree.com> wrote in message
news:aeaf260b.0403150943.7fefea37@posting.google.com...
> I have been reading about ADO.NET's connection pooling and have a
> question.
>
> Our situation:
> In our system we have a LOT of different user databases. This is a
> state less web application running on about 10 web servers accessing a
> single SQL 2000 server instance. So, each web request could go to a
> different web server. My first assumption is that the connection pool
> is local to each web server. I have not found anything that would
> contradict that and it makes sense. So, each time a user accesses
> their database they could be creating connections on each of the 10
> web servers for their particular database. As you can see this could
> add up VERY quickly.
>
> 1. Would it be advisable to open the connection on a fixed database
> (e.g., master) and then issue a changeDatabase() call to the
> connection to switch to the actual database desired? This would allow
> all the users on a web server to really share connections from the
> pool since the connection strings would then match.
No. You should connect each user with a set of credentials which allow them
access to only their database. Each web server will have a couple of
connections in the pool for each database. Until you see hard evidence that
this causes a performance problem for you, do nothing. Don't compromise
security and risk users accessing the wrong data by using credentials which
allow access to multiple databases.
David
- Next message: William Ryan eMVP: "Re: Adding Records to a Record set"
- Previous message: Cor: "Re: Adding Records to a Record set"
- In reply to: Vance Kessler: "SqlConnection Pooling question"
- Next in thread: Kevin Yu [MSFT]: "Re: SqlConnection Pooling question"
- Reply: Kevin Yu [MSFT]: "Re: SqlConnection Pooling question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|