-- Kill sessioni NAV dormienti senza transazioni aperte da piu di 20 minuti
USE ER_P
DECLARE @v_spid INTDECLARE c_Users CURSORFAST_FORWARD FOR
SELECT spid FROM master..sysprocesses (NOLOCK) WHERE spid>50 AND (program_name LIKE N'%Microsoft Dynamics NAV%') AND (program_name not like N'%Microsoft Dynamics NAV WEB%') AND status='sleeping' AND DATEDIFF(mi,last_batch,GETDATE())>20 AND spid<>@@spid &nbs
Leggi tutto il post...