I would like to terminate user sessions (and optionally also lock the user), exactly 8 hours after user established DB connection. I tried creating a profile, but it just doesn't terminate user's sessions after 8h. I use 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;