Two Database questions:
Posted in 2000
Topics: Storage & Space Management
I think I am getting low on diskspace. Using Informix 7.30.UC2 SCO UNIX 5.0.5 1) Is there a command to list the variuos tables and tell how much space each table is taking up within the database? 2) Is there a command to list the available CHUNKS currently on the system that can be added to the database?? Stacey Windsor x6071
Stacey Windsor wrote:
> I think I am getting low on diskspace.
> Using Informix 7.30.UC2
> SCO UNIX 5.0.5
>
> 1) Is there a command to list the variuos tables and tell how much space each table is taking up within the database?
oncheck -pe
-OR-
dbaccess sysmaster - <EOF
select dbsname, tabname, nptotal, npused, npdata
from systabnames t, sysptnhdr p
where t.partnum = p.partnum
and t.dbsname = "mydatabase";EOF
> 2) Is there a command to list the available CHUNKS currently on the system that can be added to the database??
If the chunks have not yet been added to the database server Informix will not know about them so you
will have to use OS facilities to determine this. The way I handle this is to have the sysadmin create any
device files intended for Informix use named 'ifmx???' where ??? is a zero filled device number (001,
002, etc.). He sets the permissions to 000 for me so I can easily distinguish devices I am using and
have therefore changed the permissions on to 660. When I need a new device to add a chunk I take
one of the perm-000 chunks, change it's permissions, run /etc/fuser against it as a final check that noone
is using it, create the symbolic link to the new chunk in my chunk-links directory (typically
~informix/disks) and add the chunk using onspaces or my aspace script (which checks its own database
of chunks to prevent cross linking a chunk between two instances on the same machine and then runs
onspaces).
Art S. Kagel