Ever wanted to get rid of users who are sitting idle for long periods of time? Here's a script that removes spids idle for a variable period of time.
if object_Id( 'dbspKillIdleSpids') Is Not Null drop procedure dbspKillIdleSpidsgo
CREATE procedure dbspKillIdleSpids @sec int = Nullas/**************************************************************Name: dbspKillIdleSpidsDescription: kills connections that have beeninactive for @sec seconds.
Usage: exec dbspKillIdleSpids <sec>
Leggi tutto il post...