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 Db2uInstance or Db2uCluster (for IBM Software Hub
Versions prior to 5.2.0), and use the command line interface (CLI) to get the name of your
db2uinstance or db2ucluster instance:
For Db2uInstance custom resource type:
# oc -n <your_namespace> get db2uinstance NAME STATE AGE Ready 1d db2-16360427332670605 # INSTANCE_NAME="db2-16360427332670605"For Db2ucluster custom resource type:
# oc -n <your_namespace> get db2ucluster NAME STATE AGE Ready 1d db2-16360427332670605 # INSTANCE_NAME="db2-16360427332670605" -
Edit the Db2ucluster or Db2uInstance custom resource.
For Db2uInstance custom resource type:
oc -n <your_namespace> edit db2uinstance <instance_name>For Db2ucluster custom resource type:
oc -n <your_namespace> edit db2ucluster <instance_name> -
In edit mode, locate the
licensekey underspecin the YAML file and add the encoded string from step 1 as a value key, as shown below:For Db2uInstance custom resource type:
qrep: enabled: true infraHost: db2-instance-hostname infraIP: db2-instance-external-ip license: accept: true value: base64_encoded_qrep_permanent_license_stringFor Db2ucluster custom resource type:
qrep: enabled: true infraHost: db2-cluster-hostname infraIP: db2-cluster-external-ip license: accept: true value: base64_encoded_qrep_permanent_license_stringNote: Ensure that you use correct indentation and alignment in YAML files. -
Save and close the YAML file.
For Db2uInstance custom resource type:
# oc -n <your_namespace> edit db2uinstance instance_name db2uinstance.db2u.databases.ibm.com/db2-16360427332670605 editedFor Db2ucluster custom resource type:
# oc -n <your_namespace> 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"