oracle修改用户密码180天为不限制

默认情况下oracle 数据库安装完成后,用户的密码有效期为180天,如果密码过期失效会影响业务运行,所以要修改为不限制

登录sqlplus

Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.1.0
Connected as hml
 
SQL> select username,profile from dba_users; **查看用户使用的配置文件
 
USERNAME                       PROFILE
------------------------------ ------------------------------
HML                            DEFAULT
SCOTT                          DEFAULT
GOLDENGATE                     DEFAULT
ORACLE_OCM                     DEFAULT
XS$NULL                        DEFAULT
MDDATA                         DEFAULT
DIP                            DEFAULT
APEX_PUBLIC_USER               DEFAULT
SPATIAL_CSW_ADMIN_USR          DEFAULT
SPATIAL_WFS_ADMIN_USR          DEFAULT
DBSNMP                         MONITORING_PROFILE
SYSMAN                         DEFAULT
FLOWS_FILES                    DEFAULT
MDSYS                          DEFAULT
ORDSYS                         DEFAULT
EXFSYS                         DEFAULT
WMSYS                          DEFAULT
APPQOSSYS                      DEFAULT
APEX_030200                    DEFAULT
OWBSYS_AUDIT                   DEFAULT
 
USERNAME                       PROFILE
------------------------------ ------------------------------
ORDDATA                        DEFAULT
CTXSYS                         DEFAULT
ANONYMOUS                      DEFAULT
XDB                            DEFAULT
ORDPLUGINS                     DEFAULT
OWBSYS                         DEFAULT
SI_INFORMTN_SCHEMA             DEFAULT
OLAPSYS                        DEFAULT
MGMT_VIEW                      DEFAULT
SYS                            DEFAULT
SYSTEM                         DEFAULT
OUTLN                          DEFAULT
 
32 rows selected
 
 
SQL> select * from dba_profiles s where s.profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';  ***查看DEFAULT配置文件中密码生命周期
 
PROFILE                        RESOURCE_NAME                    RESOURCE_TYPE 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';  ***验证查看DEFAULT配置文件中密码生命周期
 
PROFILE                        RESOURCE_NAME                    RESOURCE_TYPE LIMIT
------------------------------ -------------------------------- ------------- ----------------------------------------
DEFAULT                        PASSWORD_LIFE_TIME               PASSWORD      UNLIMITED
 
SQL>

posted @ 2018-03-29 10:35  年轻的卖油翁  阅读(2179)  评论(0编辑  收藏  举报