Table of Contents

Search

  1. Preface
  2. Data Replication Overview
  3. Understanding Data Replication
  4. Sources - Preparation and Replication Considerations
  5. Targets - Preparation and Replication Considerations
  6. Starting the Server Manager
  7. Getting Started with the Data Replication Console
  8. Defining and Managing Server Manager Main Servers and Subservers
  9. Creating and Managing User Accounts
  10. Creating and Managing Connections
  11. Creating Replication Configurations
  12. Materializing Targets with InitialSync
  13. Scheduling and Running Replication Tasks
  14. Implementing Advanced Replication Topologies
  15. Monitoring Data Replication
  16. Managing Replication Configurations
  17. Handling Replication Environment Changes and Failures
  18. Troubleshooting
  19. Data Replication Files and Subdirectories
  20. Data Replication Runtime Parameters
  21. Command Line Parameters for Data Replication Components
  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

Flat File Generation and Format

Flat File Generation and Format

The flat files to which Data Replication writes change data use a format that is similar to the audit log table schema. To store the generated flat files, Data Replication creates a directory hierarchy that groups the flat files by apply cycle.
During each apply cycle, the Applier creates a cycle_
cycle_sequence_number
.work subdirectory in the flat-file directory that you specified when defining the flat-file target. In this subdirectory, the Applier creates the following files:
  • The schema.ini file that describes the schema and some settings for all of the target flat files.
  • A text (.txt) file for each mapped source table, which contains the extracted change data. The Applier names these .txt files based on the name of the source table.
The schema.ini file contains a section for each replicated source table. Each section lists a sequence of columns for the rows in the corresponding flat file. The following table describes the columns in the schema.ini file:
Column
Description
OP_TIME
The date and time of an operation
OP_CODE
The code for the operation type
OP_CMT_SCN
The commit SCN
OP_CMT_TIME
The commit time of the operation
OP_XID
The transaction ID
OP_NUM_IN_TX
The sequence number of an operation in a transaction
<source_column_name>
_OLD
The before value of the source column
<source_column_name>
_NEW
The after value of the source column
The schema file also includes the following settings:
  • ColNameHeader
    . Indicates whether the change data files include column headers. The Applier generates change data files without column headers.
  • Format
    . Describes the format of the change data files. The Applier uses a semicolon (;) to delimit column values.
  • CharacterSet
    . Specifies the character set that is used for change data files. The Applier generates change data files in the ANSI character set.
Do not edit the schema.ini file.
Each target flat file stores change data from a single source table and is named based on the source table name. For each operation that occurred on the source table, Data Replication adds a record to the flat file, which is similar to a row in the audit log table.

0 COMMENTS

We’d like to hear from you!