PRIMECLUSTER Wizard for Oracle Configuration and Administration Guide 4.2 - Linux for Itanium -
|
Contents

|
2.4.1 Oracle Online Script and Oracle Offline Script
In PRIMECLUSTER Wizard for Oracle, it is possible to make the original user's processing executed before and behind on the way of the start and the stop (Online processing and Offline processing) of the Oracle instance and the listener or that. For instance, the start, the stop, and the batch processing of the application can be executed by synchronizing with the start and the stop of the Oracle instance and the listener.
Script Type
Script |
Description |
startup |
PreOnlineScript |
Executed before OnlineScript.
Set up in RMS Wizard ("hvw" command). |
OnlineScript |
Starts resource up during userApplicatoin Online processing.
It is impossible to setup by user. |
|
prestartup* |
It is usable only for the Oracle instance resource in standby operation.
Executed before Oracle instance startup. If the Oracle state (STATUS of the V$INSTANCE view) has to be checked
Put the executable file that begins with "prestartup" in the "/opt/FJSVclora/usr" directory. |
nomount* |
It is usable only for the Oracle instance resource in standby operation.
Executed when the Oracle status (STATUS column in V$INSTANCE view) is "STARTED" during Oracle startup. Put the executable file that begins with "nomount" in the "/opt/FJSVclora/usr" directory. |
mount* |
It is usable only for the Oracle instance resource in standby operation.
Executed when the Oracle status (STATUS column in V$INSTANCE view) is "MOUNTED" during Oracle startup. Put the executable file that begins with "mount" in the "/opt/FJSVclora/usr" directory. |
PostOnlineScript |
Executed after OnlineScript.
Set up in RMS Wizard ("hvw" command). |
Stop |
PreOfflineScript |
Executed before OfflineScript.
Set up in RMS Wizard ("hvw" command). |
OfflineScript |
Stops resource down during userApplicatoin Offline processing.
It is impossible to setup by user. |
PostOfflineScript |
Executed after OfflineScript.
Set up in RMS Wizard ("hvw" command). |
other |
FaultScript |
Executed when failures occur.
Set up in RMS Wizard ("hvw" command). |

For information on how to set up the script, refer to "these scripts, refer to step "5 or 6" of "2.2.9", step "8" of "2.3.4", step "12" of "2.3.5".
-PreOnlineScript
-PostOnlineScript
-PreOfflineScript
-PostOfflineScript
-FaultScript
For detail of these scripts, refer to "3.1".
-OnlineScript
-OfflineScript
Execution sequence
Script |
userApplication startup |
resource AutoRecover |
userApplication stop (normal) |
userApplication stop (resource failure) |
Startup |
PreOnlineScript |
1 |
- |
- |
- |
OnlineScript |
2 |
1 |
- |
- |
|
prestartup* |
3 |
2 |
- |
- |
nomount* |
4 |
3 |
- |
- |
mount* |
5 |
4 |
- |
- |
PostOnlineScript |
6 |
5 |
- |
- |
stop |
PreOfflineScript |
- |
- |
1 |
2 |
OfflineScript |
- |
- |
2 |
3 |
PostOfflineScript |
- |
- |
3 |
4 |
other |
FaultScript |
- |
- |
- |
1 |

The execution sequence of scripts is described below when StartPriority set as "Listener";
- userApplication startup
Note that all PreOnlineScript are executed firstly.
- PreOnlineScript of Listener resource
- PreOnlineScript of Oracle instance resource
- OnlineScript of Listener resource
- PostOnlineScript of Listener resource
- OnlineScript (including prestartup*, nomount*, mount*) of Oracle instance resource
- PostOnlineScript of Oracle instance resource
- Listener resource AutoRecover
Note that PreOnlineScript of Listener resource is not executed.
- OnlineScript of Listener resource
- PostOnlineScript of Listener resource
- normal userApplication stop (user operation)
Note that all PreOfflineScript are executed firstly.
- PreOfflineScript of Oracle instance resource
- PreOfflineScript of Listener resource
- OfflineScript of Oracle instance resource
- PostOfflineScript of Oracle instance resource
- OfflineScript of Listener resource
- PostOfflineScript of Listener resource
- userApplication stop caused by Listener resource failure
Note that not only FaultScript of Listener resource are executed, but also FaultScript of Oracle instance resource are executed.
- FaultScript of Listener resource
- FaultScript of Oracle instance resource
- PreOfflineScript of Oracle instance resource
- PreOfflineScript of Listener resource
- OfflineScript of Oracle instance resource
- PostOfflineScript of Oracle instance resource
- OfflineScript of Listener resource
- PostOfflineScript of Listener resource
Notice (PreOnlineScript, PostOnlineScript, PreOfflineScript, PostOfflineScript, FaultScript)
- Execute the scripts using root privileges.
- The exit code 0 indicates normal termination. The value other than 0 indicates abnormal termination or switching process failures.
- If the script exceeds the maximum execution time (ScriptTimeout), switching process will fail.
- Each script has the environment variable defined in RMS.

For details of each script, refer to "2.6.3 Scripts" of the" "PRIMECLUSTER RMS with Wizard Tools Configuration and Administration Guide".
Notice (prestartup*, nomount*, mount*)
- The file is stored in /opt/FJSVclora/usr. If there are two or more files, they will be executed in alphabetical order of the file name.
- A return code of 0 indicates normal termination. A return code of other than 0 indicates abnormal termination. If the script terminates abnormally, Oracle instance startup will also fail.
- System administrator access privileges are used for script execution.
- The parameters are as follows:
- $1 : $ORACLE_HOME
- $2 : $ORACLE_SID
- $3 : Oracle user name
- If the script is not completed within the timeout period for Oracle instance startup, it will be considered as abnormal exit. Refer to step "5 or 6" of "2.2.9", step "8" of "2.3.4", step "12" of "2.3.5".

The user scripts above are enabled in standby operation.
Note that they cannot be used in Oracle RAC scalable operation.
All Rights Reserved, Copyright(C) FUJITSU LIMITED 2009