PRIMECLUSTER Wizard for Oracle allows users to execute their own unique processing before or after startup or stop of Oracle instances and Listeners (Online/ Offline processing).
For example, application startup/stop and batch processing can be executed along with startup or stop of Oracle instances and Listeners.
Script Type
Script | Description | ||
---|---|---|---|
startup | PreOnlineScript | Executed before OnlineScript. | |
OnlineScript | Starts resource up during userApplication Online processing. | ||
prestartup* | It is usable only for the Oracle instance resource in standby operation. | ||
nomount* | It is usable only for the Oracle instance resource in standby operation. | ||
mount* | It is usable only for the Oracle instance resource in standby operation. | ||
PostOnlineScript | Executed after OnlineScript. | ||
Stop | PreOfflineScript | Executed before OfflineScript. | |
OfflineScript | Stops resource down during userApplication Offline processing. | ||
PostOfflineScript | Executed after OfflineScript. | ||
other | FaultScript | Executed when failures occur. |
See
For information on how to set up these scripts, refer to "2.2.7.1 Oracle Resource Creation and Registration".
PreOnlineScript
PostOnlineScript
PreOfflineScript
PostOfflineScript
FaultScript
For detail of these scripts, refer to "3.1 Oracle database Control through PRIMECLUSTER Wizard for Oracle".
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 |
Example
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 startup*, 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 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.
The script must be entered with a full path name. If you are specifying arguments, separate the arguments with "blanks".
See
For details of each script, refer to 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 "7" of "2.2.7.1 Oracle Resource Creation and Registration".
Note
The user scripts above are usable only for the Oracle instance resource in standby operation.