Allows you to determine the current status of users.
sa_get_user_status( )
Column name | Data type | Description |
---|---|---|
user_id | UNSIGNED INTEGER | A unique number identifying the user. |
user_name | CHAR(128) | The name of the user. |
connections | INTEGER | The current number of connections by this user. |
failed_logins | UNSIGNED INTEGER | The number of failed login attempts made by the user. |
last_login_time | TIMESTAMP | The local time that the user last logged in. |
locked | TINYINT | Indicates if the user account is locked. |
reason_locked | LONG VARCHAR | The reason the account is locked. |
user_dn | CHAR(1024) | The Distinguished Name (DN) for a user ID connecting to an LDAP server. |
user_dn_cached_at | TIMESTAMP | The local time that the DN was stored. |
password_change_state | BIT | A value that indicates whether a dual password change is in progress (0=No, 1=Yes). The default is 0. |
password_change_first_user | UNSIGNED INTEGER | The user_id of the user who set the first part of a dual password; otherwise NULL. |
password_change_second_user | UNSIGNED INTEGER | The user_id of the user who set the second part of a dual password; otherwise NULL. |
user_dn | CHAR(1024) | The distinguished name (DN) of the user. |
user_dn_cached_at | TIMESTAMP | The date and time the distinguished name was found. |
This procedure returns a result set that shows the current status of users. In addition to basic user information, the procedure includes a column indicating if the user has been locked out and a column with a reason for the lockout. Users can be locked out for the following reasons: locked due to policy, password expiry, or too many failed attempts.
If the user is authenticated using LDAP User Authentication, the output includes the user's distinguished name and the date and time that the distinguished name was found.
You can view information about yourself; no privilege is required. You must have the MANAGE ANY USER system privilege to view information about other users.
None
The following example uses the sa_get_user_status system procedure to return the status of database users.
CALL sa_get_user_status;