Refresh dmcuser password in Db2 Data Management Console after backup and restore in Data Virtualization

After you run a backup and restore, you might encounter errors in which security processing fails because of password invalidation.

Symptoms

The Data Virtualization user interface does not work after you back up and restore Data Virtualization.

Resolving the problem

Update the dmcuser password in the dmc secret to avoid user lock with multiple connections with an incorrect password.

  1. Change to the project where Data Virtualization pods are installed.
    oc project ${PROJECT_CPD_INST_OPERANDS}
  2. Log in to the Data Virtualization head pod.
    oc rsh c-db2u-dv-db2u-0 bash
  3. Switch to the Data Virtualization database instance owner db2inst1.
    su - db2inst1
  4. Get the new dmcuser password.
    [db2inst1@c-db2u-dv-db2u-0 - Db2U /]$ cat /secrets/dmcuserpwd/password
    cn0lBJpxrkOZHGi
  5. Exit the Data Virtualization pod and get the base64 encoded password, as shown in the following example:
    cn0lBJpxrkOZHGi[db2inst1@c-db2u-dv-db2u-0 - Db2U /]$ exit
    exit
    sh-4.4$ exit
    exit
    [root@api.ocp48fips-dv17-px02.cp.examplehost.example.com ~]# echo -n "cn0lBJpxrkOZHGi" |base64
    
    Y24wbEJKcHhya09aSEdpCg
  6. Edit the Data Virtualization profile secret that is used by Db2 Data Management Console. In this example, 163599355963946 is the Data Virtualization instance ID. Update data.password to the new encoded value generated in step 5.
    oc edit secret dv-163599355963946
  7. Delete the Db2 Data Management Console pods to reload the new password.
    oc delete pod ibm-dmc-1635993001184495-runsql-664497b94b-lkpls ibm-dmc-1635993001184495-dbapi-64d6d87b9c-qmqvd ibm-dmc-1635993001184495-monitor-0