Prepare Capture Process

The “prepare” Capture Process command is used to create new Capture Process.

The “prepare” command does not enable the Database to start capturing data on the configured objects, until the specified Capture Process runs (see chapters Run any Capture or Apply Processes for the details).

Parameter id is mandatory for the “prepare” command. All other parameters are optional. All parameters except the ”id" parameter can be changed using “alter” Capture Process command (see chapter Alter Process). The “name” parameter can be altered only in the case if it has not been provided earlier. 

Note – If there is another Capture Process, which has the same “id” or the same “name” then the “prepare” command will fail.

Depending on the Source RDBMS type the “prepare” command may utilise different set of the parameters:

The command can be invoked from repcli or via REST API or Web UI.

 

CLI Syntax

repcli prepare process=capture id=captureID \
dbtype={mssql|oracle} \
name=captureName \
[Source database connection parameters] \
[Source database specific parameters] \
autostart={0|1} \
debuglevel={0-15} \
ddlinclude=objectsMask ddlexclude=objectsMask \
dmlinclude=objectsMask dmlexclude=objectsMask \
loadinclude=objectsMask loadexclude=objectsMask \
map=mapID,mappingClause \
skipapply=skipapplyMask

 

REST API

  • Endpoint: https://repstance_url/configure/process
  • Method: POST
  • Header:
    • Content-Type: application/json
    • X-Token: token
  • Body:
    {
      "command":"prepare",
      "parameters":[
         ["process","capture"],
         ["id","captureID"],
         ["dbtype","{mssql|oracle}"],
         ["name","captureName"],
         ["password","password"],
         {Source database connection parameters},
         {Source database specific parameters},
         ["autostart","{0|1}"],
         ["debuglevel","{0-15}"],
         ["ddlinclude","objectsMask"],
         ["ddlexclude","objectsMask"],
         ["dmlinclude","objectsMask"],
         ["dmlexclude","objectsMask"],
         ["loadinclude","objectsMask"],
         ["loadexclude","objectsMask"],
         ["map=mapID","mappingClause"],
         ["skipapply","skipapplyMask"]
      ]
    }

Server response:

  • HTTP Status – status of the command, possible codes are:
    • 200 – if no error occurs
    • 422 – if error occurs
  • Body:
    {
     "Status":"{Failed|Completed}",
     "Message":"The command execution details"
    }

 

Web UI

 See How to prepare database in Web UI

 

Examples

The following example shows how to create Capture Process for the SQL Server database extracting all DML and DDL changes for any tables in the “dbo” schema: 

repcli prepare process=capture id=1 dbtype=mssql name=SQLServerCap1 server=10.10.10.1 port=1433 user=sa password=Passw0rd123 dbname=testDB dmlinclude=dbo.% ddlinclude=dbo.%

The following example shows how to create Capture Process for Oracle extracting DML changes for any tables in the “scott” schema using direct data mining mode:

repcli prepare process=capture id=2 dbtype=oracle name=ORACap2 connectiontype=ezconnect server=10.10.10.2 port=1521 servicename=ORA1 user=scott password=tiger dmlinclude=scott.% directlogmode=1