Tuesday, September 05, 2006

SQL script to obtain tablespace usage for objects in Oracle

Below is a script that will report the amount of space each object (table, index, etc) is taking up in its associated tablespace:


select substr(SEGMENT_NAME,1,30) segment_name, SEGMENT_TYPE, substr(tablespace_name,1,30) tablespace_name, bytes/1024/1024 mbytes
from user_segments
order by mbytes desc

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home