Changing a DB2 server name

If you find DB2 not being able to start because of a server name problem, it most likely is caused by moving a virtual machine and not renaming the DB2 database.

To update DB2 to the proper name:

  1. Stop DB2 as administrator (db2inst user).
    >su – db2inst
    >db2stop
    If there are open database connections, then force them off.
    >db2stop force
  2. Go to the sqllib directory.
  3. Edit the db2nodes.cfg file. The file is usually read-only, so make enable writing first.
    >chmod u+w db2nodes.cfg
    >vi db2nodes.cfg
  4. In the db2nodes lipitor weight gain.cfg file, rename the existing computer name to that of the new computer name.
  5. Save the file.
  6. Reset the permissions to read-only.
    >chmod u-w db2nodes.cfg
  7. Start DB2.
    >db2start

You should no longer see any error messages about finding the database.