Oracle ORA-28000: the account is locked ORA-28001 the password has expired 解决

ORA-28001 the password has expired sql

Oracle11G的新特性, Oracle11G建立用户时缺省密码过时限制是180天, 若是超过180天用户密码未作修改则该用户没法登陆。ide

用sqlplus登陆sysdbacode

sqlplus connect as sysdba

而后输入原密码class

查看密码有效期设置:登录

SELECT * FROM dba_profiles WHERE profile='DEFAULT' AND resource_name='PASSWORD_LIFE_TIME';

修改密码:file

alter user username identified by "password";

username 用用户名替换密码

password 用新密码替换,注意冒号须要保留db

去除180天限制:word

ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

 

 

ORA-28000: the account is locked  dba

sqlplus登录sysdba后,执行

ALTER USER username ACCOUNT UNLOCK;

username 用帐户名替换