Mega Code Archive

 
Categories / MSSQL Tutorial / User Role
 

Viewing Windows Logins

SELECT name, sid FROM sys.server_principals WHERE type_desc IN ('WINDOWS_LOGIN', 'WINDOWS_GROUP') ORDER BY type_desc GO