반응형
DB2 스키마별 용량 체크
SELECT TABSCHEMA
,ROUND(SUM(DATA_OBJECT_P_SIZE + INDEX_OBJECT_P_SITE + LONG_OBEJCT_P_SIZE + LOB_OBJECT_P_SIZE)/1024/1024,2) AS TOTAL_SIZE_GB
,ROUND(SUM(DATA_OBJECT_P_SIZE + LONG_OBJECT_P_SIZE + LOB_OBJECT_P_SIZE)/1024/1024,2) AS TABLE_SIZE_GB
,ROUND(SUM(INDEX_OBJECT_P_SIZE)/1024/1024,2) AS INDEX_SIZE_GB
FROM SYSIBMADM.ADMINTABINFO
WHERE TABSCHEMA NOT LIKE 'SYS%'
GROUP BY ROLLUP(TABSCHEMA)
ORDER BY 2
WITH UR;
반응형
'SQL > SQL Tech' 카테고리의 다른 글
DB2 Script - Table Column Info (0) | 2023.06.05 |
---|---|
DB2 Script - Table Info (0) | 2023.06.05 |
DB2 Scripts - Table Count By Schema (0) | 2023.06.05 |
[SQL] REGEXP_SUBSTR 구분자, 행, 열, 분리 (NULL 포함) (0) | 2022.10.23 |
values 절 (db2, postgresql) (0) | 2022.10.21 |