Hi,
We have recently upgraded to NAV 2017, and are having a few issues with the Task Scheduler.
We are seeing a lot of errors/warnings like this in the Event Logs
Message <ii>Threshold Trace Tag. Execution Time = 7398 milliseconds Long Running SQL statement Task ID:1 DELETE TOP (1000) [dbo].[Session Event] WITH(TABLOCKX) WHERE NOT EXISTS (SELECT 1 FROM [dbo].[Active Session] AS acs WHERE acs.[User SID] = [dbo].[Session Event].[User SID] AND acs.[Server Instance ID] = [dbo].[Session Event].[Server Instance ID] AND acs.[Session ID] = [dbo].[Session Event].[Session ID] AND acs.[Session Unique ID] = [dbo].[Session Event].[Session Unique ID] AND acs.[Login Datetime] = [dbo].[Session Event].[Event Datetime]) AND DATEDIFF(Month, [Event Datetime], GETUTCDATE()) >= @ROWCOUNT</ii>
As I understand it, it is trying to delete entries from the table "Session Event". I presume that this is for the Task Scheduler. We are seeing some performance issues, and often Job Queue entries which are "Scheduled" are not run. I am just wondering if anyone else has encountered this before? Or has any fixes?
Answers
I found below link, can you please check and see if this helps you.
https://robertostefanettinavblog.com/2016/11/04/nav-2017-task-scheduler/
Which CU are you running? I believe that we have fixed this in a CU early this year
Regards,
Kennie Nybo Pontoppidan
We are running CU05, we do have a lot of Job Queue Entries, and some run a custom Workflow Engine. These run every few seconds so I can undertand why the Task Scheduler would need to interact with the Active Session/Session Event table. It doesn't really look like a big problem, but it would be nice to understand why it is happening.