the following query is complementary to the prevoius one
select name dbspace, sum(chksize)*2/1024/1024 allocated,
sum(nfree)*2/1024/1024 free,
100 - (round (sum(chksize*2) - sum(nfree*2)) /sum(chksize*2) *100) pcfree
from sysdbspaces d, syschunks c
where d.dbsnum = c.dbsnum
group by name
order by name
select
DBINFO('DBSPACE', systabnames.partnum) ,
sum(round((ti_nptotal * ti_pagesize )) / 1024/ 1024) ,
sum(round((ti_npused * ti_pagesize )) / 1024/ 1024)
-- version >=10 (new field)
from sysmaster:systabinfo, sysmaster:systabnames
where partnum = ti_partnum
and tabname not matches "TBL*" -- util para tablespace tablespace
and DBINFO('DBSPACE', systabnames.partnum) in ('dbspace')
group by 1
No comments:
Post a Comment