[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2341
  • Last Modified:

How to quickly get the size of a DB2 database

Db2 database size.

I am new to DB2.  I am running db2 7.0 on Windows.  How can I quickly view the size of a database.  I tried the get database size command (CALL  GET_DBSIZE_INFO(?, ?, ?, 0)
and got a call command failed.  In fact, I don't even know what the ? are supposed to be in the statement.  Can anyone help please?  In fact, in SQL Server, all I have to do is run a sp_helpdb and/or right click on the db and I can see its size.  What about db2?  Thanks for your help.

1 Solution
the call command is calling a stored procedure, if you do not know what parameters you are supposed to pass to the stored procedure, then you have to read the code that the stored procedure is implementing. This code can be seen by qyerying the syscat.procedure table.
Another way is is to use the list tablespace containers show detail command or
list tablespaces show detail
look at 'total pages' for each tablespace, then multiply x page size for each tablespace, add up result=db size

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now