Troubleshooting DDL Replication Failure in Replication Agent for UDB

Troubleshoot errors when Replication Agent for UDB fails to replicate DDL commands for a newly created table.

If you create a new table, and if pdb_automark_tables is true, you must manually set the value of the table DATA CAPTURE option to DATA CAPTURE CHANGES in the same transaction. Otherwise, Replication Agent for UDB logs an error message in its system log, an exclusive NOCDCERRORTRC trace log for this event, and the name of the newly created table. To handle this situation, follow these steps to successfully replicate the new table:

  1. Mark the table identified in the NOCDCERRORTRC trace log in Replication Agent for UDB:
    pdb_setreptable ownername.tablename, mark, owner
  2. Create a table level replication definition in Replication Agent for UDB:
    rs_create_repdef ownername.tablename
  3. Create a table level subscription in the Replication Server with direct load materialization:
    create subscription subscription_name
    for repdef_name
    with replicate at replicateDS.replicateDB
    without holdlock
    direct_load
    user RAU_admin_username password RAU_admin_password
  4. Add the table to the database replication definition inclusion list in Replication Server:
    alter database replication definition database_repdef_name 
    with primary at primaryDS.primaryDB 
    add tables in files (ownername.tablename)
  5. After the table level subscription is validated in the Replication Server, drop the table level subscription in the Replication Server:
    drop subscription subscription_name 
    for repdef_name 
    with replicate at replicateDS.replicateDB 
    without purge
  6. Drop the table level replication definition in Replication Agent for UDB:
    rs_drop_repdef ownername.tablename
Related concepts
Replication Agent Instance Availability Monitoring
Primary Database Log Access
Replication Agent System Logs
Available Memory
Skipped DDL Commands
JVM Thread Dump
Related tasks
Verifying that a Primary Database Object Is Marked for Replication
Checking the Current Replication Agent Status
Using ra_statistics to Check Replication Agent Operations and Performance
Debugging LTL
Using Trace Filters