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.
This commit is contained in:
parent
9ce6c8c2b5
commit
ace837aa1d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user