ORA-28002
ORA-28002 means that the password of the user will expire soon in X days, although the user is allowable to connect to the database. The error reminds you that to change the password in advance.
SQL> conn hr/hr@orclpdb
ERROR:
ORA-28002: the password will expire within 7 days
Connected.
The database warned us that the password will expired in 7 days with ORA-28002. In fact, password expiration is controlled by password life time (PASSWORD_LIFE_TIME) in user's profile, the shorter lifetime, the sooner users see ORA-28002.
Solutions to ORA-28002
Once expiration issue is triggered, there's no way to "unexpire" it. The only way is to give a new password to solve it.
1. Wait for Expiration
Yes, waiting for password expired is also a solution. When your password is expired, sqlplus will throw ORA-28001 and force you to change password promptly.
SQL> conn hr/hr@orclpdb
ERROR:
ORA-28001: the password has expired
Changing password for hr
New password:
Retype new password:
Password changed
Connected.
Please note that, if you can't change the password right now for some reason, there're more solutions to ORA-28001: the password has expired.
For those users who is used by applications, the solution could not be good enough, you'd better to change password before expiration. Let's continue.
2. SQL*Plus Command
We can use SQL*Plus command password to change the password right away.
SQL> password
Changing password for HR
Old password:
New password:
Retype new password:
Password changed
3. ALTER USER
We can also use ALTER USER to change the password before expiration.
SQL> alter user hr identified by welcome1;
User altered.
The welcome1 is the explicit password.
Sometimes, the expiration notice might be very annoying to users, you may consider to totally avoid ORA-28002 password expiration notice.
2d solution is the BEST
working easy
THANK Yuuu
My pleasure!