ALTER USER|ROLE name
LOCK TIME 'timestamp'
Include the ACCOUNT LOCK clause to lock a role immediately; when locked, a role’s LOGIN functionality is disabled. When you specify the ACCOUNT LOCK
clause without the LOCK TIME
clause, the state of the role will not change until a superuser uses the ACCOUNT UNLOCK clause to unlock the role.
Use the ACCOUNT UNLOCK clause to unlock a role.
Use the LOCK TIME 'timestamp' clause to instruct the server to lock the account at the time specified by the given timestamp for the length of time specified by the PASSWORD_LOCK_TIME parameter of the profile associated with this role.
Combine the LOCK TIME 'timestamp' clause and the ACCOUNT LOCK clause to lock an account at a specified time until the account is unlocked by a superuser invoking the ACCOUNT UNLOCK clause.
The following example uses the ACCOUNT LOCK
clause to lock the role named john.
The account will remain locked until the account is unlocked with the ACCOUNT UNLOCK