forsms
10th June 2002, 14:40
how can I get ho much disk space (in GB/MB) being used by each of the company? we have informix/HP/Baan5?

Thanks in advance

Francesco
11th June 2002, 16:20
I am not familiar with Informix, but you will have to get the information at the database level.

Just add up the tablesizes of all tables ending in [comp nr]. Then don't forget the indexes.

benito
11th June 2002, 18:44
you might want to check with informix newsgroups.

In MS SQL7 i used the statement through Query Analyzer,

use baandb
select 'exec sp_spaceused ' + name from sysobjects where
name like '%500'


this will create another file of with listing of tables which can be run from from Query Analyzer again.

Caner.B
14th June 2002, 14:14
Hi

Below is a select which I use on informix DS FD1.
You can use it with your sql editor. On the result page
tabname ----> tables
nrows ----> number of rows
data ----> pages used by data (in Kb)
index ----> pages used by index (in Kb)
data_and_index ----> sum of data and index pages (in Kb)
disk ----> space used by table (in Kb)
nextns ----> number of extents

You will get the information by each table of your company number. After running the select just sum the disk column and you get the used disk space for your company.
write your own company number instead of 600 in the select and
for correct information use the select after update statistics.

select b.tabname,a.nrows,a.npdata*2 data,(a.npused - a.npdata)*2 index, a.npused*2 data_and_index ,a.nptotal*2 disk , a.nextns
from sysmaster:sysptnhdr a , systables b
where b.tabname like '%600'
and a.partnum= b.partnum

Caner