Know if OnLine is Running

Occasionally, the DBA needs to be reassured that the database has not aborted and is still running. This need for reassurance often occurs after the DBA mistakenly kills a sqlturbo backend or does something else stupid.

The DBA wants a quick check to see if he needs to start making excuses about why he crashed the database.

This information is also useful in writing scripts and programs that execute across the network on multiple machines. There are many reasons that a script would benefit by being aware whether or not OnLine was running on machine B.

I find the ok script handy in cases like this:

INFORMIX 23> cat ok
#!/bin/csh
if ( ' $INFORMIXDIR/bin/tbstat – | grep RSAM |awk '{print $5}' ' == On-Line ) then
echo "   .....'saaaaaaawwwwwwright......"
else
echo "Mucked Again"
endif

Feel free to change the echo statements to give you any cute and/or nasty comments that you wish to display. Run the script with no parameters.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.233.58