Problem solve Get help with specific problems with your technologies, process and projects.

Implement timeout

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

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.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.