what is relation between closing/disposing a sqlconnection, and the SPIDs in SQL with

jxharding

Expert Member
Joined
May 4, 2006
Messages
1,629
Reaction score
3
theres a lot of talk on the net, do you have to dispose a sqlconnection in each procedure? this is not that debate.
my question is: what effect does closing/disposing a sql connection have on the amount of sleeping SPIDs when
you execute sp_who2 on sqlserver?

e.g. if i have a sqlconnection.close command execute, will that SPID with status sleeping, remove itself from sp_who2 list?
or will it only happen when sqlconnection.dispose is called?

is there a relationship between the items listed in sp_who2 with status = sleeping, and the sqlconnection.close() / sqlconnection.dispose() being called in code?
 
Top
Sign up to the MyBroadband newsletter
X