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
Hi Guerry,
in Informix there is no limit in database size; however, there are limits
in dbspace-size (a database can be spread over several dbspaces). To
determine how full a dbspace is, you can issue the following SQL on the
sysmaster-database (Online 6.0 an higher):
SELECT name, sum(chksize) AS total, sum(nfree) AS free,
100 - 100*(sum(nfree)/sum(chksize)) AS full_pct
FROM sysdbspaces s, syschunks c
WHERE s.dbsnum = c.dbsnum
GROUP BY name
This SQL shows sizes of each dbspace (consisting of 1 or more chunks) in
pages (platform-dependent). If you don't want to use SQL, you could issue
onstat -d as well, giving the same (and more) information.
Hope this helps,
Peter