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?
asked 17 Jan '12, 17:07
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!
answered 17 Jan '12, 20:28
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();
answered 18 Jan '12, 03:51