dbTalk Databases Forums  

Best connection management

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss Best connection management in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Hornet77
 
Posts: n/a

Default Best connection management - 09-07-2007 , 02:37 AM






Hi all

I'm developing a software written in c# (.NET 2.0) with a SQL server
2005 database. I have 3 modules that need to access database:

- a simple ASP.NET website receiving event from remote devices via https
calls

- a windows service running 24/7 that act as a server

- a winform application running as a client with user interface,
launched by the user

3 modules use .NET remoting to communicate.

In order to query DB actually I'm using a single connection for each
module, always opened (for the ASP.NET site I use a static instance of
my "dbManager" class)... when I neeed to query the database I use the
already opened connection and leave it opened for further operation.

Is this acceptable? what kind of problems can cause? Should I use
another approach (open and close connection for every operation)?

Thanks in advance

Reply With Quote
  #2  
Old   
Hornet77
 
Posts: n/a

Default Re: Best connection management - 09-07-2007 , 05:59 AM






Hi Ekrem

thanks for your help ;-)

Ekrem Önsoy ha scritto:
Quote:
It depends on your hardware resources (especially RAM) on your SQL
Server server.
tipically the SQL server will run on a Windows Server 2003r2 with 1 GB
of RAM....

but there is no good practice to follow, to prescind from hardware?

Bye



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.