We have come across this question many times:
How do I change the name of the hostname/server name for the WebLogic Infrastructure database?
This is usually a change that you need to make after you have successfully finished configuring your Fusion Middleware environment, and now the network team has provided you with a Load Balancer or a proxy of sorts for you to access the database. You need to update the FMW database hostname to use the virtual IP or the virtual name to reach the database.
It is best if the load balancer was in place before you started your installation of the Fusion Middleware product, but things often don’t work as we would want them to.
Changing the Host Name or IP Address of a Database
You can change the host name or IP address of the host that contains the database that holdsOracle Fusion Middlewareschema.
- Change the hostname, domain name, or IP address of your host.
- Create an input file that contains the following:
[ARGUMENTS] [DATABASE_MAPPING] # You can only change the database host name. Host_C.domain.com=Host_C1.domain.comYou can pass any of the arguments, except chgHostInputFile, in the input file. In this example, you pass the arguments on the command line.
- Stop the Administration Server and the Managed Servers.
- Execute the following command on the Administration Server host and on the Managed Server host:
./chghost.sh -chgHostInputFile input_file -javaHome location_of_javahome -domainLoc target_domain_path -domainAdminUserName username -walletDir location_of_wallet_dir -logPriority log_level -logDir location_of_log_file
- Start the Administration Server and the Managed Servers.
Source: Oracle Doc: Administering Oracle Fusion Middleware, Changing Oracle Fusion Middleware Network Configurations – 184.108.40.206
A few issues that have been reported by our team that you should watch out for:
- The content of the input file should be on a single line. The documentation shows each parameter on a new line. That will not work.
- In more than one instance, putting all the parameters in the input file, the script will fail. Remove all parameters from the input file from the argument section and provide them as runtime arguments (as shown in the documentation)
- Be patient; the script may take a long time to run. The duration depends on the number of servers in your domain, the type of FMW deployment you have, the number of applications deployed, the number of servers in your topology, etc. If you have a distributed topology on multiple machines/nodes, it will take even longer. In one instance, the script took over 4 hours to run!