IBM Performance Management

Changing the remote DB2 server IP address and host name

If you change the IP address of your remote DB2® server, you must manually update the configuration of the Performance Management server components that connect to the DB2 server.

About this task

Follow the procedure for updating the Performance Management server components if the following conditions apply:

  • You are using a remote DB2 server.
  • You configured the IP address of your remote DB2 server and not the host name.
This procedure does not cover migrating data from one DB2 server to another DB2 server.

Procedure

Complete the following steps to reconfigure the Performance Management server components to use the new IP address or host name of the DB2 server:

  1. Stop the Performance Management server. Enter:
    apm stop_all
  2. Update the databaseName attribute for each of the DB2 server data source definitions in the install_dir/wlp/usr/servers/server1/scr/conf/server_include.xml file. You must update two data source definitions for the SCR (SCR32) database and two data source definitions for the WAREHOUSE database.
  3. Go to the install_dir/serveragents/config/apm_hostname_te.cfg file. Update the KQZ_JDBC_URL attribute with the new IP address or host name.
  4. Update the IP address values that are used in the Datamart cron jobs.
    1. On the Performance Management server, source the db2apm profile.
      . ~db2apm/sqllib/db2profile
    2. List the contents of the existing node directory.
      db2 list node directory show detail > /tmp/old_nodes.txt
      Verify that the results include an entry for APM_Node. For example:
      Node 1 entry:
      Node name                      = APM_NODE
      Comment                        =
      Directory entry type           = LOCAL
      Protocol                       = TCPIP
      Hostname                       = 9.42.13.123
      Service name                   = 50000
      Remote instance name           =
      System                         =
      Operating system type          = None
    3. Uncatalog APM_Node.
      db2 uncatalog node apm_node
      The following message is displayed:
      DB20000I  The UNCATALOG NODE command completed successfully.
    4. Recatalog APM_NODE and specify the new IP address or host name of the DB2 server.
      db2 catalog tcpip node APM_NODE remote new_db2_server_name server service_name
      Where service_name is the service name that was returned in step 4b. The following message is displayed:
      DB20000I  The CATALOG TCPIP NODE command completed successfully.
    5. List the node directory to verify that the APM_NODE entry refers to the new IP address or host name of the DB2 server.
      db2 list node directory show detail
      A message similar to the following message is displayed:
      Node x entry:
      Node name                      = APM_NODE
      Comment                        =
      Directory entry type           = LOCAL
      Protocol                       = TCPIP
      Hostname                       = new_db2_server_name
      Service name                   = 50000
      Remote instance name           =
      System                         =
      Operating system type          = None
    6. Connect to the WAREHOUS database. The example uses the default password.
      db2 connect to warehous user itmuser using db2Usrpasswd@08
      A message similar to the following message is displayed:
      Database Connection Information
      Database server        = DB2/LINUXX8664 10.5.5
      SQL authorization ID   = ITMUSER
      Local database alias   = WAREHOUS
  5. Update the database URLs in the Central Configuration Service.
    1. Start the Kafka Message Broker.
      apm start kafka
    2. Go to the Kafka bin directory.
      cd /opt/ibm/kafka/bin
    3. Connect to Apache Zookeeper.
       ./zkCli.sh -server localhost
    4. Retrieve the current setting for the URL of the prefetch database.
      get /systemconfig/com.ibm.tivoli.ccm.saas.prefetch/DB_URL
      The get request will return a JSON string similar to the following string.
      {"duplicated":false,"uivisibility":false,"encrypted":false,
      "readonly":false,"datatype":"STRING","service":"com.ibm.tivoli.ccm.saas.prefetch",
      "name":"DB_URL","value":"jdbc:db2:\/\/old_db2_host_name:50000\/WAREHOUS","cfgrequired":true,
      "uiorder":0}
    5. Update the URL of the prefetch database. Create a copy of the string that was returned in step 5d. Change the IP address in the URL to the new host name or IP address of the DB2 server.
      set /systemconfig/com.ibm.tivoli.ccm.saas.prefetch/DB_URL
      {"duplicated":false,"uivisibility":false,"encrypted":false,"readonly":false,
      "datatype":"STRING","service":"com.ibm.tivoli.ccm.saas.prefetch",
      "name":"DB_URL","value":"jdbc:db2:\/\/new_db2_host_name:50000\/WAREHOUS",
      "cfgrequired":true,"uiorder":0}
      Note: Enter the set command on a single line.
    6. Retrieve the current setting for the URL of the Datamart database.
      get /systemconfig/com.ibm.tivoli.ccm.datamart/dburl
      The get request will return a JSON string similar to the following string.
      {"duplicated":false,"uivisibility":false,"encrypted":false,
      "readonly":false,"datatype":"STRING","service":"com.ibm.tivoli.ccm.datamart",
      "name":"dburl","value":"jdbc:db2:\/\/old_db2_host_name:50000\/DATAMART",
      "cfgrequired":false,"uiorder":1000}
    7. Update the URL of the Datamart database. Create a copy of the string that was returned in step 5f. Change the IP address in the URL to the new host name or IP address of the DB2 server.
      set /systemconfig/com.ibm.tivoli.ccm.datamart/dburl
      {"duplicated":false,"uivisibility":false,"encrypted":false,
      "readonly":false,"datatype":"STRING","service":"com.ibm.tivoli.ccm.datamart",
      "name":"dburl","value":"jdbc:db2:\/\/new_db2_host_name:50000\/DATAMART","cfgrequired"
      :false,"uiorder":1000} 
      Note: Enter the set command on a single line.
    8. Stop the Kafka Message Broker.
      apm stop kafka
  6. Update the SCR backend configuration.
    1. Output the configuration of SCR to your display.
      install_dir/ccm/SCR/XMLtoolkit/bin/scrdbconfig.sh -display
      Output similar to the following output is displayed:
      DL_DBManager.ObjectURL = jdbc:db2://localhost:50000/SCR32
      DL_DBManager.Driver = com.ibm.db2.jcc.DB2Driver
      DL_DBManager.Type = DB2
      DL_DBManager.Schema = TBSMSCR
    2. Update the host name in the URL. Enter:
      install_dir/ccm/SCR/XMLtoolkit/bin/scrdbconfig.sh
      -update -t DB2 -h new_db2_server_name -d SCR32 -p port
      Where -d is the name of the SCR database that is displayed in the URL that is returned in step 6a.
    3. To verify that SCR can connect to the DB2 server, enter:
      install_dir/ccm/SCR/XMLtoolkit/bin/scrdbconfig.sh -test
      A message similar to the following message is returned.
       GTMCL5277I: Connection established with localhost.
  7. Reconfigure the JDBC URL of the Summarization and Pruning agent. Enter:
    install_dir/sy/bin/itmcmd config -A sy
    Follow the onscreen prompts and accept the default values. For the JDBC URL, copy the default value and change the current IP address to the new host name or IP address of the DB2 server.
    Agent configuration started...
    Edit "Warehouse Summarization and Pruning Agent" settings? 
    [1=Yes, 2=No ] (default is: 1): 1
    
    Database Type:
    Choose the database type
    
    Database Type
    Database [ 1=DB2, 2=Oracle, 3=Microsoft SQL Server ] (default is: 1):
    
    Sources :
    Sources Details
    
    Fully qualified paths to JDBC JAR files (comma separated)
    JDBC JARs List (default is: /opt/ibm/db2/V10.5/java/db2jcc.jar,
    /opt/ibm/db2/V10.5/java/db2jcc_license_cu.jar):
    The Warehouse JDBC URL
    JDBC URL (default is: jdbc:db2://localhost:50000/WAREHOUS):jdbc:db2://new_host_name:50000/WAREHOUS
    The Warehouse JDBC Driver
    JDBC Driver (default is: com.ibm.db2.jcc.DB2Driver):
  8. Update the db2.hostname property in the install_dir/ccm/properties/install.properties file to use the new IP address or host name.
  9. Start the Performance Management server. Enter:
    apm start_all

Results

The Performance Management server components are updated to use the new IP address or host name of the remote DB2 server.