January 31, 2011 at 11:13 am
Hello I am new to this forum Is there any way to find out what are the current groups and logins in the sql server and what are the rights to them, through query ?
January 31, 2011 at 11:51 am
Start with:
select *
from sys.syslogins;
That will give you a list of the logins.
If you look that up in Books Online or on MSDN, it will have links to related items, which will give you the other data you need.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 31, 2011 at 12:54 pm
Insert obligatory 'syslogins is deprecated, should not be used for new development, included only for backward compat, will be removed in a future version'
Query sys.server_principals for the logins
SELECT * FROM sys.server_principals AS sp WHERE type IN ('S','U','G')
That will get you all the SQL and windows logins on the server.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 31, 2011 at 1:17 pm
Thanks Adiga
Thanks Gila, That's exactly what I was looking for.
January 31, 2011 at 2:05 pm
Adiga?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 31, 2011 at 9:06 pm
Oops my mistake, Its for GSquared....
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply