Database size in DB2

23 June,2011 by Tom Collins

How can I calculate the Database size in DB2?

Database size in DB2 - Find 3 methods I use to find the database size in DB2

METHOD 1 - GET_DBSIZE_INFO
============================
db2 connect to 
db2 "CALL GET_DBSIZE_INFO (?, ?, ?, -1)"

METHOD 2a (in MB) snapshot_tbs_cfg
===============================
db2 connect to 
db2 "select (sum(total_pages)* 4096)/(1024*1024) Tot_allocat_spceinMB from table(snapshot_tbs_cfg(' ',-1)) TBS_SPCE"

METHOD 2b (in GB)snapshot_tbs_cfg
==================================
db2 "select (SUM(total_pages)*4)/(1024.0*1024) TOTAL_ALLOCATED_SPACE_IN_GB from table (snapshot_tbs_cfg('',-1)) TBS_SPCE"
db2 connect reset

METHOD 3 systools.stmg_dbsize_info

================================
SELECT db_size, db_capacity FROM systools.stmg_dbsize_info;

 

Read More

DB2 table size shell script - DBA DB2

Database will come up with hidden buffer pools - DBA DB2

Database Tuning overview –Storage Tuning - DBA DB2

Author: Rambler(http://www.dba-db2.com)

Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on Database size in DB2

Comments are moderated, and will not appear until the author has approved them.


dba-db2.com | DB2 Performance Tuning | DBA DB2:Everything | FAQ | Contact | Copyright