In base NAV there is a Session Events table that logs when someone (or something such as web services) logs in or out of NAV.
There is a setting on the service tier called “Session Event Table Retention Period” which is supposed to automatically deleted records older than the setting (in months).Ā All of our service tiers have this set to 3.
We have over 6 million records in this table with entries going back to almost over a year.Ā Most of these records come from Web Services and Job Queues not users.
Anyone else have this issue where the records are not being deleted?Ā My solution will be to create a job to delete anything older than 7 days but wanted to see if any else has this same issue.
—————————— Jason Wilder Senior Application Developer Stonewall Kitchen York ME ——————————
I ran into this issue in 2014 (NAV version 2013) due to an add-on; the Session Event table grew to millions of records within months, and the CustomSettings.config parameter you mentioned wasn’t keeping the table clean. Because of the SQL delete table trigger code on [dbo].[Session Event] (installed with NAV), a job that simply deleted records had adverse effects, so I designed a way to bypass the SQL delete table trigger code and still run from the Job Queue.Ā It’s set to run once every 10 minutes; for each iteration, if the table count is greater than 1M recs, the oldest 10k recs are deleted.Ā The code is included as an attachment to this message.
—————————— Michael Heydasch Solutions Architect ArcherPoint Inc. Knoxville TN —————————— ——————————————-
I did just create a job that deletes records in the session event table via NAV not SQL.Ā I see the 1 delete trigger (the other is an insert trigger) in SQL and it looks like it isĀ meant to remove an active session tied to the event if there is one.Ā ThisĀ would be pretty unlikely in our database.
Do you remember the “adverse effects” as I might want to reconsider based on your answer.
—————————— Jason Wilder Senior Application Developer Stonewall Kitchen York ME —————————— ——————————————-
Please note:
This action will also remove this member from your connections and send a report to the site admin.
Please allow a few minutes for this process to complete.
Report
You have already reported this .
Welcome to our new site!
Here you will find a wealth of information created for peopleĀ that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!