Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Unix script to check database status

Re: Unix script to check database status

From: Dias Costa <dcosta_at_lnec.pt>
Date: Wed, 10 Mar 2004 10:34:39 +0000
Message-ID: <404EEF3F.1020604@lnec.pt>


Hi,

I have a pair of scripts who show me some information about the status of my instances.

#1 script ( named activ_DB)

clear

echo  'Data Base list  (Active Instances)'
echo  '---------------------------------------------'
echo  '---------------------------------------------'
echo  ' '

test_BD | egrep -e 'MINW|MINJ|LNEC'

echo  ' '
echo  ' '
echo  ' '
echo  ' '
echo  ' '


#echo ' ' + test_BD | egrep -e 'MINW|MINJ|LNEC'
--------------- cut here ---------------------

#2 script (named test_BD)

--------------- cut here ---------------------

#!/bin/ksh

export ORACLE_SID=MINW
export ORACLE_HOME=/oracle
export PATH=$ORACLE_HOME/bin:$PATH

svrmgrl <<EOF
connect internal
select name, log_mode, open_mode from v_\$database; exit

EOF
#3
#

#!/bin/ksh

export ORACLE_SID=MINJ
export ORACLE_HOME=/oracle
export PATH=$ORACLE_HOME/bin:$PATH

svrmgrl <<EOF
connect internal
select name, log_mode, open_mode from v_\$database; exit

EOF
#
#
#!/bin/ksh

export ORACLE_SID=LNEC
export ORACLE_HOME=/oracle
export PATH=$ORACLE_HOME/bin:$PATH

svrmgrl <<EOF
connect internal
select name, log_mode, open_mode from v_\$database; exit

EOF

--------------- cut here ---------------------



Hope it helps somebody

Dias Costa



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Wed Mar 10 2004 - 04:30:38 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US