Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sybase 12 stored procedure looping - how to stop it

Status
Not open for further replies.

RichardLajoie

Technical User
Dec 17, 2007
1
CA
A stored procedure was executed that resulted in an endless loop. I have attempted to stop it by executing "drop procedure" command but the reply is : "Cannot drop the procedure 'CalendarTotals' because it is currently in use". Does anyone know how i can stop this process ?
 
Hi

If you know the process id, you can kill the process. The DBAs will have this privilege. You have to reach out to them to kill the process. Even if you don't know the process id, the DBAs can help you.

You can't drop it when it is executing. A better way to test such cases where there is a potential loop is to identify a test case and determine the expected number of loops. Then put in a break statement if the loop count goes beyond a certain number, say 50 if all you expected was 25 loops.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top