A-A+
scripts:查看指定表空间增长情况
查看指定表空间增长情况
set linesize 160 set pagesize 200 BREAK ON name SKIP 1 select b.name, a.rtime, (a.tablespace_usedsize)*(c.block_size)/1024 tablespace_usedsize_kb, (a.tablespace_size)*(c.block_size)/1024 tablespace_size_kb, (TABLESPACE_USEDSIZE - LAG(TABLESPACE_USEDSIZE, 1, NULL) OVER(partition by name ORDER BY substr(a.rtime, 1, 10)))*(c.block_size)/1024 AS DIFF_KB, round(100 * a.tablespace_usedsize / a.tablespace_size) used_percent from dba_hist_tbspc_space_usage a, (select t2.name, min(rtime) rtime, min(tablespace_id) tablespace_id from dba_hist_tbspc_space_usage t1 inner join v$tablespace t2 on t1.tablespace_id = t2.TS# group by name, substr(rtime,1,10) ) b, dba_tablespaces c where a.tablespace_id = b.tablespace_id and c.tablespace_name=b.name and a.rtime = b.rtime and name ='&tablespace_name' order by b.name,a.rtime /