Re: Unix script to check database status

  • From: Dias Costa <dcosta@xxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Wed, 10 Mar 2004 10:34:39 +0000

Hi,

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


#1 script ( named activ_DB)


--------------- cut here ---------------------
#!/bin/ksh
export ORACLE_SID=MINW
export ORACLE_HOME=/oracle
export PATH=$ORACLE_HOME/bin:$PATH

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@xxxxxxxxxxxxx put 'unsubscribe' in the subject line. -- Archives are at //www.freelists.org/archives/oracle-l/ FAQ is at //www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------

Other related posts: