Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008
    Posts
    40

    Unanswered: Query to find database size

    I am using DB2 (EE) 9.1 over RHEL 4.0. I would like to know the size of my database. Can anyone tell me the query to fire against catalog tables which will display complete database size, logs size, tablespace size ????

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    have a look at this page
    http://publib.boulder.ibm.com/infoce...c/r0023485.htm
    there are table functiuons that display db ts size info
    the log can be retrieved from the db cfg setting also as query/table function
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Jul 2008
    Posts
    131
    in version 9, we have a stored procedure named getdbsize\get_dbsize.....something of this kind, dont know the exact name for thr SP. i doubt if this SP is there in v8.
    u can call this SP to find the db size

  4. #4
    Join Date
    Aug 2008
    Posts
    2

    Smile find below 2 queries to find db size

    1) db2 "select (SUM(total_pages)*4)/1024.0/1024 TOTAL_ALLOCATED_SPACE_IN_GB from table (snapshot_tbs_cfg('dbname',-1)) TBS_SPCE"


    2) db2 'call get_dbsize_info(?,?,?,1)'

    Cheers
    Sandy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •