Oacle 체크 표 공간 크기, 남 은 공간, 표 점용 공간

2908 단어 Oacle
--oracle            
select f.tablespace_name tablespace_name, round((d.sumbytes / 1024 / 1024)) total_m, round((d.sumbytes - f.sumbytes) / 1024 / 1024) used_m, round(f.sumbytes / 1024 / 1024, 2) free_m, round((d.sumbytes - f.sumbytes) * 100 / d.sumbytes, 2) || '%' used_percent, round((f.sumbytes) * 100 / d.sumbytes, 2) || '%' free_percent from (select tablespace_name, sum(bytes) sumbytes from dba_free_space group by tablespace_name) f, (select tablespace_name, sum(bytes) sumbytes from dba_data_files group by tablespace_name) d where f.tablespace_name = d.tablespace_name(+) order by (d.sumbytes - f.sumbytes) * 100 / d.sumbytes desc;

----       

Select Segment_Name,Sum(bytes)/1024/1024 From User_Extents Group By Segment_Name ;

 select OWNER, t.segment_name, t.segment_type, sum(t.bytes / 1024 / 1024) mmm from dba_segments t where t.owner = 'IUBA_DATA' and t.segment_type='TABLE' group by OWNER, t.segment_name, t.segment_type order by mmm desc;

좋은 웹페이지 즐겨찾기