Home / Repstance User Guide / 7. COMMANDS TO BE USED / 7.4 Prepare Capture Process / 7.4.1 Prepare Capture Process for MS SQL Server Database

7.4.1 Prepare Capture Process for MS SQL Server Database

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"],
         ["name","captureName"],
         ["server","databaseHost"],
         ["port","databasePort"],
         ["user","username"],
         ["password","password"],
         ["dbname","databaseName"],
         ["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"
    }

CLI Syntax:

repcli prepare process=capture id=captureID \
dbtype=mssql name=captureName \
server=databaseHost port=databasePort \
user=username password=password \
dbname=databaseName autostart={0|1} debuglevel={0-15} \
ddlinclude=objectsMask ddlexclude=objectsMask \
dmlinclude=objectsMask dmlexclude=objectsMask \
loadinclude=objectsMask loadexclude=objectsMask \
map=mapID,mappingClause \
skipapply=skipapplyMask

The input parameters are:

  • process – The only appropriate value is capture
  • id – The Capture Process id
  • dbtype – The appropriate value is mssql
  • name – Name of the Capture Process
  • server – Host name or IP address of the database server
  • port – Database port
  • dbname – Database name
  • user – Database User name
  • password – Database User password
  • autostart – Determines if the Process must be run automatically, the possible values are:
    • 0 – do not run the Process automatically (default value)
    • 1 – to run the Process automatically
  • debuglevel – The level of debugging, possible values are 0-15, the default value is 0
  • ddlinclude – Mask of the DDL objects to be captured (see chapter 7.4.4 Capture Objects Specification for the details)
  • ddlexclude – Mask of the DDL objects to be skipped by the Capture Process (see chapter 7.4.4 Capture Objects Specification for the details)
  • dmlinclude – Mask of the DML objects to be captured (see chapter 7.4.4 Capture Objects Specification for the details)
  • dmlexclude – Mask of the DML objects to be skipped by the Capture Process (see chapter 7.4.4 Capture Objects Specification for the details)
  • loadinclude – Mask of the objects to be included into the Initial Load (see chapter 7.4.5 Initial Load for the details)
  • loadexclude – Mask of the objects to be skipped during Initial Load (see chapter 7.4.5 Initial Load for the details)
  • map – The set of the parameters to determine objects’ transformation (see chapter 7.4.6 Objects Mapping and Possible Transforms for the details)
  • skipapply – Used to define the behavior of a Capture Process when extracting data, which was produced by Apply Processes as part of the “loop-back” control function, in that, this Capture Process will extract or ignore the data. The Apply Processes to be skipped are specified by ids separated by comma. In order to specify all Processes the “all” value to be used. In order to avoid skipping any Apply Processes the “none” value to be used. The default value is “all”.