Oracle select for update of
Active 10 months ago. Viewed 1k times. Improve this question. Hasindu Dahanayake Hasindu Dahanayake 1, 1 1 gold badge 9 9 silver badges 32 32 bronze badges. Add a comment. Active Oldest Votes. If instead you do select Improve this answer. Alex Poole Alex Poole k 9 9 gold badges silver badges bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.
Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related Hot Network Questions. Pessimistic locking: The developer must declare their intent to update the row set. Optimistic locking: You re-read data and only update it if it did not change since the initial fetch.
The select for update is not a good locking strategy because there are many things that can go wrong. When managing web-based Oracle databases, the traditional "select for update" locking is inappropriate, and Oracle professionals have struggled with alternative mechanisms to maintain data integrity using an "optimistic" coding strategy:.
Re-read - When an update comes in from the internet, the Oracle code re-reads the data to ensure that there are no changes since the data was originally delivered. Timestamp - Some Oracle shops add a timestamp column to enforce serial updates and prevent accidental overlaying of data. Now in Oracle 10g and beyond we see the new rowscn pseudo-column and the rowdependencies clause.
Instead of select for update , savvy Oracle developers will adopt alternatives mechanisms like:. If the rows has not changed since the initial read, update the row. Feel free to ask questions on our Oracle forum. Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise.
All legitimate Oracle experts publish their Oracle qualifications. Oracle technology is changing and we strive to update our BC Oracle support information. If you find an error or have a suggestion for improving our content, we would appreciate your feedback.
0コメント