When changing the hostname of a Windows based DB2 server, what updates in DB2 need to be made?


In order to perform this operation, you should follow these steps on the DB2 server:

  1. Login as a Local Administrator on the Windows server.
     
  2. Run the following command to list the current hostname/system name that is cataloged.

db2 list admin node directory show detail

  1. If there are no Admin Node Directory entries then you can skip the next 2 steps. It simply means that you haven't started the Control Center. The Admin Node Directory will get updated the next time the Control Center is started, based upon the current hostname.
     
  2. Uncatalog the current hostname using this command:

db2 uncatalog node <nodename>

  1. Catalog the admin node with the new hostname using this command:

db2 catalog admin tcpip node <nodename> remote <new hostname> system <new hostname>

<nodename> can be anything you want it to be (8 characters or less). It does not relate directly to the hostname itself.

  1. Update the admin configuration file using these commands:

db2 update admin cfg using DB2SYSTEM <new hostname>

         


db2 update admin cfg using SMTP_SERVER <new hostname>

  1. Stop the DB2 Administration Server (DAS), by issuing the following command:

db2admin stop

  1. Stop the DB2 instance by issuing the following command:

db2stop

  1. Change the server's hostname.
    On a Windows system, a reboot is required before this change will take effect. Do not reboot the Windows Server at this time - you must make the DB2 Configuration changes first.
     
  2. As the Local Administrator on Windows. Update the DB2SYSTEM registry variable by issuing the following command:

db2set -g DB2SYSTEM=<new hostname>

  1. Locate the file db2nodes.cfg in one of the following directories:

\ProgramData\IBM\DB2\<DB2COPY>\DB2\db2nodes.cfg

  1. In the db2nodes.cfg file change <current hostname> to <new hostname>
     
  1. You should restart your Windows server

Note that if your instances are set to auto-start, you may get error messages. These will occur if you have DB2_EXTSECURITY enabled. To correct this, you will need to update the DB2_ADMINGROUP and DB2_USERSGROUP registry entries using the db2extsec command. See the 'note' at the end of this technote for more details.
 

  1. Login as the  Local Administrator on Windows.
     
  2. Start the DB2 Administration Server (DAS), using the following command:

db2admin start

  1. Login as the Local Administrator on Windows. Start the DB2 instance by issuing the following command:

db2start

 

  1. When you change the computer name and the computer groups DB2ADMNS and DB2USERS are local computer groups, you must update the DB2_ADMINGROUP and DB2_USERSGROUP global registries.

    If Windows Extended Security has been enabled then you will need to tell DB2 to lookup the WIndows local groups DB2ADMNS and DB2USERS via the new hostname. For example if the hostname is changed to DB2SERVER then execute:

db2extsec /a DB2SERVER\DB2ADMNS /u DB2SERVER\DB2USERS

 

 

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.