diff --git a/PROMS/DataLoader/PROMSFixes.Sql b/PROMS/DataLoader/PROMSFixes.Sql index 9a5a2c4c..aea5cf99 100644 --- a/PROMS/DataLoader/PROMSFixes.Sql +++ b/PROMS/DataLoader/PROMSFixes.Sql @@ -7448,6 +7448,7 @@ BEGIN TRY -- Try Block --delete inactive sessions where last activity is before 15 minutes ago DELETE FROM Sessions WHERE UserID = @UserID and DTSEnd is null and DTSActivity < DATEADD(minute, -5, getdate()) DELETE FROM Sessions WHERE DTSEnd is null and DTSActivity < DATEADD(minute, -15, getdate()) + DELETE FROM Owners WHERE SessionID not in (SELECT SessionID FROM Sessions) INSERT INTO [Sessions]([UserID],[MachineName],[ProcessID]) VALUES (@UserID, @MachineName, @ProcessID) SELECT