How to monitor a stored procedure
507170Apr 18 2006 — edited Apr 20 2006Is there any PL/SQL way to monitor a stored procedure? Basically, I've got a stored procedure that I scheduled via CRON to run every 10 minutes. Unfortunately, sometimes it takes more then 10 minutes to run, and I end up with 2+ instances of the procedure running at the same time.
It would be great if I could put something at the beginning of the procedure to say 'if you are already running then just exit'. I can hack together a solution, make a table with a column and have the procedure mark it with '1' or '0' when it starts/stops. I thought there might be a more elegant solution, like a way to have my procedure check to see if a procedure with its name is running. Looking through oracle docs, can't find anything.
Any suggestions?
Thanks!
Eden