Oracle 查看用户所在的表空间剩余表空间
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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;
以上是关于Oracle 查看用户所在的表空间剩余表空间的主要内容,如果未能解决你的问题,请参考以下文章