How to get Logins and Groups on Sql server Separatly
-
16 เมษายน 2555 12:56
Friends,
How to get the Logins and users on sql server separatly
Thanks,
Maddy
ตอบทั้งหมด
-
16 เมษายน 2555 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. -
16 เมษายน 2555 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
-
16 เมษายน 2555 14:15ผู้ดูแล
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 :-)
- เสนอเป็นคำตอบโดย Iric WenModerator 17 เมษายน 2555 6:21
- ทำเครื่องหมายเป็นคำตอบโดย Iric WenModerator 24 เมษายน 2555 7:09