Are you sure these aren't pooled connections?
A pool of connections is created for each user context accessing the
underlying data store. When you dispose of your SQLConnection object, the
connection is returned to the pool. The next page that requires a connection
gets one from the pool. This saves on the expensive process of creating an
actual physical connection. Eventually, if the connections aren't used, the
pool is destroyed. You can get some information on this here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmdac/html
/pooling2.asp
(I haven't found the .Net equivalent yet, but the process is the same)
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Gurneet Singh Jodhka" <Gurneet_Jodhka@i...>
Subject: [aspx_professional] Killing SQL Server Process
In the project that I am working performance is of utmost importance as we
are using SQL Server and the size of the DB is going to be aroud
1Terabyte.So what the Cllient DBA wants is that if someone runs a bad query
he should be able to kill the process(finding out who is running the
process).
Anyway for the what we said is that for this we will have a Connection Time
out setting in the app and this will happen by its own .But when i check my
sysprocesses table it has some of the process which even after timeout run
for some 10 mts (i am not sure of exact time)
These are some of the results which i got from this query
select hostname,cmd,spid,kpid,cpu,physical_io,memusage from sysprocesses
where hostname='HYDHTC023011' and spid <>62 order by last_batch
HYDHTC023011 AWAITING COMMAND 63 0 0 0 0
HYDHTC023011 AWAITING COMMAND 61 0 80172 3452 0
It gives me cmd as Awaiting Command even when the Connection Times out(where
it was Select before Connection Time out).
Now what i am looking for is
Is there anyway where i can know how much time it should Await Command and
then kill the process automatically(or from APP).Also is there any way where
in from ASP.NET i can do the setting of this or may be even in IIS(because
as soon as i do an IISRESET the process gets killed).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~