Kingsto88
12th December 2006, 03:51
Hi experts,
Could someone give me the simple command to find out the free space in each dbspace. Example I would like to find out how much free space in rootdbs and datdbs?? I am using Informix and I tried onstat -d but do not know how to calculate the free space of rootdbs and datdbs.
Thanks and regards,
victor_cleto
12th December 2006, 13:18
The web is full of information, have a look at this link: http://www-128.ibm.com/developerworks/db2/zones/informix/library/techarticle/0303fan/0303fan.html
(look under section Dbspace usage)
triton45
12th December 2006, 19:31
database sysmaster;
select
c.dbsnum,
d.name,
sum(chksize) size,
sum(nfree) pages,
round((sum(chksize) - sum(nfree)) / 512,2) MB_used,
round(sum(nfree) / 512,2) MB_free,
round((sum(c.nfree) / sum(c.chksize) * 100),2) percent_free
from syschunks c, sysdbspaces d
where c.dbsnum = d.dbsnum
group by 1,2
order by 1;
Andy
Kingsto88
13th December 2006, 04:10
Hi experts,
Thanks for the help.
But can someone tell me where to go to enter these select sql statements.
I am more used to mssql, i go to query analyser in microsoft, but for informix, where do i go?
Thanks and regards,
Neal Matthews
13th December 2006, 14:30
Change to informix user and run dbaccess.
Select option query language. Then select database sysmaster. Then select New to input SQL on this database. Then run statement.
Cheers
Neal
Kingsto88
18th December 2006, 02:30
Thanks neal,
I tried it and can run the query. But before i run and i trying saving the query, i get this message 'cannot open file for save'. How do i solve this?
thanks and regards,
Neal Matthews
18th December 2006, 16:03
Hello,
Any chance of a screen dump.
Cheers
Neal
triton45
18th December 2006, 16:07
Sounds like you do not have write permissions to the directory or there is already a file by that name and you do not have permissions to overwrite the file.
Change to a directory you know you have permissions on and then try to save the file.
Andy
shiv_softengg
19th December 2006, 11:38
Dear if you really wanna know the space then why do u not run ...
onstat -d command
or distribution of tables on chunks run ...oncheck -pe