fiogf49gjkf0d
I am looking for the best way to record the use of our SLX system daily (web client only 7.5.3). I have not been able to find a last login date or anything that was designed for the purpose I have intended. I have however noticed that the VIRTUALFILESYSTEM table seems to be updated every time a user logs in. I wrote the following query to record the last MODIFYDATE for users who have logged in today.
select MODIFYUSER, MAX(MODIFYDATE) from sysdba.VIRTUALFILESYSTEM
where MODIFYDATE > CAST(GETDATE() AS DATE)
group by MODIFYUSER
order by MAX(MODIFYDATE)
My Question is, is there a situation any one knows of where a user will be set as the modifyuser without logging in? Or has anyone come up with a better way to track this information on the web client?
If the answer is that the VIRTUALFILESYSTEM table is unreliable, would something like this work?
SELECT MODIFYUSER FROM (
(SELECT MODIFYUSER AS MODIFYUSER, MAX(MODIFYDATE) AS MODIFYDATE FROM sysdba.ACTIVITY GROUP BY MODIFYUSER)
UNION
(SELECT USERID, MAX(MODIFYDATE) AS MODIFYDATE FROM sysdba.USEROPTIONS GROUP BY USERID)
UNION
(SELECT MODIFYUSER, MAX(MODIFYDATE) AS MODIFYDATE FROM sysdba.ACCOUNT GROUP BY MODIFYUSER)
UNION
(SELECT MODIFYUSER, MAX(MODIFYDATE) AS MODIFYDATE FROM sysdba.CONTACT GROUP BY MODIFYUSER)
GROUP BY d.MODIFYUSER
HAVING MAX(MODIFYDATE) > CAST(GETDATE() AS DATE)
I forgot to add there there are no disconected webclients. |