If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > check dbspace in informix

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-06-06, 14:07
dbatlanta dbatlanta is offline
Registered User
 
Join Date: Dec 2005
Posts: 11
check dbspace in informix

We are going to build a new datamart and we need to check how much dbspace we have right now...and see the available dbspace..how do we do this in Informix? Is there a syntax for this in Informix..Thank you..
Reply With Quote
  #2 (permalink)  
Old 01-06-06, 15:27
artemka artemka is offline
Registered User
 
Join Date: May 2004
Location: New York
Posts: 248
to check your dbspace's run onstat -d
to check how much free raw space you have left is different for every operating system

Cheers
Reply With Quote
  #3 (permalink)  
Old 01-09-06, 06:09
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Hi,

Please check with this script.
#!/usr/bin/ksh
[ `uname -a|grep -c 'AIX'` -eq 1 ] && bk=256 || bk=512
raya="--------------------------------------------------------------------------
--"
echo "Used Space for On-Line `echo $INFORMIXSERVER` al `date +%d/%m/%Y-%H:
%M`"
echo $raya
{
dbaccess sysmaster <<!
select dbsnum,
(
select name[1,18]
from sysdbspaces
where syschunks.dbsnum=sysdbspaces.dbsnum
) dbspace,
trunc((sum(chksize))/$bk,0) total,
trunc(((sum(chksize)-sum(nfree)))/$bk,0) Used,
trunc(sum(nfree)/$bk,0) Free
from syschunks
group by 1,2
order by 1
!
} 2>/dev/null | sed '/^$/d'|pg -p "(%d) <Enter>=Continue- <q>uit:"
echo $raya

Gustavo.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On