Appendix D: Replication Agent for SAP HANA Command Line Interface

To run the Replication Agent for SAP HANA in the command line interface, save the deployment script of your replication model.

  1. Once the replication model is deployed, right-click it and select Save Deployment Script for <model_name> menu item.
  2. Browse to and select the destination directory.
  3. Specify the file name for the script and click Save.

You can use a text editor to open the deployment script file.

An example of a deployment script that configures, deploys, populates the tables selected for materialization, and starts the replication model :
call ra_add_prop(repname, CES2CES)
call ra_add_prop(primaryUser, CESSOURCE)
call ra_add_prop(replicatePassword, Sybase123)
call ra_add_prop(primaryURL, jdbc:sap://replinuxhana4.den2.sap.corp:30115/CESSOURCE)
call ra_add_prop(rollbackScanInterval, 5000)
call ra_add_prop(maxTasks, 10)
call ra_add_prop(replicateDBIsolationLevel, 2)
call ra_add_prop(repName, CES2CES)
call ra_add_prop(replicateUser, CESTARGET)
call ra_add_prop(ddlDropTable, false)
call ra_add_prop(handleDDL, false)
call ra_add_prop(primaryPassword, Sybase123)
call ra_add_prop(primaryDriverName, com.sap.db.jdbc.Driver)
call ra_add_prop(primaryDBIsolationLevel, 2)
call ra_add_prop(replicateSchema, CESTARGET)
call ra_add_prop(replicateHost, replinuxhana4.den2.sap.corp)
call ra_add_prop(builderType, TRANS_CDC)
call ra_add_prop(primarySchema, CESSOURCE)
call ra_add_prop(replicatePort, 30115)
call ra_add_prop(commitInterval, 100)
call ra_add_prop(replicateDriverName, com.sap.db.jdbc.Driver)
call ra_add_prop(replicateURL, jdbc:sap://replinuxhana4.den2.sap.corp:30115/CESTARGET)
call ra_add_prop(primaryHost, replinuxhana4.den2.sap.corp)
call ra_add_prop(cdcRetentionMinutes, 14400)
call ra_add_prop(forceCleanDeploy, false)
call ra_add_prop(primaryPort, 30115)
call ra_add_prop(materializationRetryTime, 60)
call ra_deploy()
call ra_add_table(CES2CES, HISTORY, HISTORY, create=true, replace=true, materialize=true, deferReplication=true)
call ra_add_table(CES2CES, CUSTOMER, CUSTOMER, create=true, replace=true, materialize=true, deferReplication=true)
call ra_add_table(CES2CES, DISTRICT, DISTRICT, create=true, replace=true, materialize=true, deferReplication=true)
call ra_add_table(CES2CES, OORDER, OORDER, create=true, replace=true, materialize=true, deferReplication=true)
call ra_add_table(CES2CES, WAREHOUSE, WAREHOUSE, create=true, replace=true, materialize=true, deferReplication=true)
call ra_add_table(CES2CES, ITEM, ITEM, create=true, replace=true, materialize=true, deferReplication=true)
call ra_add_table(CES2CES, STOCK, STOCK, create=true, replace=true, materialize=true, deferReplication=true)
call ra_add_table(CES2CES, NEW_ORDER, NEW_ORDER, create=true, replace=true, materialize=true, deferReplication=true)
call ra_add_table(CES2CES, ORDER_LINE, ORDER_LINE, create=true, replace=true, materialize=true, deferReplication=true)
call ra_start(CES2CES)

For command descriptions, see the Appendix E: Command Reference Table.