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

Home -> Community -> Usenet -> c.d.o.server -> Re: 9iAS Infrastructure and Unified Messaging on two different machines

Re: 9iAS Infrastructure and Unified Messaging on two different machines

From: Gabriele Lamon <g.lamon.UGO_at_mcg-econ.it>
Date: Thu, 13 Nov 2003 12:21:52 +0100
Message-ID: <bovout$40f$1@grillo.cs.interbusiness.it>

"Alex NSB" <alexnsb_at_tin.it> ha scritto nel messaggio news:bovmk9$rkk$1_at_newsread.albacom.net...
> looking forward to seeing your scripts.
here they are:

/etc/rc.d/init.d/iasora:

#!/bin/bash
#
# Startup script for Oracle9i Application Server Infrastructure R2
#
# chkconfig: 345 99 10
# description: Oracle9i AS R2

ORA_HOME=/opt/oracle/iAS/9.0.2.0.1; export ORA_HOME ORA_OWNER=oraiasinfra; export ORA_OWNER

case "$1" in

        'start')
                su - $ORA_OWNER -c "$ORA_HOME/start.sh" > /dev/null
2>&1
        ;;
        'stop')
                su - $ORA_OWNER -c "$ORA_HOME/bin/stop.sh" > /dev/null
2>&1
        ;;
        *)
                echo "Usage: iasora {start|stop}"
                exit 1

esac

to activare it just type "chkconfig --add iasora"

start.sh:

#!/bin/bash
DISPLAY=localhost:0.0; export DISPLAY

rm $ORACLE_HOME/startup.log
touch $ORACLE_HOME/startup.log

date >> $ORACLE_HOME/startup.log
echo >> $ORACLE_HOME/startup.log 2>&1

echo "lsnrctl start..." >> $ORACLE_HOME/startup.log 2>&1 lsnrctl start >> $ORACLE_HOME/startup.log 2>&1 echo >> $ORACLE_HOME/startup.log 2>&1

echo "dbstart..." >> $ORACLE_HOME/startup.log 2>&1 dbstart >> $ORACLE_HOME/startup.log 2>&1 echo >> $ORACLE_HOME/startup.log 2>&1

echo "oidmon start..." >> $ORACLE_HOME/startup.log 2>&1 oidmon start >> $ORACLE_HOME/startup.log 2>&1 echo >> $ORACLE_HOME/startup.log 2>&1

echo "oidctl server=oidldapd configset=0 instance=1 start..." >> $ORACLE_HOME/startup.log 2>&1
oidctl server=oidldapd configset=0 instance=1 start >> $ORACLE_HOME/startup.log 2>&1
echo >> $ORACLE_HOME/startup.log 2>&1

sleep 20

echo "$ORACLE_HOME/dcm/bin/dcmctl start -ct ohs..." >> $ORACLE_HOME/startup.log 2>&1
$ORACLE_HOME/dcm/bin/dcmctl start -ct ohs >> $ORACLE_HOME/startup.log 2>&1
echo >> $ORACLE_HOME/startup.log 2>&1

echo "$ORACLE_HOME/dcm/bin/dcmctl start -ct oc4j..." >> $ORACLE_HOME/startup.log 2>&1
$ORACLE_HOME/dcm/bin/dcmctl start -ct oc4j >> $ORACLE_HOME/startup.log 2>&1
echo >> $ORACLE_HOME/startup.log 2>&1

stop.sh

#!/bin/bash
DISPLAY=localhost:0.0; export DISPLAY

rm $ORACLE_HOME/shutdown.log
touch $ORACLE_HOME/shutdown.log

date >> $ORACLE_HOME/shutdown.log
echo >> $ORACLE_HOME/shutdown.log

echo "$ORACLE_HOME/dcm/bin/dcmctl shutdown...">> $ORACLE_HOME/shutdown.log
$ORACLE_HOME/dcm/bin/dcmctl shutdown >> $ORACLE_HOME/shutdown.log 2>&1 echo >> $ORACLE_HOME/shutdown.log

echo "oidctl server=oidldapd configset=0 instance=1 stop...">> $ORACLE_HOME/shutdown.log
oidctl server=oidldapd configset=0 instance=1 stop >> $ORACLE_HOME/shutdown.log 2>&1
echo >> $ORACLE_HOME/shutdown.log

sleep 20

echo "oidmon stop...">> $ORACLE_HOME/shutdown.log oidmon stop >> $ORACLE_HOME/shutdown.log 2>&1 echo >> $ORACLE_HOME/shutdown.log

echo "lsnrctl stop...">> $ORACLE_HOME/shutdown.log lsnrctl stop >> $ORACLE_HOME/shutdown.log 2>&1 echo >> $ORACLE_HOME/shutdown.log

echo "dbshut...">> $ORACLE_HOME/shutdown.log dbshut >> $ORACLE_HOME/shutdown.log 2>&1 echo >> $ORACLE_HOME/shutdown.log

for the apllication itself the script in the rc.d directory is similar :-)
in the start you have to add:

echo "webcachectl start..." >> $ORACLE_HOME/startup.log 2>&1 webcachectl start >> $ORACLE_HOME/startup.log 2>&1 echo >> $ORACLE_HOME/startup.log 2>&1

echo "emctl start..." >> $ORACLE_HOME/startup.log 2>&1 emctl start >> $ORACLE_HOME/startup.log 2>&1 echo >> $ORACLE_HOME/startup.log 2>&1

and in the stop

echo "emctl stop..." >> $ORACLE_HOME/shutdown.log emctl stop >> $ORACLE_HOME/shutdown.log 2>&1 echo >> $ORACLE_HOME/shutdown.log

echo "webcachectl stop..." >> $ORACLE_HOME/shutdown.log webcachectl stop >> $ORACLE_HOME/shutdown.log 2>&1 echo >> $ORACLE_HOME/shutdown.log

> Alessandro

Gabriele Received on Thu Nov 13 2003 - 05:21:52 CST

Original text of this message

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