Home / Repstance User Guide / 7. COMMANDS TO BE USED / 7.4 Prepare Capture Process / 7.4.2 Prepare Capture Process for Oracle Database

7.4.2 Prepare Capture Process for Oracle 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","oracle"],
        ["name","captureName"],
        ["connectiontype","tns|ezconnect"],
        ["tnsname","tns_alias"],
        ["server","host_name"],
        ["port","port_number"],
        ["servicename","service_or_SID"],
        ["dbname","databaseName"],
        ["user","username"],
        ["password","password"],
        ["autostart","{0|1}"],
        ["debuglevel","{0-15}"],
        ["ddlinclude","objectsMask"],
        ["ddlexclude","objectsMask"],
        ["dmlinclude","objectsMask"],
        ["dmlexclude","objectsMask"],
        ["loadinclude","objectsMask"],
        ["loadexclude","objectsMask"],
        ["map=mapID","mappingClause"],
        ["skipapply","skipapplyMask"],
        ["loadconsistent","{0|1}"],
        ["directlogmode","0|1|2"],
        ["asmuser","asm_user"],
        ["asmpassword","asm_password"],
        ["asmservicename","asm_service_or_SID"],
        ["minearchonly","0|1"],
        ["locallogdir","path_to_log_folder"],
        ["poolingdelay","pooling_delay_in_sec"],
        ["preview","0|1"]
      ]
    }

Server response:

  • HTTP Status – status of the command, the 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=oracle name=captureName \
connectiontype=tns|ezconnect tnsname=tns_alias \
server=databaseHost port=databasePort \
servicename=service_or_SID \
user=username password=password \
dbname=databaseName autostart={0|1} debuglevel={0-15} \
ddlinclude=objectsMask ddlexclude=objectsMask \
dmlinclude=objectsMask dmlexclude=objectsMask \
loadinclude=objectsMask loadexclude=objectsMask \
loadconsistent={0|1} map=mapID,mappingClause \
skipapply=skipapplyMask directlogmode={0|1|2} \
asmuser=asm_username asmpassword=asm_password \
asmservicename=asm_service_name \
minearchonly={0|1locallogdir=path_to_log_directory \
poolingdelay={0-99999preview={0|1

The input parameters are:

  • process – The only appropriate value is capture
  • id – Capture Process id
  • dbtype – Type of RDBMS, the only possible value is oracle
  • name – Name of the Capture Process
  • connectiontype – Specifies the Oracle connection method, the possible values are:
    • tns – Local Naming Method to be used
    • ezconnect – EZCONNECT to be used
  • tnsname – Name of the TNS alias, valid only if connectiontype=tns
  • server – Host name or IP address of the database server, valid only if connectiontype=ezconnect
  • port – Database port number, valid only if connectiontype=ezconnect
  • servicename – Database service name or SID, valid only if connectiontype=ezconnect
  • dbname – Name of either container or pluggable database. Valid only if database=source and for any Oracle versions 12c-19c but excluding RDS instances
  • 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”.
  • directlogmode – Used to define Data Capturing Method (see chapter 7.4.3 Overview of Data Capturing Methods for the details). The possible values are:
    • 0 – use LogMiner method to capture the data (default)
    • – use Direct Log Mining method to capture the data. If the “locallogdir” parameter is in use the Capture Process will process the Redo Logs from the local directory, otherwise the Capture Process will read the Logs from the Source Database as Oracle directory objects
    • 2 – use Direct Log Mining for Redo Logs located on the ASM device
  • asmuser – ASM user name
  • asmpassword – ASM user password
  • asmservicename – ASM service name or SID
  • minearchonly – Determines if the Capture Process must process Archived Redo Logs only. The possible values are:
    • 0 – process Online and Archived Redo Logs (default)
    • 1 – process Archived Redo Logs only
  • locallogdir – Path to the local directory to process archived logs from (see chapter 7.4.3 Overview of Data Capturing Methods for the details)
  • poolingdelay – The parameter is used to specify number of seconds the Capture Process will wait after each database changes gathering
  • preview – This parameter is used to validate list of the tables to be included into the replication along with the transformation rules. The possible values are:
    • 0 – do not use “preview” mode (default)
    • 1 – do not apply the configuration to the Capture Process but provide the list of the tables to be included into the replication along with the transformation rules.