Scripting all logins on a SQL Server instance can be helpful e.g. when setting up a test or development environment. Read on to see an example query for just this purpose.
To re-create a login on a different SQL Server instance while preserving the password you can use the CREATE LOGIN statement with the hashed password. Read on for a detailed explanation.
LOGINPROPERTY is a SQL Server catalog function that can be used to query a total of twelve properties for SQL Logins not even revealed by the sys.sql_logins catalog view. Read on to find out how to use LOGINPROPERTY and which properties it can return.
The sys.sql_logins catalog view can be used to retrieve additional information on SQL Logins that is not included in the sys.server_principals catalog view. Read on to find out what additional information is revealed by this catalog view.