ORACLE表空间的使用情况

时间:2022-10-08 03:37:31
<pre class="cpp" name="code">--查看ORACLE表空间的使用情况
 
SELECT *
FROM SYS.SM$TS_AVAIL;
SELECT *
FROM SYS.SM$TS_USED;
SELECT *
FROM SYS.SM$TS_FREE;
SELECT A.TABLESPACE_NAME AS 表空间, A.BYTES AS 总大小, B.BYTES AS 已使用, C.BYTES AS 剩余, B.BYTES * 100 / A.BYTES AS "% 使用率"
, C.BYTES * 100 / A.BYTES AS "% 空余比"
FROM SYS.SM$TS_AVAIL A, SYS.SM$TS_USED B, SYS.SM$TS_FREE C
WHERE A.TABLESPACE_NAME = B.TABLESPACE_NAME
AND A.TABLESPACE_NAME = C.TABLESPACE_NAME;