Prepare Target Database
The “prepare database=target” command is used to configure a database as a Target. The command must be executed before running the Apply Process to create the necessary database objects:
CLI Syntax
repcli prepare database=target dbtype={oracle|mssql|redshift|postgresql|mysql|snowflake} generatesql={0|1}\
[Target database connection parameters] \
The input parameters are:
- database – The only appropriate value is target
- dbtype – RDBMS type. The valid values are oracle, mssql, redshift, postgresql and snowflake
- 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)
- [Target database connection parameters] - set of the parameters to specify database connection setting
The details on the “Target database connection 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","target"],
["dbtype","{oracle|mssql|redshift|postgresql|mysql|snowflake}"],
{Target database connection parameters}
]
}
Server response:
- HTTP Status – status of the command, possible codes are:
- 200 – if no error occurs
- 422 – if error occurs
- Body:
{
"Status":"{Complete|Failed}",
"Message":"The command execution details"
}