--创建 profile 概要文件
create profile profile123 limit
failed_login_attempts 2;
--修改用户的 profile 文件
alter user scott profile profile123;
确保将初始化参数 resource_limit 设置为true,以实施概要文件中的资源限制。否则,Oracle将忽略 create 或 alter profile 语句中的限制设置。与密码有关的概要文件属性不依赖 resource_limit 参数,它们在创建概要文件后自动启动。
--查询用户的profile
[email protected] test11g> select profile from dba_users
2 where username=‘IKKI‘;
PROFILE
------------------------------
DEFAULT
--查看profile文件内容
[email protected] test11g> select distinct resource_name,limit
2 from dba_profiles
3 where profile=‘DEFAULT‘;
RESOURCE_NAME LIMIT
-------------------------------- ----------------------------------------
PASSWORD_LOCK_TIME 1
IDLE_TIME UNLIMITED
CONNECT_TIME UNLIMITED
PASSWORD_GRACE_TIME 7
LOGICAL_READS_PER_SESSION UNLIMITED
PRIVATE_SGA UNLIMITED
LOGICAL_READS_PER_CALL UNLIMITED
SESSIONS_PER_USER UNLIMITED
CPU_PER_SESSION UNLIMITED
FAILED_LOGIN_ATTEMPTS 10
PASSWORD_LIFE_TIME 180
PASSWORD_VERIFY_FUNCTION NULL
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX UNLIMITED
COMPOSITE_LIMIT UNLIMITED
CPU_PER_CALL UNLIMITED
16 rows selected.
--删除用户概要文件
drop profile profile123 cascade;