Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to always kill a query after specified time elapsed

user4212303Jan 15 2016 — edited Jan 17 2016

What is the best way to set a parameter to always kill a query run by a specific userid if  the query run for more than a  set time (30 minutes) ?


This is to prevent certain non-optimized queries taking up too much system resources.

We run oracle queries from Microsoft Access using an ODBC client. We do set ODBC timeout parameter for queries but it is not always enforced. Hence, certain queries run/hung for long time using up a lot of system resources.

I was wondering if there is a better way to automatically kill queries on the Oracle side (rather than on odbc client side). 

After a bit research, it seems a profile can be created with CONNECT_TIME and IDLE_TIME parameters and then apply the profile to our user.  Or Database Resource Manager parameters like MAX_EST_EXEC_TIME ,MAX_IDLE_TIME can also be set. Will this achieve what i am looking for? I am not sure what is the best/simplest way..

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 14 2016
Added on Jan 15 2016
8 comments
3,481 views