반응형

set line 200
set pages 500
col tablespace_name for a30

SELECT a.tablespace_name
, a.total "Total(Mb)"
, a.total - b.free "Used(Mb)"
, nvl(b.free,0) "Free(Mb)"
, round((a.total - nvl(b.free,0))*100/total,2) "Used(%)"
from (select tablespace_name, round((sum(bytes)/1024/1024),0) as total
from dba_data_files
group by tablespace_name) a
,(select tablespace_name, round((sum(bytes)/1024/1024),0) as free
from dba_free_space
group by tablespace_name) b
where a.tablespace_name = b.tablespace_name(+)
order by a.tablespace_name;

'DBMS > Oracle' 카테고리의 다른 글

cursors(커서) 관리  (0) 2022.07.04
SGA,PGA 메모리 할당 조회  (0) 2022.07.04
tablespace 관리  (0) 2022.07.04
datafile 관리  (0) 2022.07.04
table move 하는 방법  (0) 2022.07.04

+ Recent posts