Eu gostaria de encerrar as sessões do usuário (e, opcionalmente, também bloquear o usuário), exatamente 8 horas após o usuário estabelecer a conexão com o banco de dados. Tentei criar um perfil, mas ele simplesmente não encerra as sessões do usuário após as 8h. Eu uso 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;