I need to keep a session alive for 30 minutes and then kill it.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Oracle doesn’t expire sessions, it expires connections. The way it does this is with profiles. These are templates of resource allocation which a DBA can create and assign to users.
If you want to kill a session after thirty minutes of inactivity then create a PROFILE and set
IDLE_TIME = 30. If you want to limit a connection to a total time of thirty minutes regardless, setCONNECT_TIME = 30. Find out more.Note that these timeouts are enforced by the PMON background process; this wakes up periodically and so an idle session may have been idle for more than thirty minutes before PMON snipes it.
Also, the database must be configured to permit dynamic resource management. There is an initialization parameter, RESOURCE_LIMIT, to govern the behaviour. Its default value is FALSE (because there is an overhead in tracking such things).