Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    18

    Unanswered: get db2 disk space,unused space information?

    In oracle,it can be realized by :
    SQL> select d.tablespace_name name, d.bytes/1024 sz, e.used_bytes/1024 used, ROU
    ND((e.used_bytes/d.bytes)*100,2) "%USED" from dba_data_files d, (select file_id,
    nvl(sum(bytes),0) used_bytes from dba_extents group by file_id) e where e.file_
    id (+) = d.file_id;
    Now i want to know how to realize in db2?

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    db2 connect to database-name

    db2 list tablespaces show detail
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    SNAPSHOT_TBS_CFG is a function you can use from SQL to get the same information



    SNAPSHOT_CONTAINER is a related function that you may want if you want to list the containers of a tablespace.


    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
  •