Oracle database high availability policy

The Oracle database high availability policy consists of one group containing the Oracle database server, the Oracle database listener, the virtual IP address and the file system containing the Oracle database.

Figure 1. Oracle database high availability policy
Oracle database high availability policy
The following table lists all resources contained in the policy:
Table 1. Oracle database high availability resources
Name Resource name Description
Oracle resource group IBM.ResourceGroup/<PREFIX>-rg Resource group containing all Oracle resources.
Oracle database server IBM.Application/<PREFIX>- db Oracle database processes, which are started, stopped, and monitored using scripts.
Oracle database listener IBM.Application/<PREFIX>- lsn Oracle database listener process, which is started, stopped, and monitored using scripts.
Virtual IP address IBM.ServiceIP/<PREFIX>-ip Virtual IP address to connect Oracle database clients to Oracle database listener.
Oracle database files IBM.AgFileSystem/<ORACLE_FILESYSNAME> File system containing the Oracle database files, may occur multiple times.
Network interfaces IBM.Equivalency and IBM.NetworkInterface/ <PREFIX>-nieq-1-dyn Selects network adapters to bind virtual IP to. Started, stopped, and monitored using IBM.GblResRM.
The Oracle database server and the Oracle database listener are resources of class IBM.Application. For IBM.Application, a script is required to start, stop, and monitor. The samoraclectrl-db script that controls the Oracle database server has the following arguments:
Action <start|stop|status>
OracleHome <path to the oracle installation>
OracleSid <instance name of the database to start>
OracleOwner <user ID of the database owner>
start
Starts the database processes.
stop
Stops the database processes.
status
Checks if a process for the specified instance runs
The samoracle-lsn script which controls the Oracle database listener has the following arguments:
Action <start|stop|status> 
OracleHome <path to the oracle installation> 
ListenerName <name of the listener instance> 
OracleOwner <user ID of the database owner>
start
Starts the listener processes.
stop
Stops the listener processes.
status
Checks if the listener processes for the specified listener instance runs.

The following table shows all relationships that are defined:

Table 2. Oracle database high availability policy relationships
Relationship name Source Target Type
<PREFIX>-lsn-on-ip-1 Oracle database listener Virtual IP address DependsOn
<PREFIX>-ip-on-nieq-1 Virtual IP address Network equivalency DependsOn
<PREFIX>-lsn-DependsOn-<ORACLE_FILESYSNAME> Oracle database listener Oracle database files DependsOn may occur multiple times depending on number of file systems.
<PREFIX>-db-DependsOn-ORACLE_FILESYSNAME> Oracle database server Oracle database files DependsOn may occur multiple times depending on number of file systems.

The Oracle database listener and the Oracle database server cannot be started without the file system being mounted that contains the Oracle database files. DependsOn relationships are defined between the listener and the database files and the listener and the database server. The Oracle database clients connect to the Oracle database listener using a virtual IP address, therefore there is also a dependsOn relationship defined between the listener and the IP address. The virtual IP address needs to be bound to a network interface, which leads to a dependsOn relationship between the virtual IP and the network equivalency.

In this sample scenario an Oracle database installation was automated using the Oracle database policy:
  • The Oracle database was automated using the policy described above.
  • A mount point oracledata is defined on a shared disk.
  • A virtual IP address 10.15.13.241 is reserved for the database listener and specified to be bound to the en0 network interfaces on both nodes.
Output of lssam for this setup:

Offline IBM.ResourceGroup:oracle-rg Nominal=Offline  
  |- Offline IBM.AgFileSystem:oradata MNT=/oracledata   <. <.     
    |- Offline IBM.AgFileSystem:oracledata:node-1        |  |     
    '- Offline IBM.AgFileSystem:oracledata:node-2        | DO  
  |- Offline IBM.Application:oracle-db                   | -'     
    |- Offline IBM.Application:oracle-db:node-1          |     
    '- Offline IBM.Application:oracle-db:node-2         DO  
  |- Offline IBM.Application:oracle-lsn                 -' -.     
    |- Offline IBM.Application:oracle-lsn:node-1            |     
    '- Offline IBM.Application:oracle-lsn:node-2           DO  
  '- Offline IBM.ServiceIP:oracle-ip-1 IP=10.15.13.241  -. <'     
    |- Offline IBM.ServiceIP:oracle-ip-1:node-1          |     
    '- Offline IBM.ServiceIP:oracle-ip-1:node-2         DO
Online IBM.Equivalency:oracle-nieq-1-dyn                <'
   |- Online IBM.NetworkInterface:en0:node-1
   '- Online IBM.NetworkInterface:en0:node-2