shrink a segment
发表于:2025-01-23 作者:千家信息网编辑
千家信息网最后更新 2025年01月23日,沾一篇来自metalink的好文Oracle 10g Segment shrink=========================Mandatory=========Init.ora paramet
千家信息网最后更新 2025年01月23日shrink a segment沾一篇来自metalink的好文
Oracle 10g Segment shrink
=========================
Mandatory
=========
Init.ora parameter 'Compatible' must be >=10.0
Shrink operations can be performed only on segments in locally managed
tablespaces with automatic segment space management (ASSM).
How it works
============
1. Enable row movement for the table.
SQL> ALTER TABLE scott.emp ENABLE ROW MOVEMENT;
2. Shrink table but don't want to shrink HWM (High Water Mark).
SQL> ALTER TABLE scott.emp SHRINK SPACE COMPACT;
3. Shrink table and HWM too.
SQL> ALTER TABLE scott.emp SHRINK SPACE;
4. Shrink table and all dependent index too.
SQL> ALTER TABLE scott.emp SHRINK SPACE CASCADE;
5. Shrink table under MView.
SQL> ALTER TABLE SHRINK SPACE;
Oracle 10g Segment shrink
=========================
Mandatory
=========
Init.ora parameter 'Compatible' must be >=10.0
Shrink operations can be performed only on segments in locally managed
tablespaces with automatic segment space management (ASSM).
How it works
============
1. Enable row movement for the table.
SQL> ALTER TABLE scott.emp ENABLE ROW MOVEMENT;
2. Shrink table but don't want to shrink HWM (High Water Mark).
SQL> ALTER TABLE scott.emp SHRINK SPACE COMPACT;
3. Shrink table and HWM too.
SQL> ALTER TABLE scott.emp SHRINK SPACE;
4. Shrink table and all dependent index too.
SQL> ALTER TABLE scott.emp SHRINK SPACE CASCADE;
5. Shrink table under MView.
SQL> ALTER TABLE