#!/bin/ksh # # File: runpatch.ksh # # Author: Andy Rivenes, arivenes@appsdba.com, www.appsdba.com # Copyright (C) 2001-2003 AppsDBA Consulting. All Rights Reserved. # Date: 12/12/2001 # # Description: This script will front end adpatch to allow an easy method of # running non-interactive patches for Oracle Applications 11i # environments. # # # Installation: # # These directions are taken from Oracle's Maintaining Oracle Applications # documentation, Section 4: AutoPatch # # This script runs AutoPatch non-interactively. This requires that you first # create an AutoPatch defaults file for your current environment (APPL_TOP # and ORACLE_SID/TWO_TASK). To create an AutoPatch defaults file: # # 1. Specify defaultsfile= on the AutoPatch command line. # The defaults file must be located under your APPL_TOP in the # subdirectory under admin. # # For example: # For UNIX users: # adpatch defaultsfile=$APPL_TOP/admin//pdef.txt # # 2. Run AutoPatch up to the point where it asks you for the directory where your # Oracle Applications patch has been unloaded. Then type 'abort' at this prompt. # # 3. Be sure to change the permissions on the pdef.txt file to either 700 or 500. # By the way, now would be a good time to double check that you have also restricted # permissions on the $APPL_TOP/admin/ directory. # # # Modifications: # # # Enhancements Needed: # # if [ -z "$1" ] then echo "Syntax: runpatch " exit else adpatch defaultsfile=$APPL_TOP/admin/$ORACLE_SID/pdef.txt logfile="$1" \ patchtop=$APPL_TOP/patch/"$2" driver="$3" workers=4 interactive=no \ options=novalidate # echo "" echo "grepping for any error messages" echo "" grep -i error $APPL_TOP/admin/$ORACLE_SID/log/"$1" fi