Re: Server scripts with decisions based on values from a select s tatement.
2002-08-06 09:15:41
Hello Wayne,
Yes, it is possible. I just wrote a script that does just that. Here is
is:
Name Line Command
Number
---------- ------
------------------------------------------------------------
CHECK_CAC- 10 select cache_hit_pct from db where cache_hit_pct
>98.5
HE_HIT
15 if (rc_ok) goto cache_hit_OK
20 issue message i 'Cache hit ratio TOO LOW! BUMP UP
BUFFPOOLSIZE!'
25 exit
30 Cache_hit_OK:
35 issue message i 'Cache Hit ratio is OK!'
Take care,
Al
Alan Davenport
Senior Storage Administrator
Selective Insurance
alan.davenport AT selectvie DOT com
(973) 948-1306
-----Original Message-----
From: Wayne Gorton [mailto:wayneg AT IBK.COM DOT AU]
Sent: Tuesday, August 06, 2002 3:52 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Server scripts with decisions based on values from a select
statement.
Howdy,
Is there a way to issue a select statement in a scripts and based on what is
returned perform a different action.
My idea is to issue the following select
"select CACHE_HIT_PCT from db" if the value is below 98.5 then issue message
i "DB cache hit rate too low. Bump up bufpoolsize"
If this is possible in a script there are a lot of other funky things I'd
like to do.
P.S. I have done it via a ksh and perl but would like to avoid it.
Share and Enjoy
Wayne Gorton
Innovative Business Knowledge (IBK) P/L
PH: +61 2 9614 1604
FAX: +61 3 9820 2840
MOB: +61 417 427 441
Email: waynneg AT ibk.com DOT au
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 24-Jul-02
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- Re: Server scripts with decisions based on values from a select s tatement.,
Alan Davenport <=
|
|
|