 |
|
Oracle Tips by Burleson |
Easy Oracle Automation
Chapter 5 -
Automatic Storage Management
Automated Space Management
in Oracle10g
During the segment shrink operation, index
dependency is not affected. The shrink operation does not affect
any indexes, though rebuilding secondary indices on an IOT is
often recommended. DML triggers are not fired, as the data is
not changed by this internal INSERT/DELETE operation.
A shrink operation may cause ROWIDs to
change in heap-organized segments. So row movement has to be
enabled to circumvent this issue before a shrink operation. To
enable row movement, use the {CREATE|ALTER} TABLE ..ENABLE ROW
movement command. A shrink operation consists of two phases,
compaction and adjusting the HWM to release the unused space. If
the COMPACT option is used, only the first phase is executed.
The shrink results are saved in bitmap blocks of the
corresponding segment. The next time a shrink operation is
performed on the same segment, Oracle Database 10g will remember
what has been done. If CASCADE is specified, the shrinking
cascades to all dependent segments that support a shrink
operation.During the COMPACT phase, individual
rowlocks are held. Concurrent DML operations serialize on these
rowlocks and DML operations can block
the compaction
progress. When the HWM is adjusted in the second phase, the
object is locked in exclusive mode for a short duration.
More details on the shrink operation are
given in the next section.
The above text is
an excerpt from:
Easy Oracle Automation
Oracle10g Automatic
Storage, Memory and Diagnostic Features
ISBN 0-9745993-6-0
by Dr. Arun Kumar R.
|
Download your Oracle scripts now:
www.oracle-script.com
The
definitive Oracle Script collection for every Oracle professional DBA
|
|