Fusion Middleware (WebLogic) Infrastructure Database Name or IP Change

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. 

Contact Us

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.

In this scenario, you have a database on Host_C and you have changed the name of the host to Host_C1. The Adminstration Server is on Host_A and the Managed Servers are on Host_B. You are not changing the names or moving the Adminstration Server or Managed Servers.To change the host name for the database from Host_C to Host_C1:
  1. Change the hostname, domain name, or IP address of your host.
  1. Create an input file that contains the following:
  1. [ARGUMENTS]
    [DATABASE_MAPPING]
    #  You can only change the database host name.
    Host_C.domain.com=Host_C1.domain.com
    
    You can pass any of the arguments, except chgHostInputFile, in the input file. In this example, you pass the arguments on the command line.
  2. Stop the Administration Server and the Managed Servers.
  3. 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
  4. Start the Administration Server and the Managed Servers.
The references withinOracle Fusion Middlewareare changed to the new host name.
Source: Oracle Doc: Administering Oracle Fusion Middleware, Changing Oracle Fusion Middleware Network Configurations – 12.2.1.4

 

Update

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!