Clearing Disconnected Users

Here it is. Create a SQL Job that executes this to clear users that have logged off.


DELETE FROM ERMUD where MachineName not in (select distinct(hostname)

from master.dbo.sysprocesses where program_name=’Exact MAX’) AND

MachineName not like ‘%##Terminal##%’ and CompanyName not like ‘%-##-%’

About Vincent Stefanetti

Vincent Stefanetti Senior Consultant MAX Manufacturing Software Working with MAX and Related Technologies Since 1987 MAX ERP System Implementations and Projects MAX, Dynamics GP, Synergy, Event Manager, Crystal Reports, SQL Reporting Services, Database and System Migrations and Updates, MAX Training Classes - All Levels, Custom Reporting.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *