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 > get db2 disk space,unused space information?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-27-06, 02:52
welyngj welyngj is offline
Registered User
 
Join Date: Feb 2004
Posts: 15
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?
Reply With Quote
  #2 (permalink)  
Old 09-27-06, 03:12
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #3 (permalink)  
Old 09-27-06, 05:31
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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.
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