Oracle密码过期the password has expired解决办法
Oracle 出现the password has expired这个问题,今天突然发现项目访问不了,一查发现用不了,也登不进去,这个问题由是Oracle 11g密码过期的原因导致的。
调试Web项目的时候出现异常:
java.sql.SQLException: ORA-28001: the password has expired
网上查了一下,连接Oracle,以Oracle用户登陆,输入以下命令
以orcaleDBA用户登录
select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';
结果显示:
PROFILE ------------------------------------------------------------ RESOURCE_NAME ------------------------------------------------------------ RESOURCE_TYPE ---------------- LIMIT ------------------------------------------------------------ DEFAULT PASSWORD_LIFE_TIME PASSWORD 180
结果显示密码有效期是180天
输入命令:
alter profile default limit password_life_time unlimited; commit;
再次执行:
select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';
结果显示为:
PROFILE ------------------------------------------------------------ RESOURCE_NAME ------------------------------------------------------------ RESOURCE_TYPE ---------------- LIMIT ------------------------------------------------------------ DEFAULT PASSWORD_LIFE_TIME PASSWORD UNLIMITED
进行以上步骤之后需要改变密码,否则还会出现password has expired异常
改变密码的命令
alter user XXXUSER identified by Welcome1;
如果账号被锁住,则需要解锁命令
alter user XXXUSER identified by Welcome1 account unlock;
相关推荐
lklong 2020-11-22
oraclemch 2020-11-06
shilukun 2020-10-10
周嘉笙 2020-11-09
iilegend 2020-10-19
EricRay 2020-10-16
zhuzhufxz 2020-09-16
dataminer 2020-08-17
bfcady 2020-08-16
Hody 2020-08-16
FightFourEggs 2020-08-16
数据库设计 2020-08-16
Seandba 2020-08-16
Omega 2020-08-16
zjyzz 2020-08-16
yanghuatong 2020-08-16
ktyl000 2020-08-16
dbasunny 2020-08-16