HA Monitor Kit for Oracle Description and User's Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
HA Monitor Kit provides a sample file of the server start command. Copy the sample file and set it up as explained in this chapter, and customize it as needed. For the storage location and copying destination of the sample file, see 3.2.7(1) Setting up the server start, termination, and monitoring commands.
The server start command sample file executes the act_proc() shell function that describes the startup process to start Oracle listeners and Oracle instances.
The following figure shows the content of the server start command sample file.
Figure 4-1 Content of the server start command sample file
![[Figure]](FIGURE/ZU040100.GIF)
Numbers 1 through 5 in the figure are explained below.
- This is the environment variable for setting up the operating environment necessary for starting programs.
For details about the content to be set up here, see (1) Environment variables.
- This is the Oracle listener startup process.
The process for executing the haoralsnrbgn command to start the Oracle listener specified by the listener name is described here. For details about the content to be set up here, see (2) Setup method.
For details about the haoralsnrbgn command, see haoralsnrbgn (Starts an Oracle listener) in 4.5 Commands used for setting up the server start, termination, and monitoring commands.
- This is the Oracle instance startup process.
The process for executing the haorainsbgn command to start the Oracle instance specified by the instance identifier is described here. For details about the content to be set up here, see (2) Setup method.
For details about the haorainsbgn command, see haorainsbgn (Starts an Oracle instance) in 4.5 Commands used for setting up the server start, termination, and monitoring commands.
- This is the return value of the server start command.
For details about the content to be set up here, see (2) Setup method.
- This is the process executed by the act_proc() shell function.
To add a user's own process, add it inside this act_proc() shell function. For details about the content to be set up here, see (3) Server start command customization.
- Organization of this section
- (1) Environment variables
- (2) Setup method
- (3) Server start command customization
(1) Environment variables
This subsection explains the environment variables indicated by 1 in Figure 4-1 Content of the server start command sample file.
- LOGNAME
Specifies a server log file name. Specify a unique file name for each server.
We recommend that you match the server log file name to the server's server alias name. In the provided sample file, orasrv is assumed as the server alias name.
For the server log output destination, see 5.4 Checking the server logs.
- LOGSIZE
Specify an integer for the server log file size (in bytes). The default is 1048576. Under normal conditions, use this default file size. Increase the size only if the volume of output is large and may cause the log to run out of space. For details about how to calculate the server log file size, see 5.4(2) File size.
For servers in which you specified the same value for the LOGNAME environment variable, specify the same value for the LOGSIZE environment variable of the server start, termination, and monitoring commands.
(2) Setup method
This subsection explains how to set up the startup processes 2 through 4 in Figure 4-1 Content of the server start command sample file.
- Setting up Oracle listener startup process (2 in the figure)
- The provided sample file uses a setting that starts a single Oracle listener (listener name: LISTENER) that is associated with a server. If there is no Oracle listener that is associated with a server, comment out the code indicated by 2 in the figure, or delete it. To start multiple Oracle listeners on a single server, duplicate the code indicated by 2 in the figure.
- In the provided sample file, LISTENER is assumed as the listener name. Change the underlined argument LISTENER to the listener name of the Oracle listener you want to start.
- Setting up Oracle instance startup process (3 in the figure)
- The provided sample file uses a setting that starts a single Oracle instance (instance identifier: orcl1) that is associated with a server. If there is no Oracle instance that is associated with a server, comment out the code indicated by 3 in the figure, or delete it. To start multiple Oracle instances on a single server, duplicate the code indicated by 3 in the figure.
- In the provided sample file, orcl1 is assumed as the instance identifier. Change the underlined argument orcl1 to the instance identifier of the Oracle instance you want to start.
- Setting up server start command return value (4 in the figure)
- The provided sample file uses a setting that does not suspend the server startup if the Oracle instance or Oracle listener fails to start. If the Oracle instance or Oracle listener fails to start, a monitoring process will detect the error after server startup is complete.
You can add non-Oracle application processes necessary for a job, and user-specific processes, to the server start command. When customizing the command, note the following:
- Before adding a process, see the description under Creating a server start command in the manual HA Monitor (for Linux(R)).
- Add the process in the act_proc() shell function inside the server start command. Do not edit any items other than the act_proc() shell function and the shell variables.
The process described here must be executed with superuser permissions. If you have changed your permissions, change them back to superuser permissions.
- Do not use the exit command inside the act_proc() shell function. To terminate the process, use the return command.
- The return code of the act_proc() shell function becomes the return value of the server start command. To suspend the server startup, make the act_proc() shell function return a value other than 0.
- Do not add a process that does not return control to the server start command, for example, making the executed command resident.
- For the output destination for the messages issued by the act_proc() shell function, see 5.4 Checking the server logs.
- Specify absolute paths for the commands and files to be input/output inside the act_proc() shell function. (That is, commands other than the ones provided by HA Monitor Kit.)
- Do not modify the names of the following shell variables:
- Before adding a shell variable, search through the command to make sure it is not already being used.
All Rights Reserved. Copyright (C) 2011, 2014, Hitachi, Ltd.