Steps for Replicating Using One-way Mirroring

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

One-way mirroring provides a continuous update of a replicated table based on changes to the source database that have been recorded in the database server log. Typically, this involves an initial refresh operation, as described above, to set up the target table. Then you can define the replication settings to check the transaction log on the source database at regular intervals. Any changes found in the log are applied to the target database.

1. Set Up Source Database Connection

  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.

  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.

  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. 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 to launch the 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 Enable Transactional Replication 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 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.

  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. Create a target table once the wizard is complete.

  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. In the Select Source Connection screen, the source table information has already been provided.

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

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

  5. The target connection details have been provided. Change the table name if needed.

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

  7. 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.

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

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

  10. Click Next to display the Actions screen.

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

  12. 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.

  13. Click Next to view a summary.

  14. Click Finish to create the target table.

  15. 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. 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 Continuous Mirroring.

  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.

  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 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.

  18. Click Next to go to the Scheduling screen.

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

  20. 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.

  21. 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 mirroring process where only incremental changes will be replicated.

  22. Go to the Mirroring Schedule tab.

  23. 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, chooseSyniti 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.