How To
Summary
Customer/consultant would like to find out how large each of their Controller database tables (for example 'xdb18') are.
How can they do this?
Environment
The script (inside this Technote) has been tested on DB2 10.5.
- TIP: For similar instructions when using Microsoft SQL, see separate IBM Technote #1345780.
Steps
Run the following DB2 script on your database:
SELECT SUBSTR(TABSCHEMA,1,18) TABSCHEMA,SUBSTR(TABNAME,1,30) TABNAME,(DATA_OBJECT_P_SIZE + INDEX_OBJECT_P_SIZE + LONG_OBJECT_P_SIZE + LOB_OBJECT_P_SIZE + XML_OBJECT_P_SIZE) AS TOTAL_SIZE_IN_KB,(DATA_OBJECT_P_SIZE + INDEX_OBJECT_P_SIZE + LONG_OBJECT_P_SIZE + LOB_OBJECT_P_SIZE + XML_OBJECT_P_SIZE)/1024 AS TOTAL_SIZE_IN_MB, (DATA_OBJECT_P_SIZE + INDEX_OBJECT_P_SIZE + LONG_OBJECT_P_SIZE + LOB_OBJECT_P_SIZE + XML_OBJECT_P_SIZE) / (1024*1024) AS TOTAL_SIZE_IN_GB FROM SYSIBMADM.ADMINTABINFO WHERE TABSCHEMA NOT LIKE 'SYS%';
This provides:
- Schema name
- Table name
- Total size (kb)
- Total size (Mb)
- Total size (Gb)
For example:
Related Information
Was this topic helpful?
Document Information
Modified date:
13 December 2018
UID
ibm10788433