How to get Logins and Groups on Sql server Separatly
-
Montag, 16. April 2012 12:56
Friends,
How to get the Logins and users on sql server separatly
Thanks,
Maddy
Alle Antworten
-
Montag, 16. April 2012 12:58
Maddy,
Try
SELECT * FROM dbo.syslogins SELECT * FROM dbo.sysusers
Thanks
Manish
Please use Mark as Answer if my post solved your problem and use Vote As Helpful if a post was useful. -
Montag, 16. April 2012 14:00
You can query sys.server_principals to list logins,
type_desc column provides the type of login. e.g. Windows Login, Windows Group, SQL Login...
USE master SELECT name, type_desc, is_disabled FROM sys.server_principals WHERE type_desc IN ('WINDOWS_LOGIN', 'WINDOWS_GROUP')
- Vishal
-
Montag, 16. April 2012 14:15Moderator
If you are looking for script to retrieve permission then you can use my scripts below
http://sql-articles.com/scripts/script-to-retrieve-security-information-sql-server-2005-and-above/
Mark as ANSWER if I helped you today :-)
- Als Antwort vorgeschlagen Iric WenModerator Dienstag, 17. April 2012 06:21
- Als Antwort markiert Iric WenModerator Dienstag, 24. April 2012 07:09

