all groups > sql server (alternate) > december 2004 >
You're in the

sql server (alternate)

group:

Running out of Sql Connections


Running out of Sql Connections hananiel NO[at]SPAM yahoo.com
12/13/2004 3:47:28 PM
sql server (alternate):
Hello:
We have a a two tier application connecting to sql server
through remoting. The business objects are single call objects. We are
opening and closing connections using ADO.NET command object. All
"ExecuteNonQuery" are closed in finally blocks. We are running out of
sql connections because the profiler shows that connections are not
being released till the business service is stopped and restarted.
Does anyone have suggestions on how to fix this problem of the
connections not closing and why it may be happening?

Thanks a lot,
Han
Re: Running out of Sql Connections John Bell
12/14/2004 8:48:10 AM
Hi

It is hard to say without seeing code what you are doing, but if you have an
implicit connection then the connection is not returned to the pool.
http://support.microsoft.com/default.aspx?scid=kb;en-us;191572

Using profiler or performance monitor you should be able to track
connections being used.

This may also happen to use up connections:
http://support.microsoft.com/default.aspx?scid=kb;en-us;235282

I found this which may be what is happening:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconConnectingToSQLServerUsingADONET.asp
Note Do not call Close or Dispose on a Connection, a DataReader, or any
other managed object in the Finalize method of your class. In a finalizer,
only release unmanaged resources that your class owns directly. If your
class does not own any unmanaged resources, do not include a Finalize method
in your class definition

John

[quoted text, click to view]

AddThis Social Bookmark Button