Guerry A. Semones wrote:
>
> I am looking for the SQL statement that would tell
> me how full an Informix database is (that is, approaching
> capacity).
>
> I know how to do this in Oracle, but, of course, that
> does not translate.
>
> Much thanks in advance.
>
> Guerry
> gsemones@mo.net
You didn't mention which version of Informix you're using but
the following query should work assuming you have Online 6.0
or higher.
SELECT sp.name dbspace,
sum (chk.nfree) * 2 free_kbytes,
sum (chk.chksize) * 2 total_kbytes
FROM sysmaster:sysdbspaces sp,
sysmaster:syschunks chk
WHERE chk.dbsnum = sp.dbsnum
GROUP BY 1;
It'll give the amount of free Kbytes per db/blob space.
Of course, you could use "onstat -d" but that's not
an SQL statement.
Guy