Oracle 11g数据库密码过期ORA-28002问题处理方法
问题描述与分析:用户在登录时报错ORA-28002,(如下图)提示数据将在1天后过期。这是由于11g对于密码的生命周期进行了控制,控制时间为180天。将其时间进行修改便能够解决此问题,未报该错误的用户,将按照修改后的来判断,已出现警告的用户需要进行密码的修改,方可按照新定的时间进行判断。
sqlplus连接时:
ORA-28002: the password will expire within 1 days
28002. 00000 - "the password will expire within %s days"
*Cause: The user's account is about to expire and the password
needs to be changed
*Action: change the password or contact the DBA
供应商代码 28002
Oracle sql developer连接时:
pl/sql连接时:
处理方法:
1.连接数据库检查default profile文件中的password_life_time参数
[oracle@tora01 diag]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon May 25 13:17:57 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from dba_profiles s where s.profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';
PROFILE RESOURCE_NAME RESOURCE
------------------------------ -------------------------------- --------
LIMIT
----------------------------------------
DEFAULT PASSWORD_LIFE_TIME PASSWORD
180
2. 修改password_life_time参数为unlimited(此处按照要求更改,处于怕以后再次出过期,直接unlimited)
SQL> alter profile default limit password_life_time unlimited;
Profile altered.
3. 再次检查此参数
SQL> select * from dba_profiles s where s.profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';
PROFILE RESOURCE_NAME RESOURCE
------------------------------ -------------------------------- --------
LIMIT
----------------------------------------
DEFAULT PASSWORD_LIFE_TIME PASSWORD
UNLIMITED
4. 修改报警用户的密码
SQL> alter user testauchan identified by oracle;
User altered.
5. 验证登录是否正常
[oracle@tora01 ~]$ sqlplus testauchan/oracle
SQL*Plus: Release 11.2.0.4.0 Production on Mon May 25 13:41:58 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
总结:该参数是oracle为了安全而制定的,所以在DBA足够控制的能力下,可将改为unlimited,否则还是要建议为使用天数限制。便于对密码的安全进行更改。