--테이블 스페이스 조회 select df.tablespace_name "Tablespace", round(df.TBS_maxbyte /1073741824,2) "Total(GB)", round((df.TBS_byte - nvl(fs.Free_byte,0))/1073741824,2) "Used(GB)", round((df.TBS_byte - nvl(fs.Free_byte,0))/df.TBS_maxbyte *100,0) "Used(%)", round((df.TBS_maxbyte - (df.TBS_byte - nvl(fs.Free_byte,0))) /1073741824,2) "Free(GB)", round(((df.TBS_maxbyte - (df.TBS_byte - nvl(fs.Free_byte,0)))/df.TBS_maxbyte) *100,0) "Free(%)", nvl(fs.pieces,0) "Pieces", round(nvl(fs.Max_free,0) /1048576) "MaxFree(MB)", db.status "Status" from (select tablespace_name , sum(bytes) TBS_byte , sum(decode(maxbytes,0,bytes,maxbytes)) TBS_maxbyte from dba_data_files group by tablespace_name ) df, (select tablespace_name, max(bytes) Max_free , sum(bytes) Free_byte, count(*) pieces from dba_free_space group by tablespace_name ) fs, (select tablespace_name, initial_extent, next_extent, status from dba_tablespaces ) db where df.tablespace_name = db.tablespace_name and df.tablespace_name = fs.tablespace_name(+) order by 6; . |