An exception occurred while debugging a Web project:
- java.sql.sqlexception:ora-28001:the Password has expired
Check online, is the reason why the oracle11g password expires
Connect Oracle, log in as Oracle user, enter the following command
- SELECT * from dba_profiles where profile=' DEFAULT ' and resource_name=' password_life_time ';
The results show:
- Profile
- ------------------------------------------------------------
- Resource_name
- ------------------------------------------------------------
- Resource_type
- ----------------
- LIMIT
- ------------------------------------------------------------
- DEFAULT
- Password_life_time
- PASSWORD
- 180
- ------------------------------------------------------------
The result shows that the password is valid for 180 days
Enter the command:
- Alter profile default limit password_life_time unlimited;
- Commit
Execute again:
- SELECT * from dba_profiles where profile=' DEFAULT ' and resource_name=' password_life_time ';
The results are shown as:
- Profile
- ------------------------------------------------------------
- Resource_name
- ------------------------------------------------------------
- Resource_type
- ----------------
- LIMIT
- ------------------------------------------------------------
- DEFAULT
- Password_life_time
- PASSWORD
- UNLIMITED
- ------------------------------------------------------------
You need to change the password after doing the above steps, or else the password has expired exception will appear
command to change Password
- Alter user Xxxuser identified by Welcome1;
If the account is locked, you need to unlock the command
- Alter user Xxxuser identified by Oracle account unlock;
Connecting Oracle times Error: ora-28001:the Password has expired