What permissions are required to query master..syslogins in SQL Server?

I only have access to the main database, but the following query returns only a subset of users. What permissions are required to return the remaining users?

SELECT [name] FROM master.dbo.syslogins
+3
source share
2 answers

What version of SQL Server are you using?

Directory Submission sysloginsdate with SQL Server 2005 - If you're in 2005 or later, you should use instead sys.server_principals, and sys.sql_logins.

When you check the MSDN Internet Books topic for sys.server_principals, you will see a note at the bottom of the page:

SQL Server 2005 , , . . .

" " , , , .

, :

, VIEW DEFINITION : , . , VIEW DEFINITION myTable, .

+3

MetaData Visibilty

(, ).

sys.server_principals. syslogins - SQL Server 7 ( sysxlogins SQL Server 2000)

MSDN sys.server_principals...

SQL Server 2005 , , . . .

, GRANT.

GRANT VIEW ANY DEFINITION TO ...

GRANT VIEW DEFINITION ON LOGIN::xxx TO ...

" "...

+4

Source: https://habr.com/ru/post/1752785/


All Articles