Is it possible to use timeout for a stored procedure, or better, to stop a stored procedure after a timeout? I have a piece of software that should be very responsive. It has to answer back in a specific timeout. If it cannot get a database feedback at this slice of time, it is supposed to return back an error. Unfortunately, it can't rely on the responsiveness of the database at some times, since the stored procedure is sort of complex and has to wait for some resources sometimes.
There is no native way to say "if this procedure does not complete in xx amount of time, die".
About the only way that I can think of to implement this functionality is to spawn a second process. Make sure that that process will die after a certain amount of time by assigning a time limit profile to that process. Then your original process will have to determine if the spawned process died or completed normally. It's a lot of effort to get everything to work out right.
For More Information
- What do you think about this answer? E-mail us at editor@searchDatabase.com with your feedback.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle tip to offer your fellow DBA's and developers? The best tips submitted will receive a cool prize--submit your tip today!
- Ask your technical Oracle questions--or help out your peers by answering them--in our live discussion forums.
- Ask the Experts yourself: Our Oracle gurus are waiting to answer your toughest questions.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.