create or replace
package dbms_space_admin is
------------
-- OVERVIEW
--
-- This package provides tablespace/segment space administration
-- not available through the standard sql.
-- SECURITY
--
-- run with SYS privileges. thus any user who has privilege to execute the
-- the package gets to manipulate the bitmapes.
-- CONSTANTS to be used as OPTIONS for various procedures
-- refer comments with procedure(s) for more detail
SEGMENT_VERIFY_EXTENTS constant positive := 1;
-- used to verify that the space owned by segment is appropriately reflected
-- in the bitmap as used
SEGMENT_VERIFY_EXTENTS_GLOBAL constant positive := 2;
-- used to verify that the space owned bu segment is appropriately reflected
-- in the bitmap as used and that no other segment claims any of this space
-- to be used by it
SEGMENT_MARK_CORRUPT constant positive := 3;
-- used to mark a temp segment as corrupt whereby facilitating its
-- elimination from the dictionary (without space reclaim)
SEGMENT_MARK_VALID constant positive := 4;
-- used to mark a corrupt temp segment as valid. Useful when the corruption
-- in the segment extent map or elsewhere has been resolved and the segment
-- can be dropped normally
SEGMENT_DUMP_EXTENT_MAP constant positive := 5;
-- dump the extent map for a given segment
TABLESPACE_VERIFY_BITMAP constant positive := 6;
-- verifies the bitmap of the tablespace with extent maps of the segments
-- in that tablespace to make sure everything is consistent
TABLESPACE_EXTENT_MAKE_FREE constant positive := 7;
-- makes this range (extent) of space free in the bitmaps
TABLESPACE_EXTENT_MAKE_USED constant positive := 8;
-- makes this range (extent) of space used in the bitmaps
SEGMENT_VERIFY_BASIC constant positive := 9;
SEGMENT_VERIFY_DEEP constant positive := 10;
SEGMENT_VERIFY_SPECIFIC constant positive := 11;
HWM_CHECK constant positive := 12;
BMB_CHECK constant positive := 13;
SEG_DICT_CHECK constant positive := 14;
EXTENT_TS_BITMAP_CHECK constant positive := 15;
DB_BACKPOINTER_CHECK constant positive := 16;
EXTENT_SEGMENT_BITMAP_CHECK constant positive := 17;
BITMAPS_CHECK constant positive := 18;
TS_VERIFY_BITMAPS constant positive := 19;
TS_VERIFY_DEEP constant positive := 20;
TS_VERIFY_SEGMENTS constant positive := 21;
SEGMENT_DUMP_BITMAP_SUMMARY constant positive := 27;
NGLOB_HBB_CHECK constant positive := 12;
NGLOB_FSB_CHECK constant positive := 13;
NGLOB_PUA_CHECK constant positive := 14;
NGLOB_CFS_CHECK constant positive := 15;