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.
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:
- Stop the Performance Management server. Enter:
apm stop_all
- 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.
- 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.
- Update the IP address values that are used in the Datamart cron jobs.
- On the Performance Management server,
source the db2apm profile.
. ~db2apm/sqllib/db2profile
- List the contents of the existing node directory.
Verify that the results include an entry for APM_Node. For example:db2 list node directory show detail > /tmp/old_nodes.txt
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
- Uncatalog APM_Node.
The following message is displayed:db2 uncatalog node apm_node
DB20000I The UNCATALOG NODE command completed successfully.
- Recatalog APM_NODE and specify the new IP address or host name of the DB2 server.
Where service_name is the service name that was returned in step 4b. The following message is displayed:db2 catalog tcpip node APM_NODE remote new_db2_server_name server service_name
DB20000I The CATALOG TCPIP NODE command completed successfully.
- List the node directory to verify that the APM_NODE entry refers to the new IP address or host
name of the DB2 server.
A message similar to the following message is displayed:db2 list node directory show detail
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
- Connect to the WAREHOUS database. The example uses the default password.
A message similar to the following message is displayed:db2 connect to warehous user itmuser using db2Usrpasswd@08
Database Connection Information Database server = DB2/LINUXX8664 10.5.5 SQL authorization ID = ITMUSER Local database alias = WAREHOUS
- On the Performance Management server,
source the db2apm profile.
- Update the database URLs in the Central Configuration Service.
- Start the Kafka Message Broker.
apm start kafka
- Go to the Kafka bin directory.
cd /opt/ibm/kafka/bin
- Connect to Apache Zookeeper.
./zkCli.sh -server localhost
- Retrieve the current setting for the URL of the prefetch database.
The get request will return a JSON string similar to the following string.get /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:\/\/old_db2_host_name:50000\/WAREHOUS","cfgrequired":true, "uiorder":0}
- 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. - Retrieve the current setting for the URL of the Datamart database.
The get request will return a JSON string similar to the following string.get /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:\/\/old_db2_host_name:50000\/DATAMART", "cfgrequired":false,"uiorder":1000}
- 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. - Stop the Kafka Message Broker.
apm stop kafka
- Start the Kafka Message Broker.
- Update the SCR backend configuration.
- Output the configuration of SCR to your display.
Output similar to the following output is displayed:install_dir/ccm/SCR/XMLtoolkit/bin/scrdbconfig.sh -display
DL_DBManager.ObjectURL = jdbc:db2://localhost:50000/SCR32 DL_DBManager.Driver = com.ibm.db2.jcc.DB2Driver DL_DBManager.Type = DB2 DL_DBManager.Schema = TBSMSCR
- Update the host name in the URL. Enter:
Where -d is the name of the SCR database that is displayed in the URL that is returned in step 6a.install_dir/ccm/SCR/XMLtoolkit/bin/scrdbconfig.sh -update -t DB2 -h new_db2_server_name -d SCR32 -p port
- To verify that SCR can connect to the DB2 server, enter:
A message similar to the following message is returned.install_dir/ccm/SCR/XMLtoolkit/bin/scrdbconfig.sh -test
GTMCL5277I: Connection established with localhost.
- Output the configuration of SCR to your display.
- Reconfigure the JDBC URL of the Summarization and Pruning agent. Enter:
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.install_dir/sy/bin/itmcmd config -A sy
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):
- Update the db2.hostname property in the install_dir/ccm/properties/install.properties file to use the new IP address or host name.
- Start the Performance Management server. Enter:
apm start_all