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

Generating Target Tables and Audit Log Tables Based on Source Table Schema

Generating Target Tables and Audit Log Tables Based on Source Table Schema

You can generate target tables and audit log tables based on source table schema.
Before you begin, open the configuration and connect to the source and target databases.
  1. Click
    Schema
    Generate Schema for the Target
    on the menu bar, or click the
    Generate Schema for the Target
    icon button on the Replication Configurations toolbar.
    The
    Generating Schema for the Target
    dialog box appears.
  2. Under
    Source/Target
    , verify that the
    Source
    option is selected.
  3. In the
    Schema/owner
    field, select the schema or owner name for the source tables that you want to use to generate the target tables.
    The tables that match the selected schema or owner name are listed under
    Tables
    .
    The following image shows an example list of tables that match a schema or owner name of SCOTT:
    The Generating Schema for the Target window displays a searchable list of tables for the selected source schema or owner.
  4. To filter the list of tables, in the
    Filter
    field, enter the first few letters of the source table names that you want to use for generating target tables. For case-sensitive filtering, enclose the filter value in double quotation marks.
    Only the tables that match the filter criteria are listed under
    Tables
    .
    At any time, you can click
    Refresh
    to refresh the schemas for the source and target databases.
  5. Select the tables to use for generating the target tables:
    • To select all listed tables, click
      Select All
      .
    • To select tables individually, select the
      Convert
      check box in the table row.
  6. Under
    Target
    , in the
    Database type
    list, select the target database type.
  7. In the
    Schema
    field, select a schema name for the target tables if the target database type is the one to which you are already connected and that is specified in the configuration. If you selected a different target database type in the
    Database type
    list, enter the correct schema name for the target tables manually.
    For Microsoft SQL Server targets, in the
    Owner
    field, select an owner for the target tables if you are already connected to the SQL Server target database. If you are connected to another type of target database but want to generate target tables for a SQL Server target, enter the owner name to use for the SQL Server target tables manually.
  8. If you use Audit Apply or Merge Apply mode and need to generate audit log tables on the target, select the
    Generate audit log tables
    check box. In the adjacent
    Audit tables suffix
    field, enter a suffix for the generated audit log table names.
    • For Merge Apply, enter the suffix that is specified for the
      Log table suffix for merge apply
      field on the
      Runtime Settings
      tab >
      Calculated Columns
      view.
    • For Audit Apply, you can enter any alphanumeric string as the suffix for the audit log table names. However, if you want to use the
      Map All
      or
      Wildcard map
      button to quickly map all of the audit log tables to the corresponding source tables, you must specify the suffix that is specified in the
      Log table suffix for merge apply
      field on the
      Runtime Settings
      tab >
      Calculated Columns
      view.
    The default suffix is _LOG.
    For Merge Apply mode, if you create a target table manually outside of the Data Replication Console, you must generate the audit log table based on the target table schema.
  9. To create the target tables, perform one of the following actions:
    • To generate a script with SQL CREATE TABLE statements, click
      Save
      . Then in the
      Save
      dialog box, save the generated script to a directory of your choice. You can run the script on the target system later to create the target tables.
    • To create the tables on the target immediately, click
      Run
      . You can perform this action only for the target type to which you are already connected.
      • If you cancel the Run operation while it is in progress, any tables that were already created on the target remain on the target. You can find the SQL CREATE TABLE statements for these tables in the %DBSYNC_HOME%/logs/ui/se.log file.
  10. Click
    Close
    .

0 COMMENTS

We’d like to hear from you!