oracle 数据库查询表空间
set linesize 200
col file_name for a50
select c.TABLESPACE_NAME,c.SEGMENT_SPACE_MANAGEMENT,d.sum_MB,d.free_MB,d.use_precent,c.EXTENT_MANAGEMENT from dba_tablespaces c,
(select b.tablespace_name,round(sum(b.bytes)/1024/1024,0) sum_MB, round(sum(nvl(a.bytes,0))/1024/1024,0) free_MB,
round((sum(b.bytes)-sum(nvl(a.bytes,0)))/sum(b.bytes),4)*100 use_precent
from (select tablespace_name,file_id,sum(bytes) bytes from dba_free_space group by tablespace_name,file_id ) a,
dba_data_files b
where a.file_id(+)=b.file_id and a.tablespace_name(+)=b.tablespace_name
group by b.tablespace_name
order by use_precent) d
where c.TABLESPACE_NAME=d.TABLESPACE_NAME
order by 5 desc;
相关推荐
FightFourEggs 2020-08-16
zhangchaoming 2020-05-17
zhangchaoming 2020-01-04
Hody 2014-05-13
bfcady 2020-08-16
Hody 2020-08-16
流云追风 2020-07-04
dataminer 2020-06-25
lidongliang 2020-08-16
warden00 2020-06-11
zhangchaoming 2020-06-04
FightFourEggs 2020-06-02
FightFourEggs 2020-05-28
elitechen 2020-05-21
流云追风 2020-05-14
bianxq 2020-04-27
oraclemch 2020-04-19
oraclemch 2020-04-10
oraclemch 2020-02-21
FightFourEggs 2020-02-12
Streamoutput 2020-02-09
talkingDB 2020-02-03
LuoXinLoves 2020-02-02
Streamoutput 2020-01-21