Checking current latency status

Shadow tables might not be used in the query plan for a statement when latency is out of date.

Procedure

To check the current latency status:

Compare the values in the SYSTOOLS.REPL_MQT_LATENCY table with the current time stamp by running the following query:
SELECT
  COMMIT_POINT, DELAY_OFFSET,
  int( CURRENT TIMESTAMP - 
      (timestamp('1970-01-01') + (COMMIT_POINT - DELAY_OFFSET) seconds
       + CURRENT TIMEZONE
      )) as LATENCY
  FROM SYSTOOLS.REPL_MQT_LATENCY;
Sample output is as follows:
COMMIT_POINT         DELAY_OFFSET         LATENCY
-------------------- -------------------- -----------
          1405089689                    0          28

  1 record(s) selected.
Use the following information to interpret the query results:
  • If the latency table has a row with the value 0 in the COMMIT_POINT column, InfoSphere® CDC is not sending latency information to Db2®, or InfoSphere CDC cannot access the table. One or more of the following conditions might be the reason:
    • If the latency table does not exist but the maintain_replication_mqt_latency_table parameter is set to true, the subscription cannot start. Create the SYSTOOLS.REPL_MQT_LATENCY table and then start the subscription.
    • If InfoSphere CDC was started when the maintain_replication_mqt_latency_table registry parameter was set to false, InfoSphere CDC does not send latency information to Db2. To fix this issue, stop the subscription, set the maintain_replication_mqt_latency_table parameter to true, and then restart the subscription.
    • The InfoSphere CDC user ID does not have the permissions that are required to update the latency table.
    • The table space that contains the latency table is not in a state where it can be updated. For example, the latency table cannot be updated if it is in backup pending state.
  • If the calculated LATENCY is large but DELAY_OFFSET is small, replication might be stopped, or the table might not be accessible.
  • If the value of DELAY_OFFSET is large or increasing, InfoSphere CDC might be struggling to keep up with changes in the row-organized source table.