What's the best way to open a Connection to DB in the WEB envoironment

From: Ahmed Jewahar (ajewahar_at_sa.dhl.com)
Date: 02/10/04


Date: Tue, 10 Feb 2004 00:09:49 -0800


Hi All,

I'm looking for an Ideal and best logic towards open a database
connection to SQL server 2000 from an ASPX pages.

I have desinged an Intranet application. But I don't know that I have
applied an ideal logic to open a connection from my application.

Below is the details of my applicaiton:

Application : ASP.NET Intranet Application
WebServer: IIS Server
Backend Database : SQL Server 2000. Configured as "Use SQL Server
Authenticaiton"

I have about 60+ users who use my Inreanet application extensivley daily
basis. We have many remote users (using leased line) within our Network
(VAN).

I have created "Login" for each users in SQL Server 2000 and all of them
added (user) to all the Database. In my application, there is a "Login"
form where all the usres must enter their "Login" to enter the
applicaiton.

I'm using the above login to open a "Connection" to my SQL server. For
example if there are 50 user accessing my Intranet Application, there
would be 50 Connection will opened at Database !. I'm afraid this might
cause my database performance.

My questions are :

a) Can I use a Common "Login" for all the userd to open a "Connection"
to my SQL Server 2k. ? Will it incerase the performance of my
application as conneciton string can be utilized from "Pooling" ?.

b) If I user One 'Login" for all the users to open a connection, I won't
be able to monitor each users activity (from SQL profiler). Isn't it ?.

c) What's is normal method people are following or MS suggesting towards
this type of situaitons ?

d) Also In my application there are server ASPX pages which are
basically for various reporting and analysis purpose. In every page, I
OPEN the "Connection" and CLOSE at the end of the process. But not using
"cn1.Dispose" in order to utilise the conneciton from "Pooling" .

Kindly share all of your expertise in this area. I would be more than
happy to follow best logic of yours.

Expecting quick reply and really appreciate for it.

Hope my quiery make sense. Otherwise pls let me know so I can give more
details. I'm not good at writing.

Many thanks in advance..

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Re: My Book is Incomplete Regarding SQL Commands ;-(
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... Create a Connection object and pass in a ConnectionString to ... manage the database table you reference. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: (Newbie)Application Roles
    ... level: the database itself. ... SQL Server accommodates these needs through the use of application ... the user's connection through a specific application. ... the connection permanently loses all permissions applied to ...
    (microsoft.public.sqlserver.security)
  • Re: System Administrator Implied Permissions
    ... > sa login, it assigns it the System Administrator fixed ... > Now, given this, why does SQL Server ... in each database is always a member of the public and db_owner roles. ... Other sysadmin role members have the exact same ...
    (microsoft.public.sqlserver.security)
  • Re: No db access after publishing web site
    ... GRANT UPDATE TO ... If I detach and attach this database on a different PC (according that PC ... Cannot open database "pago" requested by the login. ... Are you detaching/attaching the SQL Server Express database correctly ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Help! Set up Windows Group to access application
    ... The connection string for a trusted connection is: ... --add login as database user ... SQL Server MVP ... If you have troubles with finding your ways in Crystal Reports, ...
    (microsoft.public.sqlserver.security)

Quantcast