Steps for Replicating with Synchronization

Set up source database connection>Enable transactional replication>Set up target database connection>Create a target table>Enable target transactional replication>Define the Replication>Run the Replication

1. Set Up Database Connections

  1. Make sure you have database connections via a .NET data provider to the supported databases for source database tables and target database tables.

  2. Start the Management Center.

    Syniti Data Replication provides a default database (Microsoft SQL Server CE) for your metadata, all the information that Syniti DR needs to store about your replication setup.

  1. In the Metadata Explorer, expand the metadata node to view the Sources and Targets nodes.

    For tables involved in a synchronization, both tables serve as source and target tables. Changes to Table A (source) can cause Table B to be updated (target), but changes to Table B (source) can also cause Table A (target) to be updated. When defining a synchronization in Syniti DR, you need to specify one connection as the source connection and one connection as the target connection although they will both be used for source and target operations. Note that if the replication involves tables that have not yet been created, you should set the connection for the new tables as the target connection so that you can use Syniti DR to create the tables based on tables defined in the source connection.

  2. Select the Sources node.

  3. From the right mouse button menu, choose Add New Connection.

  4. In the Add Source Connection Wizard, follow steps to add a connection string and test the connection to the database.
    Check the Supported Provider List in the Help Center before entering a value in the  Assembly field.

    Note that the login/user ID that you provide must be unique to Syniti DR. It should not be used for any transactions occurring in either database involved in the synchronization. Syniti DR does not replicate transactions by the user you specify in this connection. This user ID is used by Syniti DR during synchronization to read the database logs and perform the synchronization operations. Therefore, any transactions found in the logs with this user ID are not replicated as part of the synchronization data.

  5. In the Select Tables screen, choose the tables that you plan to replicate.

  6. In the Actions screen, check the option Launch the Enable Transactional Setup Wizard.

  7. Complete the wizard. 

2. Enable Transactional Replication

This section assumes you have checked the Source Connection wizard option to launch the Enable Transactional Replication wizard. If not, to open the wizard from the Management Center, choose the connection in the Metadata Explorer, then right-click to choose Transactonal Setup > Enable...

In the Enable Transactional Replication wizard:

  1. Select the type of transactional replication to use. The options depend on the source database and can include log reader, log server agent, triggers, plus log reader API (for IBM Db2 for i only)

  2. Click Next to enter the log settings. The fields and appropriate values depend on the database and log type.
  3. Click Next to verify your settings against the source connection to the database. If any information is missing, you will not be able to proceed.
  4. In the Actions screen, check the option Launch Add Target Connection wizard.

  5. Click Next to review your changes.

  6. Click Finish to complete the wizard.

The source connection is now set up for transactional replications.

3. Set Up Target Database Connection

This section assumes you have checked the Add Target Connection wizard option to launch the Add Target Connection wizard. If not, to open the wizard from the Management Center, choose Targets in the Metadata Explorer, then right-click to choose Add New Connection...

  1. In the Add Target Connection Wizard, follow steps to add a connection string and test the connection to the database. Check the Supported Provider List in the Help Center before entering a value in the  Assembly field.

    Note that the login/user ID that you provide must be unique to Syniti DR. It should not be used for any transactions occurring in either database involved in the synchronization. Syniti DR does not replicate transactions by the user you specify in this connection. This user ID is used by Syniti DR during synchronization to read the database logs and perform the synchronization operations. Therefore, any transactions found in the logs with this user ID are not replicated as part of the synchronization data.

  2. Choose the tables to which you plan to replicate.
    If the table does not exist, continue to  the next screen without selecting a table.

  3. Complete the wizard.

4. Create a Target Table

If the target table does not exist, use the Create Target Table wizard to create the table.

  1. In the Metadata Explorer, drag the source table to the target connection to open the Create Target Table wizard.
    The Select Source Connection screen is already filled out with the table you selected.,
  2. If you want more information about the table before proceeding, click Open Table....

  3. Click Next to go to the Select Target Connection screen.
    The screen fields have already been completed with the target connection details.

  4. Click Next to go to the Define Columns screen.

  5. Review the columns that will be created in the target table. You can add or remove columns as well as designate one or more columns as a primary key.

  6. When you have finished editing the target table columns, click Next to go to the SQL Script screen.

  7. If necessary, edit the SQL script that generates the table.

  8. Click Next to display the Actions screen.

  9. To create additional tables, check the Launch Create Target Table wizard option.
    This opens another Create Target Table wizard when this wizard is complete.

  10. To go directly to creating a replication once this wizard is complete, check Launch Create Replication wizard option.
    This opens the Replication wizard when the Create Target Table wizard is complete.

  11. Click Next to view a summary.

  12.  Click Finish to create the target table.

  13. Note that the new table is not automatically displayed in the Metadata Explorer. Click Yes to add the newly created table to the list of target tables in the Metadata Explorer.

