dfrag.sql
rem dfrag.sql rem ttitle 'Segment Fragmentation - 3 or greater' rem col owner format a5 col segment_name format a25 col segment_type format a6 heading 'TYPE' col tablespace_name format a10 heading 'TABLESPACE' col extents format 999 heading 'EXT' col max_extents format 9999999999 head 'MAX' col segment_size format 999.99 heading 'SIZE MB' rem rem select owner, segment_name, segment_type, tablespace_name, extents, max_extents, bytes/(1024*1024) segment_size from sys.dba_segments where extents > 2 and owner <> 'SYS' order by extents desc / clear breaks computes col