![]() |
#2 |
Участник
|
Сброс через час простоя
go declare @spid int DECLARE c CURSOR FOR select spid from master.dbo.sysprocesses where program_name='Microsoft Business Solutions-Navision client' and dateadd(hour, 1, last_batch)<getdate() open c fetch next from c into @spid while @@fetch_status=0 begin --print @spid exec ('kill ' + @spid) fetch next from c into @spid end close c deallocate c Вообще можно ввести отделы и отделам раздать лимиты на число подключений. Пускай юзеры сами пинают неработающих коллег ![]() |
|