Avoiding table state ERROR as a result of a Db2 shutdown
After a shutdown of the target database service (Db2 or Db2 Warehouse), some of your Data Gate tables are in the ERROR state.
Symptoms
If you click the Table tab on the dashboard of your Data Gate instance, you can see that some of your tables are in the ERROR state, which means that you have to reload these tables.Causes
The shutdown of the target database service interrupts the last phase of the synchronization process (table-change-apply-process). As a consequence, affected tables are set to the ERROR state.Resolving the problem
If you know ahead of time that your target database service will be shut down, you can avoid the error state of your Data Gate tables, and thus also avoid a reloading of these tables. Follow these steps:
- Before you stop the target database service, open the dashboard of your
Data Gate instance, and stop synchronization
by clicking the following switch:

The switch must show an operation mode of Off:

Alternatively, you can go to the command-line of the Cloud Pak for Data control plane, and run the following commands on the data-gate-api container:
oc exec -it ${DG_POD} -c data-gate-api -n ${PROJECT_CPD_INST_OPERANDS} -- bash cd /head/clone-api/scripts sh stop_replication.sh ${CP4D_USERNAME} ${CP4D_PASSWORD} ${IAM_Integration}where:
- DG_POD
- Is the pod name of the Data Gate instance
- PROJECT_CPD_INST_OPERANDS
- Is the project name of the Cloud Pak for Data control plane and services
- CP4D_USERNAME
- Is the name that you use to log in to Cloud Pak for Data and to access the Data Gate UI
- CP4D_PASSWORD
- Is the password belonging to the login user name.
- IAM_Integration
- Is a value that indicates whether Cloud Pak for Data
has been integrated with the Identity Management Service. A value of
truemeans integrated;falsemeans not integrated.
- Stop the target database service (Db2 or Db2 Warehouse).
- Finish your maintenance work on the target database.
- Restart the target database service.
- On the dashboard of your Data Gate
instance, restart synchronization by clicking the switch so that it shows
On:

Alternatively, you can run the following commands:
oc exec -it ${DG_POD} -c data-gate-api -n ${PROJECT_CPD_INST_OPERANDS} -- bash cd /head/clone-api/scripts sh start_replication.sh ${CP4D_USERNAME} ${CP4D_PASSWORD} ${IAM_Integration}For a description of the parameters, see the list in step 1.