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 > Informix Script

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-15-10, 11:25
cedan cedan is offline
Registered User
 
Join Date: Sep 2010
Posts: 1
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;
Reply With Quote
  #2 (permalink)  
Old 09-22-10, 12:55
InformixWilli InformixWilli is offline
Registered User
 
Join Date: Sep 2010
Location: Germany, Brunswick
Posts: 52
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)
Reply With Quote
Reply

Tags
11.5, informix, script

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