Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can I get the size of my UDB DB2 version 9.1 database? I tried firing getdbconfig from the command prompt. It gives all the configuration but not the size.

Thanks :)

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

There is a TechNote on IBM's support site:

How to calculate the size of a DB2 database

If you want to calculate the size and maximum capacity of your database, you can use the procedure GET_DBSIZE_INFO. This procedure first appeared in DB2 Universal Database™ (DB2 UDB) Version 8.2.

To execute this procedure you should follow these three steps:

  1. Connect to the database for which you want to know the size and maximum capacity.
  2. Execute the procedure GET_DBSIZE_INFO.
  3. Close the connection.

Here is the syntax of the procedure:

 db2 call GET_DBSIZE_INFO (?,?,?,refresh-window)

The first three parameters are output parameters, and the refresh-window is an input parameter of type INTEGER that specifies the number of minutes until the cached values for database size and capacity are to be refreshed.

Refer to this documentation link for examples of the output from this procedure in DB2 UDB Version 9.1.

share|improve this answer
    
Thanks a million. This worked for me! –  Rashmi Pandit Jun 1 '09 at 10:02
add comment

There's a script here which has been tested in 9.1 and, according to the author:

will calculate the size of a DB2 LUW database on a UNIX server using UNIX commands that will give you a more accurate measure of the space used by the database. This script also stores this information in an operational table that you may use as part of your DBA Monitoring Dash Board to help you monitor and manage space in relation to growth trends.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.