Data Replication

  • 1.  CDC Remote Source Db2 z/os lock on database

    Posted Fri October 16, 2020 06:46 AM
    So overnight, CDC Capture caused one of our batch utility jobs to abend because of contention. CDC would have had to held on to the lock for a while to have caused a utility timeout.
    Under what circumstances does CDC take lock on a source database?
    Thank you.

    ------------------------------
    Manas Dasgupta
    ------------------------------


    #DataReplication
    #DataIntegration


  • 2.  RE: CDC Remote Source Db2 z/os lock on database

    Posted Fri October 16, 2020 01:29 PM
    Thanks for reaching out, Manas! I've reposted your question in the Db2 for z/OS Community as well to get some extra eyes on it.

    ------------------------------
    Isaiah Brown
    ------------------------------



  • 3.  RE: CDC Remote Source Db2 z/os lock on database

    Posted Thu October 22, 2020 02:36 PM
    Hello

    CDC remote source has multiple JDBC connections to Db2 for zOS active.
    One of the connections makes queries to the Db2 metadata catalog for purposes of keeping accurate note of fields of in-scope tables.
    One connection per "log reader", this connects to the native code library deployed and linked to Db2 stored procedure which reads the Db2 log via IFI306 API.

    Neither of these connections would create long term locks.

    One item that can lock the database briefly is the connection that enables logging via Db2 "ALTER DATA CAPTURE CHANGES" when adding a table to the list of in-scope tables.

    Another lock is during refresh, CDC will request a brief lock to obtain log position, this rarely leads to long lasting locks, but can in some circumstances wait for database activity to be more quiet due to the requirement of Db2 to enable logging.

    Please advise if you already received assistance from IBM support via a ticket.

    ------------------------------
    Glenn Steffler
    ------------------------------



  • 4.  RE: CDC Remote Source Db2 z/os lock on database

    Posted Thu October 29, 2020 09:08 AM

    Glenn:

    Thanks for your response.

    So, there's a open ticket on this since Oct 18th. The utility job has been failing every night.

    There're no tables added to replication (so no ALTER DATA CAPTURE..) at that time of the night and there are no REFRESHes done at that time of the night. It appears that under certain circumstances the logreader thread is failing to COMMIT.

    Thanks.

     

     

     






  • 5.  RE: CDC Remote Source Db2 z/os lock on database

    Posted Fri October 30, 2020 10:45 AM

    Interesting, I know an APAR that was issued for the case of log reader holding long running transactions.

    Release Notes for IDR 11.4 for Db2 for z/OS Remote Source

    specifically :

    September 27, 2019

    IDR 11.4.0.2-5506

    Enhancements in IDR 11.4.0.2-5506 for Db2 for z/OS remote source

    • IIDR now supports Turkish EBCDIC CCSID 1026.
    • The log reader now commits periodically to avoid holding Db2 locks indefinitely. A new parameter, mirror_log_read_commit_interval_seconds, is available to configure the log reader commit interval.


    ^ please confirm you have a newer release than Sept 2019.

    ------------------------------
    Glenn Steffler
    ------------------------------