The following example demonstrates how to configure initial data synchronisation (Initial Load) before running the replication, for all table in the “HumanResources” schema from SQL Server to Oracle database. Initial Load will be configured not only to populate initial data set but to create any schema's tables that are missed in the Oracle database.
Note - The “HumanResources” user must exist in the Oracle database.
Run the following command to prepare SQL Server database as a Source:
[http://localhost:8796/] repcli>prepare database=source dbtype=mssql server=10.20.20.1 port=1433 user=sa password=xxx dbname=AdventureWorks2016 housekeeping=1
To prepare Oracle as a Target run the following command:
[http://localhost:8796/] repcli>prepare database=target dbtype=oracle connectiontype=ezconnect server=10.20.20.2 port=1521 servicename=ORADB user=admin password=xxx
See Prepare Source Database and Prepare Target Database for the details.
Run the following command to create “sql2ora” Capture Process (id=4).
[http://localhost:8796/] repcli>prepare process=capture id=4 dbtype=mssql server=10.20.20.1 port=1433 user=sa password=xxx dbname=AdventureWorks2016 name=sql2ora dmlinclude=HumanResources.% ddlinclude=HumanResources.% loadinclude=HumanResources.%:C autostart=1
The “dmlinclude” and “ddlinclude” are to specify tables for the DML and DDL replication.
The “loadinclude” parameter is used to specify list of the tables to be synchronised and the synchronisation method (see Initial Load). In this example “HumanResources.%” instructs that any tables ("%" means wildcard) in the “HumanResources” are to be reloaded, while “:C” specified that the table will be created on the Target database if it doesn't exist.
Run the following command to create Apply Process that to be consumed data from the “sql2ora” Capture Process:
[http://localhost:8796/] repcli>prepare process=apply id=4 dbtype=oracle connectiontype=ezconnect server=10.20.20.2 port=1521 servicename=ORADB user=admin password=xxx capturename=sql2ora ddlprocessing=map autostart=1
Note - For both processes we are using “autostart=1” parameter, that is to run the process once it's created or the Repstance Server is restarted.
The configuration is done. The processes should start automatically and once the initial load phase is completed the databases are to be in sync. You can monitor data migration and replication by using “status” and “report” commands.
Prev page:
Basic Replication ConfigurationNext page:
Multi-Target Replication Configuration