I don't know of any SQL that will do that but the following command will:
list tablespace containers for n show detail
where n is the tablespace number (TSID) for the tablespace you are
interested in viewing. From my RHEL4 UDB 8.1 FP9 system after connecting
to database SAMPLE:
[.....]$ db2 list tablespace containers for 2 show detail
Tablespace Containers for Tablespace 2
Container ID = 0
Name =
/home/db2inst1/db2inst1/NODE0000/SQL00001/SQLT0002.0
Type = Path
Total pages = 407
Useable pages = 407
Accessible = Yes
UDB 8.2 has a "Storage management tool" that will store snapshot data in
tables that are accessable with SQL. It can also "monitor" storage and
tack actions when user-defined threshholds have been reached. Check the
administration manuals for "Managing Storage".
Phil Sherman
kaming wrote:
Dear all,
I would like to ask is there any DB2 SQL statement that can be used to show
the overall database size?
(i.e. display the allocated/used data files or tablespaces (either SMS or
DMS) size??)
Thanks!
Henry