Results 1 to 9 of 9

Thread: database size

  1. #1
    Join Date
    Mar 2003
    Posts
    60

    Unanswered: database size

    Hi All,

    How to calculate the total database size?

    Thanks

  2. #2
    Join Date
    Sep 2002
    Posts
    456

    Re: database size

    This particular question has been answered many times on this forum so I will advise you to search the forum first.

    dollar

    Originally posted by jfkuser
    Hi All,

    How to calculate the total database size?

    Thanks

  3. #3
    Join Date
    Jan 2004
    Location
    Egypt
    Posts
    61

    Re: database size

    Originally posted by jfkuser
    Hi All,

    How to calculate the total database size?

    Thanks
    if u r using Unix / Linux system all u have to do is cd /home/db2inst1/db2inst1
    du -ks

    this will give you th total size of the DB (including tablespace, log files , etc...)
    hany heggy,
    IBM certified Professional, AIX system support
    www.melodyhits.tv

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: database size

    Originally posted by hanyheggy
    if u r using Unix / Linux system all u have to do is cd /home/db2inst1/db2inst1
    du -ks

    this will give you th total size of the DB (including tablespace, log files , etc...)
    ... unless your tablespace containers and NEWLOGPATH are located somewhere else...

  5. #5
    Join Date
    Jan 2004
    Location
    Egypt
    Posts
    61

    Re: database size

    Originally posted by n_i
    ... unless your tablespace containers and NEWLOGPATH are located somewhere else...

    i agree 100%
    hany heggy,
    IBM certified Professional, AIX system support
    www.melodyhits.tv

  6. #6
    Join Date
    Mar 2003
    Posts
    60
    Thanks for the insight. But I was looking for DB2 utility or command to monitor the database size on weekly basis.

    What if you have to calculate it from remote client.
    Also if the database is too large it can have multiple filesystems and would be difficult to manually calculate the size periodically.

    Thanks,
    j

  7. #7
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    You can write a script to parse 'list tablespaces show detail' command and calculate the tablespace sizes and usage ... (Expect a script at db2click.com in the near future)

    If you would like to add the log directory to this list, use db cfg to grep for you logpath and check the size ...

    Remember, for SMS the utilization is always 100%

    HTH

    Sathyaram

    Originally posted by jfkuser
    Thanks for the insight. But I was looking for DB2 utility or command to monitor the database size on weekly basis.

    What if you have to calculate it from remote client.
    Also if the database is too large it can have multiple filesystems and would be difficult to manually calculate the size periodically.

    Thanks,
    j
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  8. #8
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Originally posted by sathyaram_s

    Remember, for SMS the utilization is always 100%

    I'd say that for SMS tablespaces utilization should be measured from the OS point of view, e.g by parsing the output of "df -k <sms container path>"

  9. #9
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Check db2click.com now ...

    I have added three scripts, two of which will be useful to identify and record the size of the tablespaces from local or remote clients ...

    Cheers
    Sathyaram

    Originally posted by sathyaram_s
    You can write a script to parse 'list tablespaces show detail' command and calculate the tablespace sizes and usage ... (Expect a script at db2click.com in the near future)

    If you would like to add the log directory to this list, use db cfg to grep for you logpath and check the size ...

    Remember, for SMS the utilization is always 100%

    HTH

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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