Results 1 to 2 of 2

Thread: Informix Script

  1. #1
    Join Date
    Sep 2010
    Posts
    1

    Unanswered: Informix Script

    Script broken after informix 11.5 upgrade. We recently let go our informix guy and I'm attempting to fix a broken script while in between database people. If anybody can see as to why this script doesn't work anymore I would be eternally greatful.

    Thanks

    Code:
    #!/bin/csh -f
    
    
    execute_sql sysmaster \
        select b.name\[1,20\], \
               sum\(chksize\) size, \
               round\(100 - \(\(sum\(nfree\) \/ sum\(chksize\)\) \* 100\)\) \
                      pct_used, \
               round\(\(sum\(nfree\) \/ sum\(chksize\)\) \* 100\) \pct_avail \
          from syschunks a, sysdbspaces b \
         where a.chknum \= b.dbsnum \
         group by 1 order by 1;

  2. #2
    Join Date
    Sep 2010
    Location
    Germany, Brunswick
    Posts
    55
    I dont know "execute_sql" but the statement is correct

    Code:
    echo '
    select b.name[1,20], 
           sum(chksize) size,
           round(100 - ((sum(nfree) / sum(chksize)) * 100)) 
                  pct_used,
           round((sum(nfree) / sum(chksize)) * 100) pct_avail
      from syschunks a, sysdbspaces b
     where a.chknum = b.dbsnum
     group by 1 order by 1;' | dbaccess sysmaster
    Can you give me an error code or something like this?

    (tested with 11.50.UC6DE)

Tags for this Thread

Posting Permissions

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