cancel
Showing results for 
Search instead for 
Did you mean: 

How to manually unlock a locked user account in SQLA16

Former Member
8,428

I am implementing max_failed_login_attempts and auto_unlock_time. I find reference to "manually unlocking user accounts", but I can not find the SQL command to execute to do this so I can provide administrators the command to unlock a locked account.

Accepted Solutions (1)

Accepted Solutions (1)

Hi Bill,

The ALTER USER SQL command can be used to manually unlock a user account.

ALTER USER <username> RESET LOGIN POLICY

Any user with the MANAGE ANY USER privilege can perform this action.

Former Member
0 Kudos

Thanks Mikel. So that's why a keyword search of "lock" or "unlock" didn't get me anywhere.

Answers (1)

Answers (1)

Former Member
0 Kudos

Antoher solutions is usage of login policies in sql anywhere Login Policy "normal" and other "blockeds" and then blockeds policy set the blocked to ON.

And then set with sql "Alter role userName " the policy for user.

Example usage: http://dcx.sybase.com/index.html#sa160/en/dbreference/alter-user-statement.html