sys.sql_logins (Transact-SQL)


Published: January 20, 2016

Updated: January 20, 2016

THIS TOPIC APPLIES TO: yesSQL Server (starting with 2008)yesAzure SQL DatabasenoAzure SQL Data Warehouse yesParallel Data Warehouse

Returns one row for every SQL Server authentication login.

Column nameData typeDescription
<inherited columns>--Inherits from sys.server_principals.
is_policy_checkedbitPassword policy is checked.
is_expiration_checkedbitPassword expiration is checked.
password_hashvarbinary(256)Hash of SQL login password. Beginning with SQL Server 2012, stored password information is calculated using SHA-512 of the salted password.

For a list of columns that this view inherits, see sys.server_principals (Transact-SQL).

To view both SQL Server authentication logins and Windows authentication logins, see sys.server_principals (Transact-SQL).

When contained database users are enabled, connections can be made without logins. To identify those accounts, see sys.database_principals (Transact-SQL).

Any SQL Server authentication login can see their own login name, and the sa login. To see other logins, requires ALTER ANY LOGIN, or a permission on the login.

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.

Catalog Views (Transact-SQL)
Security Catalog Views (Transact-SQL)
Password Policy
Principals (Database Engine)

Community Additions