How to get the DB2 database free space?

22 July,2014 by Tom Collins

Question: Where can I find information for the DB2 database free space with automatic storage in use   ?

Answer:  You can view various DB2 database status information via the GET SNAPSHOT command. For database free space follow these steps

Step 1)      Logon with db2<sid> user.


Step 2)  Connect to the database

          db2 connect to <dbsid> 

Step 3) Execute this command to get the DB snapshot

        db2 get snapshot for database on <dbsid> > /tmp/db_snapshot.txt


In the output file, you will find entries like below:


Number of automatic storage paths          =   

Automatic storage path                           =   

      Node number                                    =  

      State                                                = 

      File system ID                                   = 

      Storage path free space (bytes)          = 

      File system used space (bytes)          = 

      File system total space (bytes)           =

Read More on DB2 database status

DB2 manager status and get snapshot for dbm

SQL0286N A default table space could not be found - DBA DB2

How to check for DB2 Direct IO and FILE SYSTEM CACHING - DBA ...

DB2 Database objects overviews - DBA DB2

Author: Rambler(


Verify your Comment

Previewing your Comment

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

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.


Post a comment on How to get the DB2 database free space?

Comments are moderated, and will not appear until the author has approved them. | DB2 Performance Tuning | DBA DB2:Everything | FAQ | Contact | Copyright