cancel
Showing results for 
Search instead for 
Did you mean: 

Breaking a sybase stored procedure

Former Member
0 Kudos
4,002

How do you break out from a sybase stored procedure call if it hangs or takes too long? Is there a command or setting to prevent stored procedures from taking more than a certain amount of time?

Accepted Solutions (0)

Answers (2)

Answers (2)

VolkerBarth
Contributor

In general, you might use the request_timeout database option to prevent a request to take too long - preferably as a temporary option and not as a public option...

I would think that you will have to set that option beforehand, something like

SET TEMPORARY OPTION request_timeout = 120; -- 2 minutes
CALL MyPossibleRunawayProc();
Former Member

To Break out:

using Sybase Central, go to 'connections' ... find it .. right click, and choose 'disconnect'!

the actual command is 'Drop Connection <id#>'

I do not know of a way to time out without building code within the stored proc.

Better solution ... find out the bottleneck, and solve it!