The Script. to Query the Status of Tablespace:
--------------------------------------------------------------
select d.tp_name "tbs_name",e.contents "type",e.status "status", e.extent_management "seg_m",
b.bytes "size(M)", b.bytes-d.bytes "used(M)", d.bytes "free(M)", round((b.bytes-d.bytes)*100/b.bytes,2) "used_per"
from (select c.tablespace_name tp_name,round(sum(c.bytes)/1024/1024,2) bytes
from dba_free_space c
group by c.tablespace_name) d,
(select a.tablespace_name tp_name,round(sum(a.bytes)/1024/1024) bytes
from dba_data_files a
group by a.tablespace_name) b,
(select tablespace_name tp_name,contents,status,extent_management
from dba_tablespaces ) e
where d.tp_name=b.tp_name and d.tp_name=e.tp_name
order by 1;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12361284/viewspace-312613/
,如需转载,请注明出处,否则将追究法律责任。