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 > How can I get the total/used database disk size?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-15-07, 15:46
Shyckymn Shyckymn is offline
Registered User
 
Join Date: Mar 2007
Posts: 11
How can I get the total/used database disk size?

I've tried CALL GET_DBSIZE_INFO(?, ?, ?, -1) without success.

Any tips?

Best regards.
Reply With Quote
  #2 (permalink)  
Old 03-15-07, 16:52
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
You need to be at the proper fixpack level. You may need 8.1 FP9 or higher is needed (but not sure). It definitely works on 8.1 FP10. Make sure you connect to a database before issuing the call.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 03-16-07, 02:14
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,

I have executed command on test computer on db2 v8 fp9 and I got bellow result:

Code:
 Value of output parameters
 --------------------------
 Parameter Name  : SNAPSHOTTIMESTAMP
 Parameter Value : 2007-03-16-07.12.30.446061

 Parameter Name  : DATABASESIZE
 Parameter Value : 1769635840

 Parameter Name  : DATABASECAPACITY
 Parameter Value : 6297561600

 Return Status = 0
What is the difference between DATABASESIZE and DATABASECAPACITY?

Thanks,
Grofaty
Reply With Quote
  #4 (permalink)  
Old 03-16-07, 02:24
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,
I have found info about GET_DBSIZE_INFO.

DATABASESIZE = current database size
DATABASECAPACITY = maximum possible size ob database (dependent to disk space).

This is useful command. I needed this info multiple times and alway it was debate how to calculate database size. Now I have benchmark value.

Thanks,
Grofaty
Reply With Quote
  #5 (permalink)  
Old 03-16-07, 05:17
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
8.2.7 on windows

U can see it in Control Center
Just connect to a DB and in the object details pane U can see the size and capacity of DB.
check if ur version supports that
__________________
Rahul Singh
Certified DB2 9 DBA / Application Developer
Reply With Quote
  #6 (permalink)  
Old 03-16-07, 08:09
Shyckymn Shyckymn is offline
Registered User
 
Join Date: Mar 2007
Posts: 11
Unhappy There's a problem...

Mv DB2 version is 7.2.8.
How can I get the information?
I don't have the SYSTOOLS.STMG_DBSIZE_INFO table.
By the way, there's no any table for the SYSTOOLS schema...
Reply With Quote
  #7 (permalink)  
Old 03-16-07, 09:25
Wim Wim is offline
Registered User
 
Join Date: Nov 2004
Posts: 1,279
Does this also include BLOB's ?
__________________
With kind regards . . . . . SQL Server 2000/2005/2008/2008 R2 Earned beers: 16
Wim
Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald Knuth
Grabel's Law: 2 is not equal to 3 -- not even for very large values of 2.
Pat Phelan's Law: 2 very definitely CAN equal 3 -- in at least two programming languages
Reply With Quote
  #8 (permalink)  
Old 03-16-07, 16:31
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Version 7 is out of service for more than a year already. You may want to move to V8 or better yet V9.

What are you referring to with the "SYSTOOLS" schema?
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #9 (permalink)  
Old 03-20-07, 09:19
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Quote:
Originally Posted by Shyckymn
Mv DB2 version is 7.2.8.
How can I get the information?
Hi,
I don't see any option beside calculating in by yourself. If you follow my link few posts above, you can do manually what store procedure GET_DBSIZE_INFO does.

Hope this helps,
Grofaty
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