Upgrading the trial license for replication in the Db2 Warehouse service

You can upgrade the trial license for replication in the Db2 Warehouse service to a permanent license.

About this task

Run the steps of this task on the Db2 Warehouse cluster host.

Procedure

  1. Log in to your Db2 Warehouse cluster host, scp your Replication license (not the Db2 Warehouse license) to the cluster host name, and generate the encode output by running the following commands:
    cd <replication_license_directory>
    LICENSE_KEY="./idr4a.lic"
    cat license_key | base64 | tr -d '\n'
    Save the encoded output, as you will add it to your YAML file later in this procedure.
  2. Use the OpenShift® command line interface (oc) to get the name of your db2ucluster instance:
    oc get db2ucluster
    An example output result looks like the following:
    
    NAME                          STATE   AGE            Ready   1d
    db2wh-16360427332670605
    
    Create an environment variable for the db2ucluster instance name by running the following command:
    INSTANCE_NAME="db2wh-16360427332670605"
  3. Edit the Db2U cluster instance YAML file.
    Note: The vi editor is used.
    oc edit db2ucluster ${INSTANCE_NAME}
  4. Inside Db2U cluster instance YAML file, locate the spec: > addOns: > qrep: > license: section, insert a key named value with the encoded replication license string as the key value:
    
    qrep:
          enabled: true
          infraHost: <db2-cluster-hostname>
          infraIP: <db2-cluster-external-ip>
          license:
            accept: true
            value: <base64_encoded_qrep_permanent_license_string>
  5. Save and close the YAML file.
    oc edit db2ucluster ${INSTANCE_NAME}
    An example output result looks like the following:
    db2ucluster.db2u.databases.ibm.com/db2wh-16360427332670605 edited
  6. Scale down the replication pod to 0:
    oc scale --replicas=0 deployment c-${INSTANCE_NAME}-qrep
  7. After the replication pod stops, scale up the replication pod to 1 for the new license to take effect:
    oc scale --replicas=1 deployment c-${INSTANCE_NAME}-qrep
  8. When the new replication pod is ready, verify the updated replication license:
    oc exec -it c-${INSTANCE_NAME}-<repl_instance_name> -- su - db2inst1 -c "/opt/ibm/db2/V11.5.0.0/adm/db2licm -l"