Monday, February 18, 2013

Tablespace usage over time

If you have OEM, this repository query may be very helpful:

SELECT KEY_VALUE Tablespace_Name,
       ROLLUP_TIMESTAMP Sample_date,
       METRIC_COLUMN metric,
       AVERAGE
  FROM sysman.MGMT$METRIC_DAILY
 WHERE metric_name='tbspAllocation'
   and TARGET_NAME='<dbname>' 
   and KEY_VALUE = '<tablespacename>'
 ORDER BY 1,2,3;