5. Enable Target Transactional Replication

  1. Choose the target connection in the Metadata Explorer, then right-click to choose Transactional Setup > Enable...
  2. In the Enable Transactional Replication wizard, select the type of transactional replication to use. The options depend on the source database and can include log reader, log server agent, triggers, plus log reader API (for IBM Db2 for i only)

  3. Click Next to enter the log settings. The fields and appropriate values depend on the database and log type.

  4. Click Next to verify your settings against the source connection to the database. If any information is missing, you will not be able to proceed.

  5. In the Actions screen, check the option Launch Create Replication wizard.

  6. Click Next to review your changes.

  7. Click Finish to complete the wizard.

The target connection is now set up for synchronization with the source database.

6. Define the Replication

This section assumes you have checked the Create Replication wizard option to launch the Create Replication wizard. If not, to open the wizard from the Management Center, choose the table you want to replicate in the Metadata Explorer, then right-click to choose Replication > Create New Replication...

  1. In the Define Replication Type screen, type a name to identify the replication.

  2. Optionally provide a description of the replication.

  3. In the Replication Mode area, choose Synchronization.

  4. Click Next to go to the Select Source Connection screen.

  5. Choose the source name from the drop-down list that includes all the source connections you have created.

  6. Choose the table that you want to replicate from the drop-down list.

  7. If you want more information about the table before proceeding, click Open Table....

  8. Click Next to go to the Source Log Info screen.

    The first two fields on this screen depend on the source database you are using. In this explanation, we assume you are using IBM Db2 for i (iSeries or AS/400). Check the help for the Replication Wizard for details on the other databases.

    The Journal field is automatically filled in by retrieving the information from Db2 for i. The Receiver field will be automatically filled in after setting the Transaction ID. You do not need to modify these fields. However, if the library that you have specified as a source is not journaled, you will need to ask your system administrator to journal the library.

  9. In the Transaction ID field, click Read to open the Read Point dialog.

  10. Choose either the current transaction or a transaction ID based on a time and date.

  11. Click OK to add the value to the Source Log Info screen.

  12. Set the value of the Read Interval field to the frequency with which you want Syniti DR to check the transaction log for new events to mirror.

  13. Click Next to go to the Select Target Connection screen.

  14. Choose a target source name from the drop-down list that includes all the target connections you have created in Syniti DR.

  15. Choose the table to which you want to replicate from the drop-down list.
    If no tables are listed, you need to exit the wizard and add or create a target table.

  16. If you want more information about the table before proceeding, click Open Table....

  17. Click Next to go to the Target Log Info screen.

    Note: If you encounter a connection error at this stage, check that you have used the appropriate IDs for your connections by going to the Connection Properties dialog for your source and target connections. For SQL Server, you need a non system administrator login for replication and a system administrator login for accessing the transaction log.

  18. In the Transaction ID field, click Read to open the Read Point dialog.

  19. Choose either the current transaction or a transaction ID based on a time and date.

  20. Click OK to add the value to the Target Log Info screen.

  21. Set the value of the Read Interval field to the frequency with which you want Syniti DR to check the transaction log for new events to mirror.

  22. Click Next to go to the Set Mapping Info screen.

    Source and target columns with the same name are automatically mapped. You can also map columns by dragging the target column and dropping it on the source column, or you can map a column to an expression. For more information about mapping, check the Replication Wizard help topic. An alternative is to write a script to set mappings at runtime.

  23. Click Next to go to the Scheduling screen.

  24. Make sure the Enable Replication option is checked. This is required for the replication to run.

  25. Set a start time for the replication. The Start Time field indicates the time at which the Replication Agent will begin considering the replication for execution.

  26. Check the option to Execute Initial Refresh if needed.
    If you check this option, a full replication will be performed from the source to the target table, prior to starting the sychronization process where only incremental changes will be replicated. The initial refresh is always performed from the source connection to the target connection. Note that any transaction submitted during the time that the refresh is running might not be replicated. It is strongly suggested that you avoid updating the designated source and target tables until the refresh is done.

  27. Go to the Mirroring Schedule tab.

  28. Select how you want to run the replication:

    • Run Continuously: the transaction log will be checked for changes to the table using the frequency that you specified on the Set Log Info tab. Any changes will be replicated to the target table.

    • Schedule Interruptions: the replication process will run as above, except for interruptions specified when you click the Schedule button in the Scheduler dialog.

  1. Click Next to go to the Summary screen.

  2. Click Finish to complete the wizard.

4. Run the Replication

If you installed The Replication Agent as a service during setup, you just need to start the service using the Service Monitor program in the Windows Notification Area.

The replication that you have scheduled should start at the specified time. Use the Replication Monitor tab in the Management Center to track the progress of the replication.

If you would like to install the Replication Agent as a service:

  • From the Windows Desktop menu, choose Syniti Data Replication, then Service Installer.

  • Manage the service from the Service Monitor program (located in the Windows Notification Area , or on the Windows menu under Syniti Data Replication).

  • Use the Replication Monitor tab in the Management Center to track the progress of the replication.

To run the Replication Agent interactively:

  • In the Windows Notification Area, select the Service Monitor icon.

  • From the right mouse button menu, choose Replication Agent, then Start then Application.

    The replication that you have scheduled should start at the specified time.

  • Use the Replication Monitor tab in the Management Center to track the progress of the replication.