DBA常用sql语句-查询表空间大小语句

    技术2022-05-11  141

    查询表空间大小语句  select a.file_id   文件号,         a.tablespace_name  表名,         b.bytes            表大小,         (b.bytes-sum(nvl(a.bytes,0)))  剩余大小,         sum(nvl(a.bytes,0))            使用大小,         sum(nvl(a.bytes,0))/b.bytes*100   剩余百分比  from  dba_free_space a,dba_data_files b  where a.file_id=b.file_id  group by a.tablespace_name,a.file_id,b.bytes  order by a.file_id

    最新回复(0)