码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2015-03-18 06:37:02      阅读:172      评论:0      收藏:0      [点我收藏+]

标签:oracle   密码过期   the password has expired   the account is locked   

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;

本文出自 “梦幻逍遥侠” 博客,请务必保留此出处http://pinmei.blog.51cto.com/7012784/1621623

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

标签:oracle   密码过期   the password has expired   the account is locked   

原文地址:http://pinmei.blog.51cto.com/7012784/1621623

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!