Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005
    Posts
    11

    Unanswered: 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..

  2. #2
    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

  3. #3
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •