Sunday, February 28, 2016

ORA-28001 : the password has expired | ORA-28002 : the password will expire within n days | Set Oracle profile password limit as unlimited


While we are using Oracle for long run, we may encounter with below two errors:

ORA-28001 : the password has expired (or)
ORA-28002 : the password will expire within n days

This is due to because password has reached 180 default limit for password life time i.e. password expiration is set to 180 days by default.So, DBA has to change this default limit to unlimited to avoid these type of errors in future. This we can achieve in following way.

Step-1 : Login as a sys/sysdba user.

SQL> connect / as sysdba

Step-2 : Execute the below query to know the default profile PASSWORD_LIFE_TIME limit.

SQL> select * from dba_profiles;
Step-3 : Now execute the below query to set the PASSWORD_LIFE_TIME limit to UNLIMITED.

SQL> alter profile default limit password_life_time unlimited;

Step-4 : Now check the password_life_time limit and this enables password will never expire.

SQL> select * from dba_profiles;
Step-5 : Now you can reset the password of locked user and you won't encounter with above said errors in future.

SQL> alter user <user_name> identified by <new_password>;




No comments:

Post a Comment

back to top