Think Foward Logo Tested on Oracle 7 Tested on Oracle 8.0 Tested on Oracle 8i Tested on Oracle 9i Tested on Oracle 10g

SQL Script

Tablespace Mapper

Updated: 04-Aug-2002
Version: 1.0

Description

This script lists all used and free extents of a given tablespace. This is an easy way to see tablespace fragmentation.

Parameters

tspace - The Tablespace to Map.

SQL Source

REM Copyright (C) Think Forward.com 1998- 2005. All rights reserved. 
set pages 60 set lines 132 set ver off col owner form a10 col file_id form 9999 heading "File ID" col block_id form 9999999 heading "Block ID" ACCEPT tspace prompt 'Enter Tablespace Name : ' spool mapper.lst select 'FREE SPACE' owner , ' ' object , file_id , block_id , bytes from dba_free_space where tablespace_name = UPPER('&tspace') union select SUBSTR(owner,1,20) , SUBSTR(segment_name,1,32) , file_id , block_id , bytes from dba_extents where tablespace_name = UPPER('&tspace') order by 3,4 / spool off

Return to Index of SQL Scripts


Site Map

General Information : Home | Company Profile | Contact Us | Legal
Database Support : Proactive Support | Pay Per Incident Support
Expert Services : High Availability | Creative Solutions | Training
Build Services : Oracle Installations | Revive your Oracle Setup | Low Cost Development
Free Oracle Resources: DBA Scripts | Oracle Links