Home / Repstance User Guide / 5. REPLICATION CONFIGURATION / Basic Replication Configuration / Example of basic replication configuration

Example of basic replication configuration

 

 

The following example demonstrates how to setup simple DML and DDL replications between two MS SQL Server databases for all objects located in the dbo schema using repcli tool:

repcli>prepare database=source dbtype=mssql server=source.repstance.com port=1433 user=ds password=secret dbname=sdemo
[Completed]: Database [source.repstance.com:1433,sdemo] has been prepared

 

repcli>prepare database=target dbtype=mssql dbtype=mssql server=target.repstance.com port=1433 user=ds password=secret dbname=tdemo
[Completed]: Database [target.repstance.com:1433,tdemo] has been prepared

 

repcli>validate  database=source dbtype=mssql server=source.repstance.com port=1433 user=ds password=secret dbname=sdemo
[Valid]: Database SDEMO is valid

 

repcli>validate database=target dbtype=mssql server=target.repstance.com port=1433 user=ds password=secret dbname=tdemo
[Valid]: Database TDEMO is valid

 

repcli>prepare process=capture dbtype=mssql id=1 name=rep1 server=source.repstance.com port=1433 user=ds password=secret dbname=sdemo dmlinclude=dbo.% ddlinclude=dbo.%
[Completed]: Capture 1 has been added

 

repcli>validate process=capture id=1
[Valid]: Capture process 1 is valid

 

repcli>run process=capture id=1
[In Process]: Command [RUN] has been sent. Use [status] command to monitor the Capture 1 process

 

repcli>prepare process=apply id=1 dbtype=mssql capturename=rep1 server=target.repstance.com port=1433 user=ds password=secret dbname=tdemo repuser=1
[Completed]: Apply 1 has been added

 

repcli>validate process=apply id=1
[Valid]: Apply process 1 is valid

 

repcli>run process=apply id=1
[In Process]: Command [RUN] has been sent. Use [status] command to monitor the Apply 1 process

 

repcli>status
Capture Process 1, Name: rep1, DB: sdemo, Server: source.repstance.com
  RUN (In Process), Waiting for Transactions
    Last Source DB Change : 2019/02/25 21:13:00.173 UTC (0x00000044000002AE0004)
    Last Captured DB Change : 2019/02/25 21:13:00.173 UTC (0x00000044000002AE0004)
  Total since  2019/02/25 21:10:00.983 UTC (0x000000440000020A0004):
    Processing the Transactions :  00:00:05.289
    Waiting for Transactions    :  00:02:44.396
    Average Speed (ops)   :  1.134
    Transactions: 6 (DDL: 0,  Delete: 3,  Insert: 3,  Update: 0)
Apply Process 1, Transactions Provider (Capture): rep1, DB: tdemo, Server: target.repstance.com
  RUN (In Process), Waiting for Transactions
    Last Source DB Change  : 2019/02/25 21:13:00.173 UTC (0x00000044000002AE0004)
    Last Applied DB Change : 2019/02/25 21:13:00.173 UTC (0x00000044000002AE0004)
    Lag                    :  00:00:00.000
  Total since  2019/02/25 21:13:00.150 UTC (0x00000000000000000001):
   Processing the Transactions :  00:00:02.065
   Waiting for Transactions    :  00:00:08.284
   Average Speed (ops)   :  2.905
   Transactions: 6 (DDL: 0,  Delete: 3,  Insert: 3,  Update: 0)

 

 
On this page