开发者

How concurrency maintained by Oracle for PL/SQL Procedure?

开发者 https://www.devze.com 2022-12-22 20:13 出处:网络
开发者_StackOverflow社区How oracle maintained concurrency of PL/SQL Program? i.e. If user A and B both execute same procedure (Contains DML operations) @ same time.If user A updates a particular row a
开发者_StackOverflow社区

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


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.


It follows general Oracle Locking features.

Oracle maintains separate session for User A and User B.

0

精彩评论

暂无评论...
验证码 换一张
取 消