Prepare Source Database

At the moment the only SQL Server and Oracle are supported as a Source Database. The “prepare database=source” command is used to prepare both type of database a Source, however depending on the RDBMS type the parameters can be different:

CLI Syntax

repcli prepare database=source dbtype={mssql|oracle} \
[Source database connection parameters] \
[Source database specific parameters] \
generatesql={0|1}

 

The input parameters are:

  • database – The only appropriate value is source
  • dbtype – RDBMS type. Can either be mssql or oracle
  • generatesql – Specify if the objects are to be created in the databases (0 value), or if the only SQL script creating the objects are to be generated (1 value).
  • [Source database connection parameters] - set of the parameters to specify database connection setting
  • [Source database specific parameters] - set of the parameters that is valid for either Oracle or SQL Server only

The details on the “Source database connection parameters” and “Source database specific parameters” are provided here:

 

REST API:

  • Endpoint: https://repstance_url/configure/database
  • Method: POST
  • Header:
    • Content-Type: application/json
    • X-Token: token
  • Body:
    {
      "command":"prepare",
      "parameters":[
         ["database","source"],
         ["dbtype","{mssql|oracle}"],
         {Source database connection parameters},
         {Source database specific parameters}
      ]
    }

Server response:

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

 

Web UI

In the Web User Interface, the Source database is prepared when you create or edit a capture process.

To prepare a database, click Add Capture in the main dashboard and click on database logo:

 

Provide database connectivity parameters in the “Database Settings” form:

 

Click "Test Connection" to connect to the database and click “Prepare for Replication” to prepare the database. Alternatively you can generate script that prepares database and execute it directly in the Source database:

 

 

 

 

 
On this page