Chapter 34. DBMS_SPACE_ADMIN

Table of Contents

34.1. Overview
34.2. Procedure
34.2.1. SEGMENT_DUMP

This chapter briefly introduces the DBMS_SPACE_ADMIN package, and describes how to use the procedures of the package.

34.1. Overview

DBMS_SPACE_ADMIN provides functions for managing segments.

34.2. Procedure

This section describes the procedure provided by the DBMS_SPACE_ADMIN package.

The following are the constants that can be defined for the DBMS_SPACE_ADMIN package:

  • SEGMENT_DUMP_EXTENT_MAP

    • Dumps all extent map information.

    • Type: POSITIVE

    • Value: 5

  • SEGMENTS_DUMP_BITMAP_SUMMARY

    • Dumps only bitmap information.

    • Type: POSITIVE

    • Value: 27

34.2.1. SEGMENT_DUMP

Dumps information about the segment header and bitmap blocks. Information about the dump is saved to the location set in the USER_DUMP_DEST parameter, and can be located using the ALTER SYSTEM DUMP DEST statement.

Details about the SEGMENT_DUMP procedure are as follows:

  • Prototype

    DBMS_SPACE_ADMIN.SEGMENT_DUMP
    (
        tablespace_name       IN VARCHAR2,
        header_relative_file  IN POSITIVE,
        header_block          IN POSITIVE,
        dump_option           IN POSITIVE DEFAULT SEGMENT_DUMP_EXTENT_MAP
    );      
  • Parameter

    ParameterDescription
    tablespace_nameTablespace name of the segment.
    header_relative_fileRelative file number of the segment header.
    header_blockSegment header block number.
    dump_option

    One of:

    • SEGMENT_DUMP_EXTENT_MAP

    • SEGMENT_DUMP_BITMAP_SUMMARY

  • Example

    BEGIN
      DBMS_SPACE_ADMIN.SEGMENT_DUMP('TS', 3, 9, 
                  DBMS_SPACE_ADMIN.SEGMENT_DUMP_EXTENT_MAP);
    END;