Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Segment Availability during Shrink


The Segment shrink is done online. During shrink operation, the conventional DML operations can coexist but parallel DMLs cannot.

During segment shrink, data will be moved as part of the compaction phase.
During compaction locks will be held on individual rows and/or blocks containing the data. This will cause the concurrent DMLs like updates and deletes to serialize on the locks. The compaction will be done in units of smaller transactions, so the availability of the object will not be impacted significantly.

However during certain phases of segment shrink (when the HWM is adjusted), the segment will have to be locked in exclusive mode.

This phase is for a very short duration and should impact the availability of the object less significantly.

NOTE: Shrinking space of a large segment can take a lot of time, e.g. tens of hours, and can generate lots of redo. Therefore, it is not advised to interrupt a shrink statement to prevent a possibly massive rollback.


Thanks



This post first appeared on Oracle Database Administration, please read the originial post: here

Share the post

Segment Availability during Shrink

×

Subscribe to Oracle Database Administration

Get updates delivered right to your inbox!

Thank you for your subscription

×