我想在用户建立数据库连接 8 小时后终止用户会话(也可以选择锁定用户)。我尝试创建一个配置文件,但它只是不会在 8 小时后终止用户的会话。我使用 Oracle Enterprise DB 12c。
CREATE PROFILE "PROFILE_8H_EXPIRY" LIMIT
SESSIONS_PER_USER UNLIMITED
CPU_PER_SESSION UNLIMITED
CPU_PER_CALL UNLIMITED
CONNECT_TIME 480 -- Specify the total elapsed time limit for a session, expressed in minutes.
IDLE_TIME UNLIMITED
LOGICAL_READS_PER_SESSION UNLIMITED
LOGICAL_READS_PER_CALL UNLIMITED
COMPOSITE_LIMIT UNLIMITED
PRIVATE_SGA UNLIMITED
FAILED_LOGIN_ATTEMPTS UNLIMITED
INACTIVE_ACCOUNT_TIME UNLIMITED
PASSWORD_LIFE_TIME 0.33 -- Specify the number of days the same password can be used for authentication
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX UNLIMITED
PASSWORD_LOCK_TIME UNLIMITED -- Specify the number of days an account will be locked after too many failed login attemps.
PASSWORD_GRACE_TIME 0.33 -- If the password is not changed during the grace period marked in days, the password expires.
PASSWORD_VERIFY_FUNCTION FUNCTION_8H_EXPIRY;
ALTER USER JOHN PROFILE PROFILE_8H_EXPIRY;
创建个人资料
检查
resource_limit
参数。