Data Replication

  • 1.  key columns

    Posted Wed March 16, 2022 08:19 AM
    we have cdc on linux and as on windows : latest version
    when creating a table mapping : we can specify use an index
    when selecting specifically the PK for this table, we can see the index columns
    when specifying/leaving autodetect we can not find back the index keys, not even in export subscr
    is it possible to find, which index keys are being used in that case or not ?
    this was the case when we had a subscr and dropped/created the pk again with additional column and wanted to verify that this new added column was taking into account


    ------------------------------
    Thanks for all answers
    Best Regards,
    Guy Przytula
    ------------------------------


    #DataIntegration
    #DataReplication


  • 2.  RE: key columns

    Posted Thu March 17, 2022 01:57 AM
    Hello Guy

    If you are using auto-detect, CDC algorithm will use best effort to determine the key columns used on your tables. Otherwise, we allow users to manually select the keys by choosing 'specify key' option.

    The advantage of auto-detect I suppose is that it prevents issues when the same table in different environments with the same primary keys, but using different PK constraint or UI names is mapped, and an attempt to export, copy, or run a generated CHCCLP script fails because the PK constraint or UI specified in the original environment is not found in the new environment.

    On the other hand specifying a primary key or UI a) ensures that CDC is not for some reason using an inappropriate index b) con-
    firms that the expected PK/UI exists

    Since auto-detect in implicitly dynamic, I do not see any way in a supported interface of determining which UI/PK CDC is using, apart from inspecting the CDC apply session in the database when the table has been updated by CDC. I suspect that the internal metadata will have this, but the method of interrogating the metadata directly is not documented, and subject to unpublicised
    change when any new build is installed

    There are some additional nuances - in Netezza PK and unique constraints can be defined but they are not enforced, and some OLAP oriented versions of DB2 only enforced PK/UI constraints when the DDL explicitly says say



    ------------------------------
    Robert Philo
    ------------------------------