How to quickly get the size of a DB2 database

Posted on 2004-11-08
Last Modified: 2011-10-03
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.

Question by:mbatuchic
    1 Comment
    LVL 13

    Accepted 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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
    Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now