From ace837aa1d5afc39d905609168ddf799550e0445 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 8 Jan 2015 21:07:24 +0000 Subject: [PATCH] In vesp_SessionBegin. Added a command to delete Owners where the SessionID is not in the Sessions table. This fixes an issue that happens when PROMS is abnormally terminated and not allowed to clean up before exiting. --- PROMS/DataLoader/PROMSFixes.Sql | 1 + 1 file changed, 1 insertion(+) 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