Locks an IQ user account so that the user cannot log in.
call sp_iqlocklogin ( ‘login-name’, ‘[ lock | unlock ]’ )
sp_iqlocklogin ‘login-name’, ‘[ lock | unlock ]’
sp_iqlocklogin login-name, ‘[ lock | unlock ]’
DBA authority required.
login-name Name of the account to be locked or unlocked.
When Sybase IQ User Administration is enabled, the DBA uses sp_iqlocklogin to prevent or enable a specified user’s ability to log in to the database.
You cannot lock yourself or the DBA account out of the database. Connected users can be locked, but they remain connected. A locked account can be specified as a database owner, and can own objects in any database.
The following errors may occur. Causes are listed after each error.
Permission denied: You do not have permission to execute the procedure sp_iqlocklogin.
Cause: A user without DBA role tried to execute sp_iqlocklogin.
RAISERROR executed: You cannot lock yourself out.
Cause: User tries to lock him or herself out.
RAISERROR executed: "The user DBA cannot be locked."
Cause: User tried to lock the DBA user.
RAISERROR executed: "Invalid option <what the user entered> was specified.” "
Cause: User typed in invalid input.
The following examples lock out the user rose.
sp_iqlocklogin 'rose', 'lock'
call sp_iqlocklogin ('rose', 'lock')
The following example unlocks the account of the user rose.
sp_iqlocklogin rose, 'unlock'