问题:
Oracle密码过期,无法登录。如下图所:
执行请求的操作时遇到错误:
ORA-28001: the password has expired
28001. 00000 - "the password has expired"
*Cause: The user's account has expired and the password needs to be
changed
*Action: change the password or contact the DBA
供应商代码 28001
解决方案:
[oracle@master184 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 2 13:43:06 2021
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select username,profile from dba_users;
USERNAME PROFILE
------------------------------ ------------------------------
SPATIAL_WFS_ADMIN_USR DEFAULT
SPATIAL_CSW_ADMIN_USR DEFAULT
APEX_PUBLIC_USER DEFAULT
DIP DEFAULT
MDDATA DEFAULT
XS$NULL DEFAULT
ORACLE_OCM DEFAULT
SCOTT DEFAULT
OLAPSYS DEFAULT
SI_INFORMTN_SCHEMA DEFAULT
OWBSYS DEFAULT
USERNAME PROFILE
------------------------------ ------------------------------
ORDPLUGINS DEFAULT
XDB DEFAULT
SYSMAN DEFAULT
ANONYMOUS DEFAULT
CTXSYS DEFAULT
ORDDATA DEFAULT
OWBSYS_AUDIT DEFAULT
APEX_030200 DEFAULT
APPQOSSYS DEFAULT
WMSYS DEFAULT
EXFSYS DEFAULT
USERNAME PROFILE
------------------------------ ------------------------------
ORDSYS DEFAULT
MDSYS DEFAULT
FLOWS_FILES DEFAULT
MGMT_VIEW DEFAULT
OUTLN DEFAULT
DBSNMP MONITORING_PROFILE
MRT DEFAULT
ODS DEFAULT
STD DEFAULT
SMARTBI DEFAULT
KRDT DEFAULT
USERNAME PROFILE
------------------------------ ------------------------------
SUM DEFAULT
APP DEFAULT
PROD001 DEFAULT
PROD000 DEFAULT
PROD DEFAULT
ORACLE1 DEFAULT
TEST DEFAULT
SYSTEM DEFAULT
SYS DEFAULT
42 rows selected.
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
SQL> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
Profile altered.
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
SQL> alter user ods identified by ods123;
User altered.
SQL>
- 查看用户策略profile(如当前用的是DEFAULT)
select username,profile from dba_users;
2. 查看用户密码策略
Select * FROM dba_profiles s Where s.profile='DEFAULT' AND resource_name='PASSWORD_LIFE_TIME';
3. 更改用户策略
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
4. 修改已过期密码(新密码可以和原来一样)
alter user ods identified by ods123;
本文介绍了解决Oracle数据库中密码过期导致无法登录的问题。通过更改默认配置文件中的密码有效期设置为无限,并修改已过期的用户密码,实现重新登录。
2018

被折叠的 条评论
为什么被折叠?



