[问题描述]
当用户出现提示密码将要过期的错误ORA-28002时如何处理?
CIE68:~ # su - Oracle
oracle@CIE68:~> system/Atae1234
SQL*Plus: Release 11.1.0.6.0 - Production on Tue Jan 19 15:15:50 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
ERROR:
ORA-28002: the password will expire within 302 days
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
[问题处理]
因为设置了密码过期时间,所以才会有密码过期提醒,如何查看和修改密码过期无限制呢?
步骤 1 登陆数据库,查看用户的proifle文件名称,一般是default:
执行如下操作:
SQL> SELECT username,PROFILE FROM dba_users where USERNAME='OMSMODEL';
USERNAME PROFILE
------------------------------ ------------------------------
OMSMODEL DEFAULT
步骤 2查看指定概要文件(如default)的密码有效期设置:
SQL> select LIMIT from dba_profiles s where s.profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';
LIMIT
----------------------------------------
180
步骤 3将密码有效期由默认的180天修改成“无限制”:
SQL> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
Profile altered.
SQL> select LIMIT from dba_profiles s where s.profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';
LIMIT
----------------------------------------
UNLIMITED
步骤 4修改后,还没有被提示ORA-28002警告的用户不会再碰到同样的提示;已经被提示的用户必须再改一次密码,举例如下:
SQL> alter user identified by
----注:不用换新密码
Example:
SQL> alter user identified by Atae12345;
User altered.
注: 如果像上面问题描述中显示信息,用户已经出现了 ORA-28002警告,在修改了用户密码为UNLIMITED之后,必须执行第四步,重新修改一下用户密码(密码可以保留与原来相同),否则仍然报:ORA-28002警告;
ORA-28002密码将在7天后过期