故障现象
Oracle Database 11g 数据库普通用户登录时提示 ORA-28002: the password will expire within 7 days
[11:01:00oracle@dvd db_1]$sqlplus wang/oracle
SQL*Plus: Release 11.2.0.1.0 Production on Fri Nov 16 11:01:23 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
ERROR:
ORA-28002: the password will expire within 7 days
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the OLAP and Data Mining options
wang@SUN>
故障原因
Oracle 11G 普通用户有个180天的缺省密码周期,当快过期的时候即会出现此提示;
解决办法
查看当前用户对应profile、对应密码周期
select * from dba_profiles where profile='DEFAULT' AND resource_name='PASSWORD_LIFE_TIME';
alter profile default limit password_life_time unlimited;
SELECT username,PROFILE FROM dba_users where username like upper('&USER');
sys@SUN> SELECT username,PROFILE FROM dba_users where username like upper('&USER');
Enter value for user: wang
old 1: SELECT username,PROFILE FROM dba_users where username like upper('&USER')
new 1: SELECT username,PROFILE FROM dba_users where username like upper('wang')
USERNAME PROFILE
------------------------------ ------------------------------
WANG DEFAULT
--查询到该用户对应的Profile文件为 DEFAULT
sys@SUN> set lines 222
sys@SUN> col PROFILE for a20
sys@SUN> col RESOURCE_NAME for a20
sys@SUN> col RESOURCE_TYPE for a20
sys@SUN> col LIMIT for a20
sys@SUN> 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
--查询到该profile对应的密码生命周期配置为180天
修改当前用户对应profile对应对应密码周期
sys@SUN> alter profile default limit password_life_time 365;
Profile altered.
--修改该profile对应的密码生命周期配置为365天
sys@SUN> alter profile default limit password_life_time unlimited;
Profile altered.
--修改该profile对应的密码生命周期配置为 无限制
ORA-28002 Oracle 11g存在密码过期问题解决方案
2019-11-15 15:39Oracle教程网 Oracle
oracle数据库使用中会遇到ORA-28002 Oracle 11g存在密码过期问题,本文将提供详细的解决方案,需要的朋友可以参考下
延伸 · 阅读
- 2021-12-20linux系统下oracle11gR2静默安装的经验分享
- 2021-11-12oracle11g卸载完整图文教程
- 2021-09-28教你使用PLSQLDeveloper14连接Oracle11g的详细过程
- 2021-08-08Oracle11g R2 安装教程完整版
- 2021-08-08Oracle11g r2 卸载干净重装的详细教程(亲测有效已重
- 2021-06-30Docker安装Oracle_11g的方法
- Oracle
Oracle与Mysql自动增长列(id)的区别
这篇文章主要介绍了Oracle与Mysql自动增长列(id)的区别,需要的朋友可以参考下 ...
- Oracle
oracle中add_months()函数及用法总结
这篇文章主要介绍了oracle中add_months()函数及用法总结,非常不错,具有一定的参考借鉴价值,需要的朋友可以参考下 ...
- Oracle
ORACLE 系统函数大全SQLSERVER系统函数的异同
下面是Oracle支持的字符函数和它们的Microsoft SQL Server等价函数。...
- Oracle
oracle 多个字符替换实现
CSDN上的一个网友,需要一个sql语句的解决方案需求是这样的求写oracle多个字符替换(有测试数据) ...
- Oracle
Oracle 批处理自动备份bat脚本语句的步骤详解
这篇文章主要介绍了Oracle 批处理自动备份bat脚本语句的步骤详解,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友...
- Oracle
Oracle 获得以百分号结尾的脚本有三种写法
本节主要介绍了Oracle 获得以百分号结尾的脚本有三种写法,以获得ID=4443的数据行为例 ...
- Oracle
Oracle数据库的空间管理技巧
在oracle数据库中,DBA可以通过观测一定的表或视图来了解当前空间的使用状况,进而作出可能的调整决定 ...
- Oracle
Oracle除去数据中的换行符以免读取出现问题
将整条数据取出,并用特殊符号分割,如果数据出现换行的情况,那么读取时就有问题,这时就可以采用下面的方法来去除 ...