Viewing Logins

Administering SQL Server

Administering SQL Server

Viewing Logins

View Microsoft® SQL Server™ logins to determine if a user or Microsoft Windows NT® 4.0 or Windows® 2000 group has permission to connect to an instance of SQL Server, and to identify which databases the login can access. Also, view a login before removing it to see which database users must be removed; it is not possible to remove a login without first removing the associated users.

You can view:

  • Users in each database associated with the login.

  • Default database and language the login uses when the user first connects to an instance of SQL Server.

  • Windows NT 4.0 or Windows 2000 security identifier (SID).

Note  It is not possible to view the password of any login unless the password is NULL. Passwords are encrypted when stored in SQL Server.

To view a SQL Server login or Windows user or group

Transact-SQL