oracle如何查看用户的表空间大小?
2个回答
展开全部
select t.tablespace_name,
round(t.bytes / 1024 / 1024 / 1024, 2) || 'G' "总大小",
round((t.bytes - f.bytes) / 1024 / 1024 / 1024, 2) || 'G' "已使用",
round(100 * (t.bytes - f.bytes) / t.bytes, 2) || '%' "使用率"
from (select tablespace_name, sum(bytes) bytes
from dba_data_files
group by tablespace_name) t,
(select tablespace_name, sum(bytes) bytes
from dba_free_space
group by tablespace_name) f
where f.tablespace_name(+) = t.tablespace_name
round(t.bytes / 1024 / 1024 / 1024, 2) || 'G' "总大小",
round((t.bytes - f.bytes) / 1024 / 1024 / 1024, 2) || 'G' "已使用",
round(100 * (t.bytes - f.bytes) / t.bytes, 2) || '%' "使用率"
from (select tablespace_name, sum(bytes) bytes
from dba_data_files
group by tablespace_name) t,
(select tablespace_name, sum(bytes) bytes
from dba_free_space
group by tablespace_name) f
where f.tablespace_name(+) = t.tablespace_name
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询