informix:dbspace size

Note: The below query lists all the available dbspaces and their storage allocated/free in MB. This query is tested on IDS 12.1

database sysmaster;
select name dbspace, sum(chksize) allocated, sum(nfree) free,
round(((sum(chksize) – sum(nfree))/sum(chksize))*100) pcused ,
sum(chksize) *2/1024 MB_Allocated,
sum(nfree)*2/1024 MB_Free,
round (((sum(chksize) – sum(nfree))/sum(chksize))*100 ,2) per_used
from sysdbspaces d, syschunks c
where d.dbsnum = c.dbsnum
group by name
order by pcused desc

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: