Purpose
This statement is used to add, modify, or delete password management parameters in a profile.
Note
Changes made to a profile using the ALTER PROFILE statement only affect users in subsequent sessions, not in the current session.
Syntax
ALTER PROFILE "profile_name"
LIMIT
{ FAILED_LOGIN_ATTEMPTS
| PASSWORD_LIFE_TIME
| PASSWORD_LOCK_TIME
| PASSWORD_GRACE_TIME
}
{ integer | UNLIMITED | DEFAULT };
Parameters
| Parameter | Description |
|---|---|
| profile_name | The name of the profile to modify. |
| FAILED_LOGIN_ATTEMPTS | The number of consecutive failed login attempts allowed. |
| PASSWORD_LOCK_TIME | The number of days the account is locked after exceeding the allowed number of failed login attempts. |
| PASSWORD_LIFE_TIME | The number of days a password is valid for authentication. |
| PASSWORD_GRACE_TIME | The number of days before the account is unlocked and login is allowed. |
| integer | The limit type for the parameter, formatted as an integer. |
| UNLIMITED | Indicates that no limit is set for the parameter. |
| DEFAULT | Indicates the default limit for the parameter. |
Examples
Change the login attempt limit and password lock time: Set the
FAILED_LOGIN_ATTEMPTSparameter of theprofile1profile to5and thePASSWORD_LOCK_TIMEparameter to1day.obclient> ALTER PROFILE "profile1" LIMIT FAILED_LOGIN_ATTEMPTS 5 PASSWORD_LOCK_TIME 1; Query OK, 0 rows affectedChange the password validity period and grace period: Set the
PASSWORD_LIFE_TIMEparameter of theprofile2profile to90days and thePASSWORD_GRACE_TIMEparameter to5days.obclient> ALTER PROFILE "profile2" LIMIT PASSWORD_LIFE_TIME 90 PASSWORD_GRACE_TIME 5; Query OK, 0 rows affected