select u.tablespace_name,
ROUND((u.bytes + f.bytes)/1024/1024,2) "SUM_SPACE(M)",
ROUND(u.bytes/1024/1024,2) "USED_SPACE(M)",
ROUND(f.bytes/1024/1024,2) "FREE_SPACE(M)",
ROUND(u.bytes / (u.bytes + f.bytes) * 100,2) "USED_RATE(%)"
from sys.sm$ts_used u, sys.sm$ts_free f
where u.tablespace_name = f.tablespace_name
order by 5 desc;
查看SM$TS_USED视图的定义
select dbms_metadata.get_ddl('VIEW','SM$TS_USED','SYS') from dual;
ROUND((u.bytes + f.bytes)/1024/1024,2) "SUM_SPACE(M)",
ROUND(u.bytes/1024/1024,2) "USED_SPACE(M)",
ROUND(f.bytes/1024/1024,2) "FREE_SPACE(M)",
ROUND(u.bytes / (u.bytes + f.bytes) * 100,2) "USED_RATE(%)"
from sys.sm$ts_used u, sys.sm$ts_free f
where u.tablespace_name = f.tablespace_name
order by 5 desc;
查看SM$TS_USED视图的定义
select dbms_metadata.get_ddl('VIEW','SM$TS_USED','SYS') from dual;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/32939/viewspace-578378/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/32939/viewspace-578378/