728x90
티베로에서 테이블 스페이스 사용량 조회하기 위한 Query
select DAY,
tablespace TABLESPACE_NAME,
status,
total_mb "Total (MB)",
used_mb "Used (MB)",
free_mb "Free (MB)",
usage "Usage (%)",
'['||rpad(nvl(lpad('*', usage/5, '*'), '-'), 20, '-')||']' "Graph",
stat "ENOUGH?",
SEGMENT_SPACE_MANAGEMENT "ASSM?",
AUTOEXTENS_CNT_FILE "AUTOEXTCNT",
FILE_CNT
from (select to_char(sysdate,'yyyy/mm/dd') DAY,
total.ts tablespace,
dbat.status status,
round(total.mb) total_mb,
round(total.mb - nvl(free.mb, 0)) used_mb,
round(nvl(free.mb, 0)) free_mb,
round((total.mb - nvl( free.mb, 0)) / total.mb * 100,2) usage,
case
when (total.mb - nvl( free.mb, 0)) / total.mb * 100 >= 85 and nvl( free.mb, 0) <= 1000 then 'Not Enough'
else 'Enough'
end stat,
dbat.SEGMENT_SPACE_MANAGEMENT,
total.AUTOEXTENS_CNT_FILE,
total.FILE_CNT
from (select tablespace_name ts,sum(decode(AUTOEXTENSIBLE, 'YES', 1, 0)) AUTOEXTENS_CNT_FILE,
count(1) FILE_CNT,
sum(bytes)/1024/1024 mb
from dba_data_files
group by tablespace_name) total,
(select tablespace_name ts,
sum(bytes)/1024/1024 mb
from dba_free_space
group by tablespace_name) free,
dba_tablespaces dbat
where total.ts=free.ts(+)
and total.ts=dbat.tablespace_name
)
where 1=1
order by "Usage (%)" desc;
✔ 조회 결과
728x90
'데이터베이스(DB) > Tibero' 카테고리의 다른 글
Tibero 실행중인 세션 확인 (1) | 2025.01.13 |
---|---|
Tibero JOB 생성 및 관리 (0) | 2025.01.07 |
Tibero 오류 (jeus could not open jdbc connection for transaction) (0) | 2023.04.03 |
Tibero Tablespace 관리. (0) | 2023.03.31 |
TIBERO오류 TBR-8033: Specified schema object was not found. (0) | 2023.03.31 |