文件名称:oracle查询表空间大小
文件大小:49KB
文件格式:PPTX
更新时间:2017-06-01 13:25:19
oracle 表空间
sqlplus ecifpub/ecifpub@ECIFDB select a.TABLESPACE_NAME "TableSpace Name", round(a.BYTES / 1024 / 1024) "MB Allocated", round((a.BYTES-nvl(b.BYTES, 0)) / 1024 / 1024) "MB Used", nvl(round(b.BYTES / 1024 / 1024), 0) "MB Free", round(((a.BYTES-nvl(b.BYTES, 0))/a.BYTES)*100,2) "Pct Used", round((1-((a.BYTES-nvl(b.BYTES,0))/a.BYTES))*100,2) "Pct Free" from (select TABLESPACE_NAME, sum(BYTES) BYTES from sys.dba_data_files group by TABLESPACE_NAME) a, (select TABLESPACE_NAME, sum(BYTES) BYTES from sys.dba_free_space group by TABLESPACE_NAME) b where a.TABLESPACE_NAME = b.TABLESPACE_NAME (+) order by ((a.BYTES-b.BYTES)/a.BYTES) desc; quit !