The Data Warehouse Development Life Cycle
Oracle Features for the Data Warehouse
Tablespace Fragmentation
Listing 8.14 An SQL*Plus script to display tablespace extents.
rem tblsp_fr.sql - shows all tablespaces with more than 10 extents
SET PAGES 9999;
COLUMN c1 HEADING "Tablespace Name"
COLUMN c2 HEADING "Number of Extents"
TTITLE " Tablespaces with more than 10 extents"
SELECT tablespace_name c1,
MAX(extent_id) c2
FROM Remote DBA_extents
SEE CODE DEPOT FOR FULL SCRIPT
Here is the output of this script:
SQL> @tblsp_fr
Fri Mar
15
page 1
Tablespaces
with more than 10 extents
Tablespace Name
Number of Extents
------------------------------
-----------------
INDX
113
SALES 57
SYSTEM 56