What version of SQL Server are you running? You can write a stored procedure for this by looking at the data from sp_who, and then guess a little about the last action. There, the "LastBatch" column, which does the last time something, was submitted by this user. I would say if it is more than an hour (or any other), do KILL for this SPID.
SQL 2005 :
declare @spid int
, @cmd varchar(200)
declare Mycurs cursor for
select spid
from master..sysprocesses
where status = 'sleeping'
and last_batch > dateadd( s, -1, getdate())
open mycurs
fetch next from mycurs into @spid
while @@fetch_status = 0
begin
select @cmd = 'kill ' + cast(@spid as varchar)
exec(@cmd )
fetch next from mycurs into @spid
end
deallocate MyCurs
Steve Jones