Tuesday, 2 December 2014

Auto Start & Stop Apps server

#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle Apps auto start-stop script.
#
#
ORA_OWNER=oravis
APP_OWNER=applvis
case “$1? in
‘start’)
# Start the Oracle Apps Vision Demo Instance Using the Script Created by Niveeinfotech:
# The following command assumes that the oracle login
# will not prompt the user for any values
su – $ORA_OWNER -c “/u01/oracle/visdb/9.2.0/appsutil/scripts/VIS_fin/addlnctl.sh start vis”
su – $ORA_OWNER -c “/u01/oracle/visdb/9.2.0/appsutil/scripts/VIS_fin/addbctl.sh start vis”
su – $APP_OWNER -c “/u02/oracle/viscomn/admin/scripts/VIS_fin/adstrtal.sh apps/apps”
touch /var/lock/subsys/initApps
;;
‘stop’)
# Stop the Oracle Apps Vision Demo Instance Using the Script Created by NiveeInfotech
# The following command assumes that the oracle login
# will not prompt the user for any values
su – $APP_OWNER -c “/u02/oracle/viscomn/admin/scripts/VIS_fin/adstpall.sh apps/apps”
su – $ORA_OWNER -c “/u01/oracle/visdb/9.2.0/appsutil/scripts/VIS_fin/addlnctl.sh stop vis”
su – $ORA_OWNER -c “/u01/oracle/visdb/9.2.0/appsutil/scripts/VIS_fin/addbctl.sh stop immediate vis”
rm -f /var/lock/subsys/initApps
;;
esac
—–
Create the above script under /etc/init.d as filename — initApps
chmod 750 /etc/init.d/initApps
then do the following as root
chkconfig –add initApps

No comments: