修改oracle数据库密码过期时间

现象描述:

登录oracle11g

提示ERROR:ORA-28002:the password will expire within 1 days.

告警信息:

ERROR:ORA-28002:the password will expire within 1 days.

原因分析:select * from dba_profiles s where s.profile='DEFAULT' AND resource_name='PASSWORD_LIMIT'

oracle11g中默认在default概要文件中设置了"PASSWORD_LIFE_TIME=180天“。

处理过程:

1. export ORACLE_SID=tst01

扫描二维码关注公众号,回复: 420172 查看本文章

2. sqlplus /nolog

3. conn /as sysdba

4. 查看用户的profile是那个,一般是default:

select username,profile from dba_users;

5. 查看制定概要文件(如default)的密码有效期设置:

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

6. 将密码有效期由默认的180天修改成”无限制“

ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

7. 修改后,还没有被提示ORA-28002警告的用户不会再碰到同样的提示;

已经被提示的用户必须再改一次密码,举例如下:

alter user hdy identified by <原来的密码>

猜你喜欢

转载自guanning.iteye.com/blog/2216073