This section describes about how to enable automatic restart of HVR Scheduler when a Unix or Linux machine is rebooted.
Based on the daemon type available in the server where HVR is installed, one of the following configuration methods can be used for enabling automatic restart of HVR processes.
On a Unix/Linux server with systemd, create a service to enable HVR Scheduler to auto-start after a system reboot or service failure.
The following steps should be performed as user root to configure systemd:
Create a unit file hvrscheduler.service in /etc/systemd/system directory. The unit file should contain the following:
1. The HVR Scheduler service should start only after the Hub's database service (database.service) has started. Otherwise, after reboot the HVR Scheduler will fail immediately while trying to connect to the hub database.
2. The DB connection string syntax (in ExecStart) differs for each database. For more information about DB connection string syntax in HVR commands, see Calling HVR on the Command Line (channel is not required in the DB connection string (in ExecStart) to start HVR Scheduler).
To enable and start the service, execute the following commands:
To verify whether the service is active, execute the following command:Sample output:
For a Unix/Linux server without systemd, xinetd, or inetd, use HVR's script file hvr_boot (available in hvr_home/lib) and a user-defined configuration file hvrtab to enable HVR Scheduler to auto-start after a system reboot.
The following steps should be performed as user root to configure init:
Create the configuration file hvrtab in the /etc directory. Each line of this configuration file should contain four or more parameters separated by a space in the following format:
username port_or_hub hvr_home hvr_config [options]
- username: Indicates the Unix/Linux username under which HVR runs.
- port_or_hub: Indicates a TCP/IP port number (for HVR Remote Listener) or the username and password of the hub database (for HVR Scheduler). The DB connection string syntax for the hub database differs for each database. For DB connection string syntax, see Calling HVR on the Command Line.
- hvr_home: Indicates the path for $HVR_HOME.
- hvr_config: Indicates the path for $HVR_CONFIG.
- [options]: Indicates an optional parameter to pass other options to the HVR process. For more information about the options, see hvrremotelistener and hvrscheduler.
Sample configuration file:
Lines starting with a hash (#) are treated as comments.
Copy the script file hvr_boot (available in hvr_home/lib) to the init.d directory and create symlinks to the rc.d directory.
For an Oracle RAC, the script file hvr_boot can be enrolled in the cluster with command crs_profile.
For non-Solaris machines, this can achieved using the start and stop sequence number in the boot filename. The start sequence of hvr_boot must be bigger than the start sequence of the DBMS service, and the stop sequence must be smaller than the stop sequence of the DBMS.
For Solaris SMF, this can achieved by editing the file hvr_boot.xml and replacing the string svc:/milestone/multi–user–server with the name of the DBMS service (e.g. svc:/application/database/oracle).
The following example uses start sequence 97 and stop sequence 03 (except HP–UX which uses 997 and 003 because it requires three digits).
On AIX, to start and stop HVR for run level 2:
On HP–UX, to start and stop HVR for run level 3:
On Linux, to start HVR for run levels 3 and 5 and stop for all run levels:
On Solaris 8 or 9, to start and stop HVR for run level 2 (which implies level 3):
On Solaris 10 and higher;
For newer Solaris versions, the script file hvr_boot must be registered in the Solaris's System Management Facility (SMF). Also, the file hvr_boot.xml (available in hvr_home/lib) should be copied to the init.d directory.