开发者

Set a time limit to an oracle query

开发者 https://www.devze.com 2023-04-06 21:00 出处:网络
I开发者_如何学Python need to interrupt the execution of an oracle query if it is taking more than 10 seconds, and give user a message informing him about execution timeout.

I开发者_如何学Python need to interrupt the execution of an oracle query if it is taking more than 10 seconds, and give user a message informing him about execution timeout. I googled a lot but i didn't find anything useful. Is there any way to set a time limit to oci_execute


A profile can be used but is a little harsh. A better solution is to use Oracle Resource Manager. Setup a resource manager plan, assign resource consumer groups, decide how a session gets assigned to a resource consumer group and off you go. You can even make it refuse to start a query when the estimated runtime exceeds the allowed runtime. Also check http://ronr.blogspot.com/2009/06/howto-configure-resource-manager-using.html


Maybe Oracle profiles are useful in your case: http://www.adp-gmbh.ch/ora/concepts/profile.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号