测试

来源:互联网 发布:大数据交换系统 编辑:程序博客网 时间:2024/05/21 17:50

  测试看看订阅后的格式

 

set linesize 300
col name format a40
set verify off

select b.NAME,
       a.tablespace_size * 8192 / 1024 / 1024 pretssize,
       round((a.tablespace_size - a.tablespace_usedsize) * 8192 / 1024 / 1024,
             0) pretsfree,
       Round(a.tablespace_usedsize * 8192 / 1024 / 1024, 0) pretsused,
       c.tablespace_size * 8192 / 1024 / 1024 tssize,
       round((c.tablespace_size - c.tablespace_usedsize) * 8192 / 1024 / 1024,
             0) tsfree,
       Round(c.tablespace_usedsize * 8192 / 1024 / 1024, 0) tsused,
       Round((c.tablespace_usedsize - a.tablespace_usedsize) * 8192 / 1024 / 1024,
             0) inc
  from dba_hist_tbspc_space_usage a,
       dba_hist_tbspc_space_usage c,
       v$tablespace               b
where a.tablespace_id = b.TS#
   and c.tablespace_id = b.TS#
   and a.snap_id = &1
   and c.snap_id = &2
order by 1
/
set verify on

原创粉丝点击