Hi Group,
It's really confusing to calculate the size of the DB2 UDB database in
versions lesser than 8.2.
In Version 8.2 if we run the query db2 "call get_dbsize_info(?,?,?,0)"
it gives us an approximate size of the database.
But it we try calculating the file system sizes of the database home
directory, containers file system it gives some other size...
it's so confusing which database size is accurate. Do we have stick to
the size given by DB2 or size w.r.t the OS file systems.
Where as in versions say like 8.1 0r Version 7, the above procedure is
not working. So is there any other alternate method to calculate the
size of the database?
And for the group's information, I got a query which is also giving
the size of the database, this I got while searching for my query in
Google. the query is:
db2 connect to <dbname>
db2 "select (SUM(total_pages)*4)/(1024.0*1024)
TOTAL_ALLOCATED_SPACE_IN_GB from table
(snapshot_tbs_cfg('<dbname>',-1)) TBS_SPCE"
db2 connect reset.
Whether the above query is accurate in calculating the database size?
Also I got a few doubt reg above query? what does this mean
(SUM(total_pages)*4
think it works for tablespaces with default 4KB page size, what
happens if the tablespaces are with different page sizes say some
tablespaces in 4K and some tablespaces in 8/16/32K. So this case how
should we calculate the size of the above database using the above
query.
If there is any other method to calculate the database size, pls
kindly let me know. As the need is urgent, kindly let me know if you
know the solution for my problem.
Thanks in Advance.
vj_dba