Enough space available?
Posted in 1999
Topics: Server Administration
I'm just a lowly developer, not a DBA with full admin access to our database. Before I attempt to load a 35mb file into a table (>200,000 rows) I would like to know if there is space available. How does one do this in Informix? - Randy Galbraith Spammers please note: UCE/Spam is not welcome at my inbox.
Randy Galbraith wrote:
>
> I'm just a lowly developer, not a DBA with full admin access to our
> database. Before I attempt to load a 35mb file into a table (>200,000
> rows) I would like to know if there is space available. How does one do
> this in Informix?
In addition to Obnoxio The Clown's reply you will need to know which
dbspace the table resides in. To do this execute:
SELECT tabname, TRUNC(partnum/1048575) dbspacenum
FROM systables
WHERE tabname = "mytable";
Then peruse the onstat/tbstat output and add up all the unsed space for
all of the chunks making up the dbspacenum reported. My dbsavail
script and/or executable will perform the latter calculations for you.
dbsavail is part of the package utils_ak I submitted to the IIUG
Software Repository.
Art S. Kagel