Oracle Password Expiration

Sometimes You can get ” ORA-28002 The Password Will Expire in 7 Days Errors ” error when you log in database with application user. Second possibility is ORA-28001 when the password has expired.



Check the password expiry date :

SQL> select username, account_status, expiry_date, profile from dba_users where username in ('SAPSR3', 'SAPSR3DB');

Now You need to unlock Your account and set password. If You know old password set the same once again:

-- unlock account
SQL> alter user USERNAME account unlock ;

-- set new password
SQL> alter user USERNAME identified by newpa$$word;

-- OR if You know old password set the same once again.
-- To take hash password of user, execute following script.
SQL> SELECT password, spare4 FROM SYS.USER$ WHERE name = 'USERNAME';

-- SPARE4 can something like this:
S:75415FE1FAD60EB... etc

-- You should change related user password with its hash value like following.
SQL> alter user USERNAME identified by values 'S:75415FE1FAD60EB...';

When You set password and unlock account You should Implement the recommendations as per SAP Note 1519872 and set profile SAPUPROF for Your database user.

Copyright © 2023. Privacy Policy