The Login_GetLoginSettings() function is used to retrieve the login options for the specified SQL login.
Login_GetLoginSettings(user_ID, login_options)
• user_ID – A string specifying the ID of the user login for which settings are being retrieved.
• login_options – A long integer that specifying the option settings to use for the SQL login. This is a bitmask value. The following table lists the options and their corresponding hexadecimal values:
Option |
Value |
---|---|
Enforce password policy |
0x01000000 |
Enforce password expiration |
0x02000000 |
Change password on next login |
0x00800000 |
These options apply only to logins for SQL Server 2005. They are ignored for SQL Server 2000. |
An integer specifying the status of the operation. The following table lists the constants that correspond to the values that can be returned.
Constant |
Description |
---|---|
STATUS_SUCCESS |
Operation was successful. |
STATUS_MEMORY_ERROR |
A memory error occurred. |
STATUS_TOO_MANY_CONNECTIONS |
Too many SQL connection in use to perform the operation. |
STATUS_DATASOURCE_REJ |
The SQL server rejected the operation. |
STATUS_UNABLE_TO_CONNECT |
Unable to connect to the data source. |
STATUS_LOGIN_INVALID |
The login is not valid. |
STATUS_INVALID_PERMISSIONS |
The login had invalid permissions to perform the operation. |
STATUS_NOT_LOGGED_IN |
No user is logged in to perform the operation. |