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 > db size and db capacity from get_dbsize_info proc

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-12-09, 14:55
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
db size and db capacity from get_dbsize_info proc

I ran get_dbsize_info proc. Why db size is bigger than db capacity?

db2 "call get_dbsize_info(?,?,?,0)"

Value of output parameters
--------------------------
Parameter Name : SNAPSHOTTIMESTAMP
Parameter Value : 2009-03-12-14.46.47.710674

Parameter Name : DATABASESIZE
Parameter Value : 845115392

Parameter Name : DATABASECAPACITY
Parameter Value : 33538042

Return Status = 0

Thanks
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
  #2 (permalink)  
Old 03-13-09, 05:38
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,
I have tried above command on DB2 v9.5 fp2a and it works fine.
It looks like bug in your sample. What is your version of DB2 and fixpack level? Try installing fixpack or report PMR to IBM support.
Regards
Reply With Quote
  #3 (permalink)  
Old 03-13-09, 09:10
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
Quote:
Originally Posted by grofaty
Hi,
I have tried above command on DB2 v9.5 fp2a and it works fine.
It looks like bug in your sample. What is your version of DB2 and fixpack level? Try installing fixpack or report PMR to IBM support.
Regards
The example above was from "DB2 v9.5.0.3", "s08121", "U823474", and Fix Pack "3a" (just installed recently). Now I tried it on "DB2 v8.1.1.144", "s080111", "U811269", and FixPak "16" and got more sensible result:

devdb2[/home/dba1]db2 "call get_dbsize_info(?,?,?,0)"
Value of output parameters
--------------------------
Parameter Name : SNAPSHOTTIMESTAMP
Parameter Value : 2009-03-13-08.38.48.864774
Parameter Name : DATABASESIZE
Parameter Value : 6016061440
Parameter Name : DATABASECAPACITY
Parameter Value : 95634335232
Return Status = 0


Do you really think there is a bug in our DB2 v9 and we need to report it? Thanks
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
  #4 (permalink)  
Old 03-13-09, 09:22
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
I'm getting a similar output (DATABASESIZE > DATABASECAPACITY) with v9.5 fp2. I think it has to do with the fact what most of my default tablespaces are SMS. I created the db with the "automatic storage no" option and therefore most of them are SMS.

From the v9.5 manual:

dbsize
An output parameter of type BIGINT that returns the size of the database (in bytes). The database size is calculated as follows: dbsize = sum (used_pages * page_size) for each table space (SMS & DMS).

dbcapacity
An output parameter of type BIGINT that returns the database capacity (in bytes). This value is not available on partitioned database systems. The database capacity is calculated as follows: dbcapacity = SUM (DMS usable_pages * page size) + SUM (SMS container size + file system free size per container). If multiple SMS containers are defined on the same file system, the file system free size is included only once in the calculation of capacity.


Check what type of tablespaces this db has and how much free space the filesystem(s) have. I think the number is wrong in my case.
Reply With Quote
  #5 (permalink)  
Old 03-13-09, 09:26
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
I even get -7 for one of the databases on v9.5:

devdb2[/home/dba1]db2 "call get_dbsize_info(?,?,?,0)"

Value of output parameters
--------------------------
Parameter Name : SNAPSHOTTIMESTAMP
Parameter Value : 2009-03-13-09.19.09.320917
Parameter Name : DATABASESIZE
Parameter Value : 636674048
Parameter Name : DATABASECAPACITY
Parameter Value : -7
Return Status = 0
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
  #6 (permalink)  
Old 03-14-09, 08:47
oracle10gsingh oracle10gsingh is offline
Registered User
 
Join Date: Nov 2007
Posts: 72
i think you consider this option of doing runstats and then running this stored procedure ..
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