Are you using Stat to its Full Potential? Calling Pre and Post Patch Scripts

When automating the patch, you may sometimes want to call scripts to do things like bring down servers and after patch application, you want to call scripts to bring them back up.  This is a simple setup in Stat and you can call your own home-grown scripts and then indicate for Stat to call them when scheduling and applying patches in Stat.   I am going to discuss how it works and what you need to do in order to check for prerequisites in Stat.

Until this point in this series all activities have involved the patch console.  But to set up scripts in Stat we will venture into another area specific to each instance.

To start open’ Maintenance’ in the top menu, select ‘General’ which will open that window and select “Oracle Applications Connect’.

Select Oracle Application Connect which will launch that menu.  Highlight the instance for which you would like to add a script and select the ‘Servers’.

In the ‘Servers’ tab you can scroll to the right to find where to identify the scripts you want to invoke for each action.  You can call up to three pre and three post scripts.  They will be called in the slots labeled ‘Start Concurrent Cmd’, ‘Stop Concurrent Cmd’, ‘Start’ Forms Cmd’, ‘Stop Forms Cmd’, ‘Start Web Cmd’, and ‘Stop Web Cmd.’  The ‘Stop Cmd’s’ run as Pre-patching steps and the ‘Start Cmd’s’ run as post-patch scripts.  If the application servers are on different servers then you will want to run separate scripts.  In the example below I have create a stop and start script for the Concurrent Server.  The scripts you need to call need to be created and placed on the appropriate server.  

If you all calling scripts to bring down servers another setup will involve adding a parameter to each stat.conf file as  outlined below:

<ENV>.shutdown_services

When applying E-Business patches, all services will be stopped before the patch apply starts. Stat will wait for a response from each server indicating it is down. This parameter indicates the amount of time Stat should wait for services to shutdown. If that time is exceeded without response from the service, Stat will assume that it is down.

This will ensure that the servers are down before Stat begins application patching.  As with any Stat.conf change you will need to restart the agent in order for the change to take effect.

You have now setup pre and post migration scripts. 

About the Author
Fernando Volonte
Stat for PeopleSoft and EBS PM, part time softball Coach, very devoted father and just a generally kickback funny guy!