shrink a database in oracle 11g

后端 未结 1 815
说谎
说谎 2021-01-23 04:23

I am not a database administrator by any means so I might be wrong in stating some of the things here.

In SQL Server, when we add a large amount of data in the database

相关标签:
1条回答
  • 2021-01-23 04:55

    Full explanation from the Oracle Documentation: Reclaiming Wasted Space. For the short version:

    "You can shrink space in a table, index-organized table, index, partition, subpartition, materialized view, or materialized view log. You do this using ALTER TABLE, ALTER INDEX, ALTER MATERIALIZED VIEW, or ALTER MATERIALIZED VIEW LOG statement with the SHRINK SPACE clause."

    So, after running the Oracle Segment Advisor to recommend areas to shrink, something like the following will shrink space in a table named mytable.

    SQL> alter table mytable enable row movement;
    Table altered
    
    SQL> alter table mytable shrink space;
    Table altered
    
    0 讨论(0)
提交回复
热议问题