Oracle table 용량 확인
select owner,
segment_name,
segment_type,
sum(bytes) / 1024 / 1024 as mb
from dba_segments
where segment_type = 'TABLE'
and owner = 'SCOTT'
and segment_name = 'ENP'
group by owner,
segment_name,
segment_type
order by 1,
2
Oracle tablespace 용량 확인
select tablespace_name,
round(sum(a.total) / 1024 / 1024, 1) as total_mb,
round(sum(a.total) / 1024 / 1024, 1) - round(sum(a.sum1) / 1024 / 1024, 1) as used_mb,
round(sum(a.sum1) / 1024 / 1024, 1) as free_mb,
round((round(sum(a.total) / 1024 / 1024, 1) - round(sum(a.sum1) / 1024 / 1024, 1)) / round(sum(a.total) / 1024 / 1024, 1) * 100, 2) as used_rate
from (select tablespace_name,
0 as total,
sum(bytes) as sum1,
count(bytes) as cnt
from dba_free_space
group by tablespace_name
union all
select tablespace_name,
sum(bytes) as total,
0 as sum1,
0 as cnt
from dba_data_files
group by tablespace_name) a
group by tablespace_name
order by 1
'Oracle(DB관련)' 카테고리의 다른 글
FTP From PL/SQL (0) | 2021.07.14 |
---|---|
oracle 독립 트랜잭션 pragma autonomous_transaction (0) | 2021.04.13 |
MSSQL to ORACLE DB LINK (0) | 2021.03.19 |
oracle pl/sql ftp (0) | 2020.11.25 |
Oralce DDL on Remote Database With Database Link (0) | 2020.09.23 |