ORA-28001: the password has expired 详解 不用重启项目

未测试现付链接:http://blog.51cto.com/pinmei/1621623 https://blog.csdn.net/hjm4702192/article/details/44044781

oracle 11g 默认密码过期时间为180天,

密码过期后,访问数据库会出现如下异常:

java.sql.SQLException: ORA-28001: the password has expired

查询密码过期设定:

select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME'; 

修改密码过期为:unlimited

alter profile default  limit password_life_time unlimited;

将密码设定修改为unlimited后,可能继续报the password has expired异常

此时,需修改密码:

alter user user_name identified by password;

如果想继续使用原来的密码,可以将密码修改为另一个值后,再修改回来。

如果用户被锁定:java.sql.SQLException: ORA-28000: the account is locked

执行以下语句解除用户锁定:

alter user user_name account unlock;

你可能感兴趣的:(ORA-28001: the password has expired 详解 不用重启项目)