ORA-28002 Oracle 11g存在密码过期问题解决方案
时间:2024-01-16 10:29:52
故障现象
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对应的密码生命周期配置为 无限制
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
php基础知识:类与对象(5) static
composer.lock文件的作用
centos7利用yum安装mysql 8.0.12
![](https://img.aspxhome.com/file/2023/4/115334_0s.png)
详解phpMyAdmin的安装和配置
Python实现的生产者、消费者问题完整实例
SQL数据库实例名称找不到或远程连接失败并显示错误error40的原因及解决办法
![](https://img.aspxhome.com/file/2023/7/110107_0s.png)
Python K-means实现简单图像聚类的示例代码
![](https://img.aspxhome.com/file/2023/6/99126_0s.png)
查找python项目依赖并生成requirements.txt的方法
SQL 2008的变更数据捕获——跟踪可变部分
![](https://img.aspxhome.com/file/UploadPic/20093/2009322183639136.jpg)
用python 实现在不确定行数情况下多行输入方法
让python 3支持mysqldb的解决方法
深入了解Python枚举类型的相关知识
微信小程序学习笔记之表单提交与PHP后台数据交互处理图文详解
![](https://img.aspxhome.com/file/2023/7/111307_0s.png)
Linux系统下mysqlcheck修复数据库命令(详解)
python super的使用方法及实例详解
使用ASP脚本命令重新启动服务器
围观tangram js库
Python pickle模块实现对象序列化
php读取mysql的简单实例
使用python爬取抖音视频列表信息
![](https://img.aspxhome.com/file/2023/3/107283_0s.jpg)