Lists user IDs that are locked out of the database.
sp_iqlistlockedusers [ 'userid' ] [ 'server-name | all servers' ]
DBA authority required.
userid If specified, lists the lock status for only the specified user.
If not specified, or null, lists the lock status for all users.
server-name | all servers If specified, lists user IDs locked out of the named server, or, if all servers is specified, user IDs locked on a server-by-server basis. The server name argument is valid only in multiplex environments, and the specified server name must be a valid server name in the IQ_MPX_INFO system table.
If not specified, lists user IDs that are locked by default on a global basis. In a multiplex environment, the global default lock status may be overridden on a server-by-server basis, so user IDs listed without using the server name argument may not be locked out of all servers. In a multiplex environment, Sybase recommends that you specify all servers in order to list which users are effectively locked out of each server.
To display per-server user settings in Sybase Central, right-click the name of a multiplex server and choose Properties from the drop-down. Then choose the Login Management tab. (The tab displays only if Login Management is enabled for the server.)
The following error may occur. Cause is listed after the error.
Permission denied: You do not have permission to execute the procedure "sp_iqlistlockedusers".
Cause: A user without DBA role tried to execute sp_iqlistlockedusers.
The following lists all users locked by default. (This lock may be overridden on a server-by-server basis.)
call sp_iqlistlockedusers
Locked_Users |
Server |
---|---|
Rose |
query1 |
Rose |
query2 |
The following lists all users effectively locked out of all servers, on a server-by-server basis:
sp_iqlistlockedusers null, 'all servers'
The following lists all users effectively locked out of server Littleton:
sp_iqlistlockedusers null, 'Littleton'
The following lists all servers, by server, from which user joe is locked:
sp_iqlistlockedusers 'joe', 'all servers'