Thursday, 22 December 2011

Script to Shut Down Application Server in UNIX



#!/bin/sh
export DATE=`date`
ORACLE_HOME=/oracle/fin/oracle/11.2.0/db_1;export ORACLE_HOME
ORACLE_SID=xxxxxx;export ORACLE_SID
export TERM=vt100
export PATH=$PATH:/usr/local/bin:/usr/bin:/usr/sbin:.
export EPC_DISBLED=TRUE
export EPC_DISABLED=TRUE
stty erase ^?
ORAENV_ASK=YES;export ORAENV_ASK
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
print "Environment brought down at : " $DATE
. /psoft/fin/ xxxxxx /psconfig.sh
cd $PS_HOME/appserv
echo SHUTTING DOWN PROCESS SCHEDULER
psadmin -p kill -d xxxxxx
echo SHUTTING DOWN APPSERVER
psadmin -c shutdown! -d xxxxxx
echo 'Sleeping for 120 seconds to shutdown the APPS Server'
sleep 120
$DATE

0 comments:

Post a Comment