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;
DB2 table size shell script - DBA DB2
This is only a preview. Your comment has not yet been posted.
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.
Posted by: |