Last active
May 14, 2016 20:53
-
-
Save kujhawk94/1434726762b5c8f9b89f3b00d882d921 to your computer and use it in GitHub Desktop.
Get a list of users connected to e-MDs TopsData application
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
SELECT DISTINCT | |
loginame [Login], | |
hostname, | |
sd.name DBName, | |
[program_name] ProgramName | |
FROM master.dbo.sysprocesses sp | |
JOIN master.dbo.sysdatabases sd ON sp.dbid = sd.dbid | |
WHERE sd.name = 'TopsData' | |
AND program_name = 'e-MDs Solution Series' | |
ORDER BY loginame |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment