Replacing the local hostname in the database and configuration files
This procedure describes how to replace the local hostname in the database and configuration files when the Control-M/EM installation host name is modified by the system administrator for technical/maintenance reasons. Due to inconsistencies with the hostname configuration values in the database, Control-M/EM might not function properly.
NOTE: The INSTALL_HOST field in database tables, such as CONFIG_HA and Control-M/EM installation files, such as CONFIG_HA.ini, must be updated with the value NEW_NAME.
To replace the local hostname:
Stop all Control-M/EM processes in the secondary intallation environment and then in the primary and distributed installation environments.
From a command line type one of the following:
UNIX: em restore_host_config -rehost [-silent] [[-old_host <old host name>] or [-rename_remote_main_data]] [-db_host <main installation host name>] [[-password <dbo password>] or [-password_file [<file_path>]]]
<old host name> is the original host name of the modified site (If there is more than one Control-M/ EM environment.
The -rename_remote_main_data flag updates the main installation parameters, such as Naming Server host data, on a distributed or secondary installation environment's configuration files, after moving the main installation to a different host.
If the database server is local to the main installation host (such as a dedicated PostgreSQL) the <main installation host name> parameter must be used when running on distributed or secondary installations.
There is no need to specify any optional flag when there is only a single main installation. The script runs and is configured according to the default values.
If the database is dedicated to the local installation that runs on the same host (such as PostgreSQL database installed with Control-M/EM or Full Install), execute the utility in two separate phases, as follows:
First execute the utility to update the configurations of PostgreSQL database communication parameters. Include the -reconf_db flag, as described in Reconfiguring the database server connection data. Provide the machine's new host name through the -host argument or through the interactive prompt.
After the above execution completes successfully, run the utility again with the -rehost flag, as described in the current procedure.
If there are additional (secondary/distributed) installations on different computers, and the main (primary) computer hostname is modified, the script must be executed with the -rehost option on all secondary/distributed installations with the additional flag -rename_remote_main_data, to update the primary hostname in the configuration files (such as config.xml of CORBA).
If there are additional (secondary/distributed) installation on different computers, and the main (primary) machine host name is modified, and if the database is local to the primary installation (such as dedicated PostgreSQL), you must use the -db_host flag to connect to the database, using the new primary host name.
If the hostname of the secondary or of the single distributed installation is modified, you need to use the -rehost option on these installations with no optional flag.
If there are multiple distributed installations and any host name in one of these installations is modified,you need to use the -rehost option on the specific installation with the addition of the -old_host flag.
If the -silent flag is not specified and optional parameters are not defined in the command line, the script asks for the relevant input interactively.
The utility restore_host_config -rename_remote_main_data is not supported in a Control-M/EM Distributed with Workload Archiving.