Skip Headers
Oracle® Database Administrator's Guide
11g Release 2 (11.2)

Part Number E17120-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

Dropping Unused Object Storage

Beginning with Oracle Database 11g release 2 (11.2.0.2), the DBMS_SPACE_ADMIN package includes the DROP_EMPTY_SEGMENTS procedure, which enables you to drop segments for empty tables and partitions that have been migrated from previous releases. This includes segments of dependent objects of the table, such as index segments, where possible.

The following example drops empty segments from every table in the database.

BEGIN
  DBMS_SPACE_ADMIN.DROP_EMPTY_SEGMENTS();
END;

The following drops empty segments from the HR.EMPLOYEES table, including dependent objects.

BEGIN
  DBMS_SPACE_ADMIN.DROP_EMPTY_SEGMENTS(
    schema_name  => 'HR',
    table_name   => 'EMPLOYEES');
END;

This procedure requires 11.2 compatibility level.

See Also:

See Oracle Database PL/SQL Packages and Types Reference for details about this procedure