sys.server_principals (Transact-SQL)
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Analytics Platform System (PDW)
Contains a row for every server-level principal.
Column name | Data type | Description |
---|---|---|
name | sysname | Name of the principal. Is unique within a server. |
principal_id | int | ID number of the Principal. Is unique within a server. |
sid | varbinary(85) | SID (Security-IDentifier) of the principal. |
type | char(1) | Principal type: S = SQL login R = Server role E = External Login from Azure Active Directory X = External group from Azure Active Directory group or applications |
type_desc | nvarchar(60) | Description of the principal type: SQL_LOGIN SERVER_ROLE EXTERNAL_LOGIN EXTERNAL_GROUP |
is_disabled | int | 1 = Login is disabled. |
create_date | datetime | Time at which the principal was created. |
modify_date | datetime | Time at which the principal definition was last modified. |
default_database_name | sysname | Default database for this principal. |
default_language_name | sysname | Default language for this principal. |
credential_id | int | ID of a credential associated with this principal. If no credential is associated with this principal, credential_id will be NULL. |
owning_principal_id | int | The principal_id of the owner of a server role. NULL if the principal is not a server role. |
is_fixed_role | bit | Returns 1 if the principal is one of the built-in server roles with fixed permissions. For more information, see Server-Level Roles. |
Permissions
Any login can see their own login name, the system logins, and the fixed server roles. Only members of the server role ##MS_LoginManager## or the special database role loginmanager in master
or the Azure AD admin and server Admin can see all logins.
The visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission. For more information, see Metadata Visibility Configuration.
Note
The permissions of fixed server roles do not appear in sys.server_permissions.
See Also
Security Catalog Views (Transact-SQL)
Catalog Views (Transact-SQL)
Principals (Database Engine)
Permissions Hierarchy (Database Engine)