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
精彩评论