Setting Oracle 11g Session Timeout

前端 未结 6 918
失恋的感觉
失恋的感觉 2021-01-11 15:56

After rebooting the server, the oracle connection from the Tomcat server times out every night. Prior to the reboot, the connection didn\'t timeout. Now, in the morning, the

6条回答
  •  梦毁少年i
    2021-01-11 16:03

    I came to this question looking for a way to enable oracle session pool expiration based on total session lifetime instead of idle time. Another goal is to avoid force closes unexpected to application.

    It seems it's possible by setting pool validation query to

    select 1 from V$SESSION 
    where AUDSID = userenv('SESSIONID') and sysdate-LOGON_TIME < 30/24/60
    

    This would close sessions aging over 30 minutes in predictable manner that doesn't affect application.

提交回复
热议问题