Oracle查看用户所在的表空间剩余表空间

SELECT F.TABLESPACE_NAME,
(T.TOTAL_SPACE - F.FREE_SPACE) "USED (MB)",
F.FREE_SPACE "FREE (MB)",
T.TOTAL_SPACE "TOTAL (MB)",
(ROUND((F.FREE_SPACE / T.TOTAL_SPACE) 100)) || '% ' PER_FREE
FROM (SELECT TABLESPACE_NAME,
ROUND(SUM(BLOCKS

(SELECT VALUE / 1024
FROM V$PARAMETER
WHERE NAME = 'db_block_size') / 1024)) FREE_SPACE
FROM DBA_FREE_SPACE
GROUP BY TABLESPACE_NAME) F,
(SELECT TABLESPACE_NAME, ROUND(SUM(BYTES / 1048576)) TOTAL_SPACE
FROM DBA_DATA_FILES
GROUP BY TABLESPACE_NAME) T
WHERE F.TABLESPACE_NAME = T.TABLESPACE_NAME;

创新互联公司-专业网站定制、快速模板网站建设、高性价比江阴网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式江阴网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖江阴地区。费用合理售后完善,十载实体公司更值得信赖。


文章名称:Oracle查看用户所在的表空间剩余表空间
文章位置:http://pwwzsj.com/article/gpcjgi.html