Switchover and Failover
Switchover and failover operations are handled by the scripts nms-ha-switchover and nms-ha-failover, respectively. These scripts are run at the NMS site that is to become primary. They require prior configuration by the nms-ha-config script. Configuration is stored in the file $NMS_HOME/etc/nms_sites.cfg and credentials necessary to use Oracle Data Guard are stored in the Oracle Wallet.
nms-ha-switchover
nms-ha-switchover performs a Switchover operation. It is run from the command line on the NMS site which is to become primary. After validating that NMS and the database are ready for a switchover, it performs the following actions:
1. Stop NMS Services and WebLogic at the current primary site.
2. Perform an Oracle Data Guard Switchover to make the database corresponding to site where this script runs Primary.
3. Run nms-sync-site to sync data directory files from the current primary site.
4. Update the NMS database to mark the current site as primary.
5. Start services and WebLogic.
Note: Run nms-ha-switchover -h for full usage information.
nms-ha-failover
nms-ha-failover performs a Failover operation. It is run from the command line on the NMS site that is to become primary. After NMS and the database are ready for a failover, it performs the following actions.
1. Perform an Oracle Data Guard Failover to make the database corresponding to site where this script runs Primary
2. Run nms-sync-site to sync data directory files from the current primary site if possible.
3. Update the NMS database to mark the current site as primary.
4. Start services and WebLogic.
Note: Run nms-ha-failover -h for full usage information.
nms-ha-config
nms-ha-config creates or updates the configuration necessary to run the nms-ha-switchover and nms-ha-failover scripts. It has several subcommands. Run “nms‑ha‑config -h” for a script overview or “nms‑ha‑config <subcommand> -h” for details for each subcommand. For initial high availability configuration, run “nms‑ha‑config init” to generate $NMS_HOME/etc/nms_sites.cfg and local entries in the Oracle Wallet. Then copy this file to each NMS environment at each NMS site and run the following command on each environment to add entries to the Oracle Wallet:
nms-ha-config update --wallet $NMS_SITE_NAME
nms-ha-config init
usage: nms-ha-config init [-h] [--connect CONNECT]
Perform initial high availability configuration
This prompts for the following information and saves nms_sites.cfg.
1. Password for the Oracle Wallet.
2. Static Connect Identifier to connect to data guard.
3. Login for database user.
4. Password for database user.
5. Hostname where NMS Services run.
6. Database name and NMS Services hostname for additional NMS sites.
 
Options:
-h, --help: show this help message and exit.
--connect: CONNECT Data Guard static connect identifier
nms-ha-config add
usage: nms-ha-config add [-h] site
Add a new NMS site to configuration. This prompts for the hostname where NMS Services run positional arguments:
site: Name of site to add
options:
-h, --help: show this help message and exit
nms-ha-config update
usage: nms-ha-config update [-h] [--hostname HOSTNAME] [--dbname DBNAME] [--connect CONNECT] [--wallet] site
Update configuration for an NMS site already in config file
The values for the passed in parameters will be changed. If the --wallet parameter is used, then you will be prompted for updating the information in the Oracle Wallet.
positional arguments:
site: Site to update
 
options:
-h, --help: show this help message and exit
--hostname HOSTNAME: Hostname for NMS services
--dbname DBNAME: Database name in Data Guard configuration
--connect CONNECT: Data Guard static connect identifier
--wallet: Update Oracle wallet
nms-ha-config remove
usage: nms-ha-config remove [-h] site [site ...]
Remove an NMS site from configuration positional arguments:
site: Site to remove
options:
-h, --help: Show this help message and exit.
Failover Patching
Failover patching is a mechanism for installing patches with almost zero downtime. See Steps to Deploy a Patch Bundle using Failover Patching in the System Installation chapter of the Oracle Utilities Network Management System Installation Guide.