You were redirected to the closest matching page. If this looks correct, please consider bookmarking it for future reference.

Table of Contents

Search

  1. Preface
  2. Data Replication Overview
  3. Installing Data Replication
  4. Preparing Source and Target Systems
  5. Replication Basic Concepts
  6. InitialSync Processing
  7. Extractor and Applier Processing
  8. DDL Replication
  9. Recovery and Checkpoint Processing
  10. Configuring the Server Manager
  11. Creating Replication Configurations in the Data Replication Console
  12. Managing Replication Configurations
  13. Running Data Replications
  14. Configuring Selected Replication Types
  15. Monitoring Data Replication
  16. Maintaining the Replication Environment
  17. Troubleshooting
  18. Data Replication Files and Subdirectories
  19. Data Replication Runtime Parameters
  20. InitialSync, Extractor, and Applier Command Line Parameters
  21. Server Manager Command Line Parameters
  22. Updating Configurations in the Replication Configuration CLI
  23. DDL Statements for Manually Creating Recovery Tables
  24. Sample Scripts for Enabling or Disabling SQL Server Change Data Capture
  25. Glossary

Data Visibility Across Multiple Applier Threads

Data Visibility Across Multiple Applier Threads

Applier thread 1 runs post-apply SQL statements or stored procedures before the main Applier thread commits the data across all of the Applier threads. Consequently, Applier thread 1 can process only the data that was committed during previous apply cycles and the change data that Applier thread 1 applied to the target during the current apply cycle. Applier thread 1 cannot process change data that other Applier threads applied to the target during the current apply cycle.
Some target databases provide mechanisms for reading uncommitted data that was loaded by multiple threads.
For Teradata targets, you can use the LOCK TABLE FOR ACCESS clause to ensure that the post-apply SQL statements or stored procedures process change data that other Applier threads applied to the target during the current apply cycle.
The LOCK TABLE clause is a part of the DML SQL command. It is not a separate statement.
The following SQL statement inserts the total number of records in the tgt_db1.tgt_tab target table and the current timestamp into the tgt_db1.stat table:
LOCK TABLE tgt_db1.tgt_tab FOR ACCESS INSERT INTO tgt_db1.stat(COUNTER,LOAD_TIME) SELECT count(*), current_timestamp(0) from tgt_db1.tgt_tab;
The total number of records includes the change data that was loaded to this table by all of the Applier threads during the current apply cycle even though this data is not committed yet.

0 COMMENTS

We’d like to hear from you!