Dear All,
How do I configure automatic kill an idle session in NAV 2013? Or I have to write query in SQL Management Studio? Any solution on it?
Thousand thanks for any help.
Best Regards,
Shin
*This post is locked for comments
Dear All,
How do I configure automatic kill an idle session in NAV 2013? Or I have to write query in SQL Management Studio? Any solution on it?
Thousand thanks for any help.
Best Regards,
Shin
*This post is locked for comments
Hi there,
In my case, this query only finds the service tiers connecting to SQL Server and Classic Clients, which directly connect to the database, but not clients with RTC-connection through service-tier. Any suggestions, how I can query the clients' list with idle time for using the STOPSESSION command under a codeunit? I am using NAV 2017, thanks in advance!
Best regards,
Gyula
Thanks Daniele & Alex.
For NAV 2013, do the following:
1. Run the Microsoft Dynamics NAV Administration
2. Click on the service running the NAV application
3. Modify the Idle Client Timeout
4. Save and restart the NAV service.
No modifications or SQL scripts needed.
You can achieve it adding the ClientServicesIdleClientTimeout parameter in CustomerSettings.config file (format :[dd.]hh:mm:ss[.ff] where dd = days, hh = hours, mm = minutes, ss = seconds and ff = hundredths of seconds) or schedule a SQL job like this:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_KillIdleSpids]') and
OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_KillIdleSpids]
go
create procedure [dbo].[sp_KillIdleSpids]
as
declare
--@sec int=null,
--@diff int,
@spid int,
@cmd char(255),
@loopcount int
set @loopcount=( select count(s.spid) as count1 from master..sysprocesses s
where program_name LIKE '%NAV%'
and ((select DATEDIFF(SS,s.last_batch,GETDATE()))>180) ) --180 = no. of seconds
while @loopcount!=0
begin
set @spid=(select top 1 s.spid
from master..sysprocesses s where program_name LIKE '%NAV%'
and ((select DATEDIFF(SS,s.last_batch,GETDATE()))>1))
set @cmd=convert(char(4), @spid)
exec( 'kill ' +@cmd);
SET @loopcount =@loopcount-1
end
André Arnaud de Cal...
292,865
Super User 2025 Season 1
Martin Dráb
231,723
Most Valuable Professional
nmaenpaa
101,156
Moderator