views:

71

answers:

2

How oracle maintained concurrency of PL/SQL Program? i.e. If user A and B both execute same procedure (Contains DML operations) @ same time.

A: 

It follows general Oracle Locking features.

Oracle maintains separate session for User A and User B.

Padmarag
True but in case of dml operation on table for the same record will not be allowed if transaction happened same time
P Sharma
+1  A: 

If user A updates a particular row and then in another session user B tries to update (or delete) the same row, then user B's session will be "blocked", i.e. it will wait for user A's session to either commit or roll back before continuing. You can easily see this by opening 2 SQL Plus sessions and running the exact same update statement in both. The second session will "hang" until the first session commits or rolls back. This is true whether the updates are done in PL/SQL or not.

Tony Andrews