Home / Repstance User Guide / 7. COMMANDS TO BE USED / 7.10 Alter Apply Process / 7.10.2 Alter Apply Process for Oracle Database

7.10.2 Alter Apply Process for Oracle Database

REST API:

  • Endpoint: https://repstance_url/configure/process
  • Method: POST
  • Header:
    • Content-Type: application/json
    • X-Token: token
  • Body:
    {
      "command": "alter",
      "parameters": [
        ["process","apply"],
        ["id","applyID"],
        ["dbtype","oracle"],
        ["capturename","captureName"],
        ["connectiontype","tns|ezconnect"],
        ["tnsname","tns_alias"],
        ["server","host_name"],
        ["port","port_number"],
        ["servicename","service_or_SID"],
        ["user","username"],
        ["password","password"],
        ["autostart","{0|1}"],
        ["ddlcreate","objectMask:options"],
        ["ddldrop","objectMask:options"],
        ["debuglevel", "{0-15}"],
        ["ddlprocessing","native|dictionary"],
        ["skipapply","skipapplyMask"],
        ["ldtxsize","{0-9999999999}"],
        ["batchmode","{0|1}"],
        ["filter","filterID,filteringClause"],
        ["transformload","{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 alter process=apply id=applyID dbtype=oracle \
capturename=captureName \
connectiontype=tns|ezconnecttnsname=tns_alias \
servicename=service_or_SID \
server=databaseHostport=databasePort\
user=username password=password \
autostart={0|1} \
ddlcreate=objectMask:optionsddldrop=objectMask:options \
ddlprocessing=native|dictionary \
debuglevel={0-15} skipapply=skipapplyMask \
ldtxsize={0-9999999999}batchmode={0|1}\
filter=filterID,filteringClause transformload={0|1}

The input parameters are:

  • process – The only possible value is apply
  • id – The Apply Process identifier
  • dbtype – Type of RDBMS, the only possible value is oracle
  • connectiontype – Specifies the Oracle connection method, 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
  • capturename – Name of the Capture Process which is providing the data to be used
  • user – Database User name
  • password – Database User password
  • autostart – Determines if the Apply Process must be run automatically or not. Possible values are:
    • 0 – do not run the Apply Process automatically (default value)
    • 1 – to run the Apply Process automatically
  • ddlcreate – Used to define the Apply Process behavior when creating a table, if a table with the same name is found. The table is specified in schema _name.table_name format. In order to specify the list of the tables, each table must be separated by comma. The % symbol may be used in order to match any number of characters. It has the following options:
    • skip – do not run DDL create command if the table already exists
    • recreate – drops the existing table and recreates it
  • ddldrop – Used to define the Apply Process behavior when dropping a table, if a table with the same name is not found. The table is specified in schema _name.table_name format. In order to specify the list of the tables, each table must be separated by comma. The % symbol may be used in order to match any number of characters. It has following option:
    • skip – do not run DDL drop command if the table doesn’t exist
  • debuglevel – Level of debugging, possible values are 0-15 (default value is 0)
  • ddlprocessing – Determines if DDL must be processed based on the user statement or generated based on the dictionary changes. The possible values are:
    • native – to process DDL based on the user statement (default value)
    • dictionary – to generate DDL based on the dictionary changes
  • skipapply – Used to define the behavior of the Apply Process when inserting data, which was originally produced by Apply Processes in the Source Database as part of the “loop-back” control function, in that, this Apply Process will insert, 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 “none”.
  • ldtxsize – Determines the number of records to be inserted in one transaction at the Initial Load stage. If the value is 0 (default) the table is loaded in a single transaction.
  • batchmode – This parameter is to specify transaction processing method. If the parameter is enabled the Apply Process combines and processes set of transactions in a single transaction. The possible values are:
    • 0 – do not apply transactions in batch mode (default)
    • 1 – apply transactions in batch mode
  • filter – The set of the parameters to determine objects’ filtering (see chapter 7.9.6 Objects Filtering for the details).
  • transformload – Determines if the transformation rules must be applied to the Initial Load. The possible values are:
    • 0 – do not use transformation rules for the Initial Load (default)
    • 1 – use transformation rules for the Initial Load.

Note – "dictionary" value is commonly used in the case of Heterogeneous replication. For Homogeneous type of replication it is recommended to use "native" method of DDL processing.