Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2008
    Posts
    131

    Unanswered: space allcaotion in db2

    Hi all,
    After the creation of blank database in db2, how we come to know the actual space used by that database?
    as i din't had any idea, i just took the backup of that blank database n checked the size in the properties of the backup file, which says its 20 MB...is this the right way to know?

  2. #2
    Join Date
    Feb 2007
    Posts
    31
    you can try this command to get the szie of the database

    select * from systools.stmg_dbsize_info
    Regards
    Mohan

  3. #3
    Join Date
    Jul 2008
    Posts
    131
    the following exception is thrown when i execute the command

    SQL0204N "SYSTOOLS.STMG_DBSIZE_INFO
    " is an undefined name.

  4. #4
    Join Date
    Mar 2008
    Posts
    136
    first connect to database....then run below procedure
    db2 "call get_dbsize_info(?,?,?,0)"
    Regards
    Pawan Kumar

  5. #5
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Which DB2 version on which platform?
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  6. #6
    Join Date
    Jul 2008
    Posts
    131
    m using DB2 v8.1 on windows XP.

    after executing the command:
    'db2 call get_dbsize_info(?,?,?,0)'
    it is throwing this error:
    SQL04404 no authorized routine named "GET_DBSIZE_INFO" of type "procedure" having compatible arguments was found.

    n after runnig this command:
    'select * from systools.stmg_dbsize_info'
    it is throwing this error:
    SQL0204N "systools.stmg_dbsize_info " is an undefined name.
    I can also not find any schema in my database with name systools.

  7. #7
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    That SP was introduced in approximately FP 9 of 8.1 (which is the same as 8.2.2). Fixpacks are free to download from the IBM site and the latest for vesion 8 is FP 16.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  8. #8
    Join Date
    May 2007
    Location
    somewhere in dbforums
    Posts
    221
    Well if you have control center then the total db size is displayed whenever you select any database....

  9. #9
    Join Date
    Jul 2008
    Posts
    8
    This will help U....check this
    db2 "select TABLESPACE_ID,CONTAINER_TYPE,TABLESPACE_NAME,TOTAL _PAGES,USABLE_PAGES,(TOTAL_PAGES-USABLE_PAGES) as FREEPAGES from table(SNAPSHOT_CONTAINER('SIDRKMG',-1)) as sample"

  10. #10
    Join Date
    Jul 2008
    Posts
    131
    hi marcus,

    thanks! i upgraded to v9 n now i can see the SP with name get_dbsize_info.

    nick,
    i din't found any db information when i select the database. just let me know where exactly i will find that info.

    DB2learner,
    din't understood the command u suggested to execute.

Posting Permissions

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