May 25, 2010 at 7:31 am
Hello guys,
I noticed there are some sessions which are inactive for almost 24 hours....Is there anyway to kill those sessions (without using the kill spid command).....Can the programmmers kill the session after some particular period of inactivity???
May 25, 2010 at 8:36 am
I believe tt is normal for connections to stay around but not doing anything. But yes, the application can (and should) close it's connection when appropriate. I think connection pooling will affect whether or not the spids actually go away though.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 25, 2010 at 8:37 am
first, i would suggest not killing any connections, whether you know they are in use or not.
just because they 've connected for a long time, does not mean they are invalid and need to be cleaned up; if they are from a web server, they might be used for connection pooling, and if dropped would/could break a web application; or they might be connections from your developers, for example, who open a window, get distracted, and will need to come back to their code tomorrow.
As a developer, i reboot my machine once every few weeks, so a connection to a server for a couple of days is normal for me.
instead, investigate the spid with sp_who2 or something, and based on the hostname, check with the end user and ask why they connect for days at a time.
Lowell
May 25, 2010 at 9:45 am
Thanks for the suggestions
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply