Allows you to determine the current status of users.
sa_get_user_status( )
None
Column name | Data type | Description |
---|---|---|
user_id | UNSIGNED INT | A unique number identifying the user. |
user_name | CHAR(128) | The name of the user. |
connections | INT | The current number of connections by this user. |
failed_logins | UNSIGNED INT | The number of failed login attempts made by the user. |
last_login_time | TIMESTAMP | The time the user last logged in. |
locked | TINYINT | Indicates if the user account is locked. |
reason_locked | LONG VARCHAR | The reason the account is locked. |
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.
A user without DBA authority can obtain user information by creating and executing a cover procedure owned by a DBA.
DBA authority is required to view information about all users. Users without DBA authority can view their own information. In addition, users without DBA authority can view information about other users by executing a cover procedure owned by a DBA.
None
The following example uses the sa_get_user_status system procedure to return the status of database users.
CALL sa_get_user_status;