Community discussion forum

problem in usernames and passwords in SQL 2005

  • 6 months 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 asp.net) 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?

     Thanks..

  • Advertisement

    Simply the fastest line-level profiler for .NET ever

    “The low overhead means it has minimal impact on the execution of my program”
    Mark Everest, Development Team Leader, Renault F1 Team Ltd.

    Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now

  • 6 months 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 ado.net connection pooling.

    http://msdn.microsoft.com/en-us/library/8xx3tyca(VS.80).aspx
     

    Tim 

  • 6 months 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..

  • 6 months 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. 

    Tim 

     

     

  • 6 months ago

    ok, thanks..

    Yes

Post a reply

Enter your message below

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