Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to monitor a stored procedure

507170Apr 18 2006 — edited Apr 20 2006
Is 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 18 2006
Added on Apr 18 2006
4 comments
1,416 views