Personal tools
You are here: Home DB2 How To's How to discover the size of a database
Navigation
Log in


Forgot your password?
 
Document Actions

How to discover the size of a database

Steps you should perform if you need to obtain the size of a database

To obtain the total size of a database, you can do it using two different ways. The first one is perform this command in a command line:

db2 connect to <DBNAME>

db2 "call get_dbsize_info(?,?,?,0)"

 
The output should be something like that:

Value of output parameters

  --------------------------

  Parameter Name  : SNAPSHOTTIMESTAMP
Parameter Value : 2008-03-17-07.23.26.423000

  Parameter Name  : DATABASESIZE
Parameter Value : 20856832

  Parameter Name  : DATABASECAPACITY
Parameter Value : 82151934464

  Return Status = 0

In case of this command won't return what you expect, you can use two other ways:

Connect to the DB you want to check, then you can check the size of a full uncompressed backup image created recently, and the actual database size will be near that.


Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls