If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Query to find database size

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-25-08, 05:32
jayshah7 jayshah7 is offline
Registered User
 
Join Date: Feb 2008
Posts: 35
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 ????
Reply With Quote
  #2 (permalink)  
Old 08-25-08, 05:59
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
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
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #3 (permalink)  
Old 08-25-08, 07:08
nittal nittal is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 08-29-08, 08:07
sandymbm sandymbm is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On