posted 15 years ago
But, You can do this by obtaining a lock. The simplest is to obtain a lock on a row of some table:
The second call to P2 will have to wait for the other caller's transaction* to finish before it can continue.
Alternatively, you can use the DBMS_LOCK package to define your own locking mechanism.
* Note: my p2 code above locks a record in some_table for the duration of the whole transaction, not just the procedure call. This may be too much. You could use an autonomous transaction to prevent this.
Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+918866008962>
"Helping hands are better than praying lips......"