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!

select for update and short/long running DMLs

User_5OAFPNov 19 2012 — edited Nov 19 2012
Here is what documentation says: "SELECT... FOR UPDATE statements are often used by interactive programs that allow a user to modify fields of one or more specific rows (which might take some time); row locks are acquired so that only a single interactive program user is updating the rows at any given time."

My questions:
1) Is "SELECT ... FOR UPDATE" approach generally good and safe approach when dealing with long running and short running DMLs that can influence one another like, for example, delete a row and cause ORA-08006: specified row no longer exists while merging etc.
2) what other approaches are worth considering (if any)?
3) if "SELECT ... FOR UPDATE" is used on a query with a view, are underlying tables locked too?

thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2012
Added on Nov 19 2012
4 comments
392 views