Upgrading your trial license for replication for Db2
You can upgrade your Db2 trial license for replication to a permanent license.
Procedure
-
Encode your Db2 license to base64
by running the following command:
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. -
Log in to your Db2 cluster and
use the command line interface (CLI) to get the name of your db2ucluster instance:
# oc get db2ucluster NAME STATE AGE Ready 1d db2-16360427332670605 # INSTANCE_NAME="db2-16360427332670605"
-
Edit the instance.
oc edit db2ucluster instance_name
-
In edit mode, locate the
license
key underspec
in the YAML file and add the encoded string from step 1 as a value key, as shown below:qrep: enabled: true infraHost: db2-cluster-hostname infraIP: db2-cluster-external-ip license: accept: true value: base64_encoded_qrep_permanent_license_string
-
Save and close the YAML file.
# oc edit db2ucluster instance_name db2ucluster.db2u.databases.ibm.com/db2-16360427332670605 edited
-
Scale down the replication pod to 0:
oc scale --replicas=0 deployment c-instance_name-qrep
-
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
-
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"