SQL> conn hr/hr;
ERROR:
ORA-28002: the password will expire within 7 days
Connected.
SQL>
Solution :
[oracle@rac ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Oct 30 18:31:49 2022
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, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> show user;
USER is "SYS"
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> conn hr/hr;
ERROR:
ORA-28002: the password will expire within 7 days
Connected.
SQL>
由于提前运行了以下脚本:
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
紧接着进行用户密码更改:
SQL> alter user hr identified by hr;
User altered.
SQL>