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

Manually Editing Target Column Names in an SQL Script

Manually Editing Target Column Names in an SQL Script

If you have source columns with long column names that exceed the length limit that the target database allows, you can edit the column names in an SQL script that you use to generate the target tables. After you run this script, you can generate the audit log tables based on the target table schema if you require these tables for Merge Apply processing or for InitialSync with the Bulk Copy Program (BCP) processing of SQL expressions in SQL Apply mode for Microsoft SQL Server targets.
Because the source and target column names do not match, the Data Replication Console cannot map columns based on column names. You must manually define column mappings for the generated tables.
For example, in the SQL script, replace the TOTAL_NUMBER_OF_MEDICAL_CLAMPS target table name with TTL_NUM_OF_MED_CLAMPS. Then generate an audit log table based on the target table schema and use the default suffixes _OLD and _NEW for the before-image and after-image columns. The Data Replication Console creates the TTL_NUM_OF_MED_CLAMPS_OLD and TTL_NUM_OF_MED_CLAMPS_NEW columns. Map the TOTAL_NUMBER_OF_MEDICAL_CLAMPS source column to the TTL_NUM_OF_MED_CLAMPS target column.
  1. Create a script for generating regular target tables and save it on the local file system.
  2. Open the generated script in a text editor and replace the long column names with shorter names.
    Ensure that you can append the before image and after image suffixes that are specified on the
    Runtime Settings
    >
    Calculated Columns
    view to new names without exceeding the name length limit of the target database.
  3. Save the edited script.
  4. Run the script to generate target tables.
  5. Generate the audit log tables based on the target table schema.
  6. On the
    Map Tables
    tab, manually map the source columns to the corresponding target columns.
  7. Save the configuration.

0 COMMENTS

We’d like to hear from you!