Wednesday, April 30, 2014

R12 Restart Apache + Clear Cache Concurrent


Hi All,

Here the step by step guide for creating Concurrent to Restart Apache + Clear Cache in R12 EBS instance.
Hope that it will save your time during upgrade cycles and users tests.

Here we go....

1. Login to EBS with System Administrator responsibility.
2. Go to Concurrent --> Program --> Executable.
Executable : XX_RESTART_APACHE
Short Name : XX_RESTART_APACHE
Application : Your XX Custom Application
Description : Restart Apache
Execution Method : Host
Execution File Name : Restart_Apache

3. Save your changes.
4. Go to Concurrent --> Program --> Define
Program : XX Restart Apache
Short Name : XX_RESTART_APACHE
Application : Your XX Custom Application
Description : Restart Apache
In Executable Section:
Name : XX_RESTART_APACHE
Method : Host
5. Save your changes.
6. Create Restart_Apache.prog under your CUSTOM_TOP/bin directory:

########################################################
#!/bin/ksh

ORIG_CONC_OUTPUT_FILE=$1
COPIES=$2
TITLE=$3

REQUEST_ID=`echo $TITLE | awk -F"." '{ print $NF }'`


LOG_DIR=$APPLCSF/$APPLLOG
OUT_DIR=$APPLCSF/$APPLOUT
LOG_FILE=l${REQUEST_ID}.req
OUT_FILE=o${REQUEST_ID}.out
USER_LOG_FILE=$LOG_DIR/$LOG_FILE # this is the log file that the user see

echo log file is $LOG_DIR
echo out file is $OUT_DIR
echo user log file is $USER_LOG_FILE

$ADMIN_SCRIPTS_HOME/adoacorectl.sh stop 2>&1  $LOG_FILE
sleep 5
$ADMIN_SCRIPTS_HOME/adoacorectl.sh status 2>&1 $LOG_FILE
sleep 5
echo "Before clear cash"
rm -Rf $ORA_CONFIG_HOME/10.1.3/j2ee/oacore/persistence/* >> $LOG_FILE
echo "After clear cash"
$ADMIN_SCRIPTS_HOME/adoacorectl.sh start 2>&1 $LOG_FILE
sleep 5
$ADMIN_SCRIPTS_HOME/adoacorectl.sh status 2>&1 $LOG_FILE
########################################################

7. chmod +x <YOUR CUTOM_TOP>/bin/Restart_apache.prog
8. Create soft link 
ln -s $FND_TOP/bin/fndcpesr <YOUR CUTOM_TOP>/bin/Restart_apache

9. Add you concurrent to request group under the System Administrator.

That's all...
Good Luck ... 



2 comments: