top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Oracle: What do locks actually do?

+2 votes
387 views
Oracle: What do locks actually do?
posted Feb 13, 2015 by Archana

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

If you just want to prevent any other session from modifying the data you can issue

LOCK TABLE whatever
/

This blocks other sessions from updating the data but we cannot block other peple from reading it.

Note that in Oracle such table locking is rarely required, because Oracle operates a policy of read consistency. Which means if we run a query that takes fifteen minutes to run the last row returned will be consistent with the first row; in other words, if the result set had been sorted in reverse order we would still see exactly the same rows.

For more details: http://www.cs.kent.edu/~wfan/link/dbapre/dbatest/54920f.htm

answer Feb 13, 2015 by Amit Kumar Pandey
Similar Questions
+1 vote

How do I can quickly open a 8Gb dsv file with 40 million rows with oracle sql developer?
I did it with a best laptop with high cpu speed but it took one day, I'm looking for a faster way...

...