Enabling the Db2 Data Management Console for replication
If you deployed the Db2 Data Management Console before setting up replication, you must change two settings in the OpenShift® ConfigMap to point to the replication REST server so that you can use the DMC to activate and configure replication.
Procedure
-
Run the following command to find the instance identifier for the database where replication
was enabled:
oc get deployment | grep qrepThe result should be similar to the following example. The instance ID is the number before
-qrep:c-db2wh-1635813356945179-qrep 1/1 1 1 44h c-db2wh-1635814405003209-qrep 1/1 1 1 44h -
Run the following command to find the replication REST service name and REST internal port
number:
oc get svc | grep qrepIn the following example, for the database with instance ID
2408231724451616, the REST service name isc-db2wh-2408231724451616-qrep-svcand the REST internal port number is9444.oc get svc | grep qrep c-db2wh-2408231724451616-qrep-svc NodePort 172.30.136.105 <none> 9444:31833/TCP,1414:32475/TCP,1415:30399/TCP -
Open the ConfigMap in edit mode by running the following command:
oc edit cm instance_id -
In the
data.profile:line, add the service name and port number to the JSON. The following example shows the JSON with the values from Step 2 added:profile: '{"DB_IDENTITY_HASH":"995978196","URL":"jdbc:db2://c-db2wh-2408231724451616-db2u-engn-svc:50001/BLUDB","PROFILE_INIT":"true","collectionCred":{"isCollectionCred":"true","password":"jmN#481gc_LLP--3","refreshToken":"","securityMechanism":"9","user":"db2inst1"},"dataServerExternalType":"DASHDBAN","dataServerType":"DB2LUW","databaseName":"BLUDB","databaseVersion":"11.5.0","databaseVersion_VRMF":"11.5.6.0","dbUUID":"08decbef-0e6e-4338-887f-1b4167ecf117","host":"c-db2wh-2408231724451616-db2u-engn-svc","isInstPartitionable":"false","lastUpdatedTimeStamp":"1635909870271","name":"db2wh-2408231724451616","namespace":"","plan":"smp","port":"50001","qrepHost":"c-db2wh-2408231724451616-qrep-svc","qrepNodePort":"31703","qrepPort":"9444","sslCertLocation":"/opt/ibm-datasrvrmgr/Config/cpd-internal-tls/ca.crt","sslConnection":"true","timeZone":"0","timeZoneDiff":"0"}' - Save the ConfigMap file and wait 10 minutes for the changes to apply.