oracle密码过期 ORA-28001: the password has expired

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;

你可能感兴趣的:(oracle,account,locked,is,the,密码过期)