This content has been marked as final. Show 2 replies
I want a procedure to be sequentially accessed by multiple users. This procedure performs a bulk upload and I want only one user to perform a bulk upload at any instant. So, I want the procedure to insert a row in a table and commit on starting. Any other instance of the procedure would check the existence of this row and get rejected.
That is the wrong solution for your problem. Just serialize the procedure using functionality that Oracle already provides.
See my reply in this thread for how to use DBMS_LOCK to serialize that procedure. You don't need to use a table like you are doing.
Re: possible to lock stored procedure so only one session may run it at a time?
DO NOT follow up in this thread. As already said this forum is for SQL developer questions only.
Mark this thread ANSWERED and post in the sql and pl/sql forum if you need more help with this issue.