problem in usernames and passwords in SQL 2005

db , sql server Thailand
  • 12 years ago

    Is it possible and advisable to use same account in SQL server by site users, because it is set to the web.config (in like:

    <add name="strConnString" connectionString="Data Source=myCom;Initial Catalog=myDB;User ID=myUsr;Password=myPwd;Persist Security Info=True" providerName="System.Data.SqlClient" />

    Meaning, if there are 500 users simultaneously accessing the database (thru the site), all their usernames (in SQL server) will be the same (myUsr in this case).. Can sql database handle this? or do i have to have as many users added in security of the database as the actual users so that they have unique usernames?


  • 12 years ago

    This is a perfectly acceptable configuration. If you are connecting using a single username/password and the connection strings are always the same, you will take full advantage of connection pooling.


  • 12 years ago

    thanks for the reply..

    one more thing, hmm, is it more advisable to add MinPoolSize and MaxPoolSize  to my connection string? (i really don't understand all that stuff..)

    thanks in advance..

  • 12 years ago

    I would suggest leaving those settings and to only look at them if you have a problem.  

    By default, the connections in the pool will be closed after a period of inactivity. By setting a MinPoolSize, those connections will remain open which is more performant since opening connections is a time and resource intensive operation.

    If you need to limit the number of connections that you have to SQL Server, set the MaxPoolSize. 




  • 12 years ago

    ok, thanks..


Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” - Tom Cargill