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 > deciphering output from CALL GET_DBSIZE_INFO(?, ?, ?, 0)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-31-11, 12:20
dbforumsid dbforumsid is offline
Registered User
 
Join Date: Mar 2011
Posts: 5
deciphering output from CALL GET_DBSIZE_INFO(?, ?, ?, 0)

I am running DB2 on Windows version 9.5

Ran this command to get the size of my Database
CALL GET_DBSIZE_INFO(?, ?, ?, 0)

here is the output:

Value of output parameters
--------------------------
Parameter Name : SNAPSHOTTIMESTAMP
Parameter Value : 2011-03-31-12.09.56.967000

Parameter Name : DATABASESIZE
Parameter Value : 425273446400

Parameter Name : DATABASECAPACITY
Parameter Value : 692038145536

Return Status = 0


might sound like a stupid question... but does this put my database at
425GB?
Reply With Quote
  #2 (permalink)  
Old 03-31-11, 12:55
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Yes it would.

Andy
Reply With Quote
  #3 (permalink)  
Old 03-31-11, 13:23
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
No it would not. 425273446400 bytes is just a bit more than 396 GB.
Reply With Quote
  #4 (permalink)  
Old 03-31-11, 14:07
dbforumsid dbforumsid is offline
Registered User
 
Join Date: Mar 2011
Posts: 5
now I'm really confused. I would have thought that it was 425GB .. how did you come up with 396?
Reply With Quote
  #5 (permalink)  
Old 03-31-11, 14:28
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
1 GB is 2**30 bytes, isn't it?
Reply With Quote
  #6 (permalink)  
Old 03-31-11, 14:35
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
To go from bytes to GB you use this formula (I was too lazy to do it at first):

(((425273446400/1024) = KB ) / 1024 = MB) / 1024 = GB which is 396.066

Andy
Reply With Quote
  #7 (permalink)  
Old 03-31-11, 15:25
dbforumsid dbforumsid is offline
Registered User
 
Join Date: Mar 2011
Posts: 5
for that formula, does it matter if they are not all 4k pages?
Reply With Quote
  #8 (permalink)  
Old 03-31-11, 16:25
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
The formula is for converting bytes to GB. Pages are something else entirely. The CALL GET_DBSIZE_INFO handles your tablespaces properly already.

Andy
Reply With Quote
  #9 (permalink)  
Old 03-31-11, 16:32
tonkuma tonkuma is online now
Registered User
 
Join Date: Feb 2008
Location: Japan
Posts: 2,195
You may want to see Wikipedia.
Giga- - Wikipedia, the free encyclopedia

It said
Quote:
When referring to information units in computing, such as gigabit or gigabyte, giga may sometimes mean 1073741824 (2**30), ...
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