Created
July 22, 2015 14:46
-
-
Save JosiahSiegel/2a3a7dd318a12330b74e to your computer and use it in GitHub Desktop.
#MSSQL #Research #Users Find matching login for user
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 sp.name AS login_name | |
FROM sys.server_principals sp | |
JOIN sys.database_principals dp ON (sp.sid = dp.sid) | |
WHERE dp.name = 'Joe' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment