4.3 Server termination command setup

HA Monitor Kit provides a sample file of the server termination 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 termination command sample file executes the term_proc() shell function that describes the termination process to terminate Oracle listeners and Oracle instances.

The following figure shows the content of the server termination command sample file.

Figure 4-2 Content of the server termination command sample file

[Figure]

[Figure]

Numbers 1 through 5 in the figure are explained below.

  1. This is the environment variable for setting up the operating environment necessary for terminating programs.
    For details about the content to be set up here, see (1) Environment variables.
  2. This is the Oracle instance termination process.
    The process for executing the haorainsend command to terminated 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 haorainsend command, see haorainsend (Terminates an Oracle instance) in 4.5 Commands used for setting up the server start, termination, and monitoring commands.
  3. This is the Oracle listener termination process.
    The process for executing the haoralsnrend command to terminate 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 haoralsnrend command, see haoralsnrend (Terminates an Oracle listener) in 4.5 Commands used for setting up the server start, termination, and monitoring commands.
  4. This is the process executed by the term_proc() shell function.
    To add a user's own process, place it inside this term_proc() shell function. For details about the content to be set up here, see (3) Server termination command customization.
  5. This is the return value of the server termination command.
Organization of this section
(1) Environment variables
(2) Setup method
(3) Server termination command customization

(1) Environment variables

This subsection explains the environment variables indicated by 1 in Figure 4-2 Content of the server termination command sample file.

(2) Setup method

This subsection explains how to set up the termination processes 2 and 3 in Figure 4-2 Content of the server termination command sample file.

To change the order for terminating Oracle instances and Oracle listeners, change the termination order in the file.

(3) Server termination command customization

You can add non-Oracle application processes necessary for a job, and user-specific processes, to the server termination command. When customizing the command, note the following: