Created
July 5, 2013 20:17
-
-
Save othtim/5936971 to your computer and use it in GitHub Desktop.
check users logged in in SchoolLogic database
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --assumes default IIS/ASP.net timeout of 20 minutes | |
| select | |
| row_number() over (partition by cusername order by cusername) as [count] | |
| , cUserName, tLogin, cApplication, cmachinename | |
| from log | |
| where DATEDIFF(MINUTE, tlogin, CURRENT_TIMESTAMP) < 20 | |
| and lSuccess = 1 | |
| and tLogout = '' | |
| order by tLogin desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment