Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2011
    Posts
    5

    Unanswered: 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?

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Yes it would.

    Andy

  3. #3
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    No it would not. 425273446400 bytes is just a bit more than 396 GB.

  4. #4
    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?

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    1 GB is 2**30 bytes, isn't it?

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

  7. #7
    Join Date
    Mar 2011
    Posts
    5
    for that formula, does it matter if they are not all 4k pages?

  8. #8
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    The formula is for converting bytes to GB. Pages are something else entirely. The CALL GET_DBSIZE_INFO handles your tablespaces properly already.

    Andy

  9. #9
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    You may want to see Wikipedia.
    Giga- - Wikipedia, the free encyclopedia

    It said
    When referring to information units in computing, such as gigabit or gigabyte, giga may sometimes mean 1073741824 (2**30), ...

Posting Permissions

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