ORA-28002: the password will expire within string days

Hi,

Sometimes You can get “ORA-28002: the password will expire within string days ” error.

 

Details of error are as follows.

ORA-28002: the password will expire within string days
Cause: The user’s account is about to about to expire and the password needs to be changed
Action: change the password or contact the DBA

 

 

Check the users which users are expired.

SQL> SELECT username, account_status FROM dba_users WHERE ACCOUNT_STATUS LIKE '%EXPIRED%';

 

 

You can solve this error by using its existing password or with new password as follows.

 

ALTER USER USERNAME IDENTIFIED BY PASSWORD;



SQL> ALTER USER MEHMET IDENTIFIED BY DEVECI;         
User altered.

 

 

Find the related profile and change profile PASSWORD_LIFE_TIME to UNLIMITED as follows.


select * from dba_profiles where RESOURCE_NAME LIKE ‘PASSWORD_LIFE_TIME’;

SQL> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
Profile altered.

SQL>



You can recover and fix all users in the database that can get the same error using and executing the following script.

 

DECLARE
CURSOR c IS
SELECT us.name, us.spare4
FROM user$ us JOIN dba_users du ON u.name=du.username
WHERE du.account_status='EXPIRED(GRACE)';
BEGIN
FOR v IN c LOOP
EXECUTE IMMEDIATE 'ALTER USER ' || v.name || ' IDENTIFIED BY VALUES ''' || v.spare4 || '''';
END LOOP;
END;
/

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

https://ittutorial.org/oracle-database-19c-tutorials-for-beginners/

 135 views last month,  2 views today

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience. I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource. I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks. I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients. If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress mehmetsalih.deveci@outlook.com. -                                                                                                                                                                                                                                                 - Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  mehmetsalih.deveci@outlook.com a mail atabilirsiniz.

Check Also

blank

ORA-01438: value larger than specified precision allowed for this column

Hi, I got ” ORA-01438: value larger than specified precision allowed for this column” error …

Leave a Reply