I have readonly access to the master database however the following query only returns a subset of users. What permissions are needed to return the rest of the users?
SELECT [name] FROM master.dbo.syslogins
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What version of SQL Server are you on??
The
sysloginscatalog view has been deprecated with SQL Server 2005 – if you’re on 2005 or up, you should usesys.server_principalsandsys.sql_loginsinstead.When you check the MSDN Books Online topic for sys.server_principals, you’ll see a note at the bottom of the page:
Go to the Metadata Visibility Configuration page to read up on the details of what objects you will be able to see, and how to get access to others.
This note is the most important part if you want to grant permissions: