Db2 target database in BACKUP PENDING state after upgrade

After upgrading the Db2 target database, the database is in BACKUP PENDING state.

Symptoms

The target Db2 database is in BACKUP PENDING state. In this state, the target database cannot accept connection requests, which means that Data Gate functions cannot be executed. The BACKUP PENDING state is indicated by an error message in the Data Gate log file, which is similar to the following example:

57019 -1116 DB2DG001 [IBM][CLI Driver] SQL1116N A connection to or activation of 
database "DB2DG001" failed because the database is in BACKUP PENDING state. SQLSTATE=57019

Causes

If you followed the instructions in Changes to the target database, the connecting instance initializes the target database with a configuration setting of LOGARCHMETH1=OFF. However, you must repeat this step before an update of the target database. If you forget it, log archiving is re-enabled, which brings the Db2 target database into BACKUP PENDING state.

Resolving the problem

To remove the BACKUP PENDING state from the Db2 target database, follow these steps:
  1. From the command-line of the machine where Cloud Pak for Data is installed, access the container of the Db2 target instance:
    oc exec -it ${DB2U_POD_NAME} -n ${PROJECT_CPD_INST_OPERANDS} su - db2inst1
    where:
    ${DB2U_POD_NAME}
    Is the name of the Db2 server pod.
    ${PROJECT_CPD_INST_OPERANDS}
    Is the name of the project that the Db2 server pod is running in.
  2. Run the following command to remove the BACKUP PENDING state:
    db2 update db cfg for bludb using LOGARCHMETH1 OFF