Oracle查看和修改用户密码时间限制

--格式化显示
col profile format a10;
col resource_name format a20;
col resource_type format a20;
col limit format a20;

-- 查看用户profile策略
SELECT username,profile FROM dba_users;
-- 查看用户密码时间限制
select * From dba_profiles s where s.profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME'; 
-- 修改设置为无限制
ALTER profile default limit PASSWORD_LIFE_TIME UNLIMITED;

--示例:
SQL>  select * From dba_profiles s where s.profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';
PROFILE    RESOURCE_NAME        RESOURCE_TYPE        LIMIT
---------- -------------------- -------------------- --------------------
DEFAULT    PASSWORD_LIFE_TIME   PASSWORD             180

SQL> ALTER profile default limit PASSWORD_LIFE_TIME UNLIMITED;
配置文件已更改

SQL>  select *From dba_profileS s where s.profile='DEFAULT' AND RESOURCE_NAME='PASSWORD_LIFE_TIME';
PROFILE    RESOURCE_NAME        RESOURCE_TYPE        LIMIT
---------- -------------------- -------------------- --------------------
DEFAULT    PASSWORD_LIFE_TIME   PASSWORD             UNLIMITED

标签: Oracle, Oracle管理

添加新评论