Command Line Verbs
Published 06 February 2020
Deployment Suite for Oracle has been replaced by Redgate Deploy - Oracle. This page is therefore no longer being updated. For the latest documentation, please click here.
build
Verifies the validity of the migration scripts in the project by migrating a clean database environment. Runs Code Analysis for Oracle to check code rules have been followed in the migration scripts, and checks for invalid database objects post-migration. Generates a build artifact containing the migration scripts, Code Analysis for Oracle report, invalid object check report and snapshot of the database post-migration (see Drift Detection for more details). If working from a Redgate Change Control project that used a shadow scripts folder rather than a shadow database to generate the migration scripts, an automated check is performed to validate that the shadow scripts folder and migration scripts are still in sync.
Arguments:
- --target (-t): The JDBC url for the target database to build against (Required)
- --output (-o): The filepath to export the build artifact to - this should be a .zip file (Required)
- --project (-P) : The path to the *.conf file created by Redgate Change Control (Optional)
- --clean (-c): Flag to indicate whether to clean the target database before migration (Default = false)
- --force (-f): Flag to indicate whether to overwrite the build artifact if it already exists (Default = false)
- --user (-u): The user for connecting to the target database (Optional) - must be specified here or in the environment variable BUILD_DATABASE_USER
- --password (-p): The password for connecting to the target database (Optional) - must be specified here or in the environment variable BUILD_DATABASE_PASSWORD
- --verbose (-v): Flag to indicate whether to enable verbose logging (Default = false)
- --quiet (-q): Flag to indicate whether to suppress all logging except error messages (Default = false)
- --IAgreeToTheEula: By using this option you consent to the Redgate EULA. (Required)
rca build -P <ProjectPath> -t jdbc:oracle:thin:@//<host>:<port>/<service> -o <BuildArtifactPath> -c -f -u <UserName> -p <Password> --IAgreeToTheEula
test
Runs utPLSQL database unit tests and outputs reports for code coverage and test results.
Arguments:
- --target (-t): The JDBC url for the target database to build against (Required)
- --output (-o): The directory to export the build artifact to (Required)
- --project (-P) : The path to the *.conf file created by Redgate Change Control (Optional)
- --user (-u): The user for connecting to the target database (Optional) - must be specified here or in the environment variable TEST_DATABASE_USER
- --password (-p): The password for connecting to the target database (Optional) - must be specified here or in the environment variable TEST_DATABASE_PASSWORD
- --verbose (-v): Flag to indicate whether to enable verbose logging (Default = false)
- --quiet (-q): Flag to indicate whether to suppress all logging except error messages (Default = false)
- --IAgreeToTheEula: By using this option you consent to the Redgate EULA. (Required)
There is an additional option terminator argument (--
) that can be specified after the above arguments followed by options to be passed to utPLSQL. For instance, specific test suites can be specified by passing `-- --path=test_suite_to_run
`. See the utPLSQL documentation for options that can be specified (http://utplsql.org/documentation/).
rca test -o <OutputDirectory> -t jdbc:oracle:thin:@//<host>:<port>/<service> -s <TestSuiteList> -u <UserName> -p <Password> --IAgreeToTheEula -- --path=test_suite_to_run
release prepare
Prepares a targeted release artifact that can be deployed to a downstream database (e.g. Production). Generates the deployment script that will be executed against the target database and a report of the database changes that will be deployed. Performs Drift Detection to validate that the target database has not changed since the previous deployment (e.g. through a hot-fix). If drift has been detected, additional scripts are generated that users can optionally use to either reverse the detected drift or include the drift in upstream environments. In either case, new build and release artifacts will need to be generated to incorporate any corrections applied.
Arguments:
- --target (-t): The JDBC url for the target database to build against (Required)
- --buildArtifact (-b): The filepath to the build artifact to be used (Required)
- --output (-o): The filepath to the release artifact to be created - this should be a .zip file (Required)
- --force (-f): Flag to indicate whether to overwrite the build artifact if it already exists (Default = false)
- --user (-u): The user for connecting to the target database (Optional) - must be specified here or in the environment variable PRODUCTION_DATABASE_USER
- --password (-p): The password for connecting to the target database (Optional) - must be specified here or in the environment variable PRODUCTION_DATABASE_PASSWORD
- --verbose (-v): Flag to indicate whether to enable verbose logging (Default = false)
- --quiet (-q): Flag to indicate whether to suppress all logging except error messages (Default = false)
- --IAgreeToTheEula: By using this option you consent to the Redgate EULA. (Required)
rca release prepare -b <BuildArtifactPath> -t jdbc:oracle:thin:@//<host>:<port>/<service> -o <ReleaseArtifactPath> -v -u <UserName> -p <Password> -f --IAgreeToTheEula
In versions prior to v2.14, this was release-prepare, with a dash.
release perform
Deploys the release artifact generated by release prepare against the target database. This will run the deployment.sql script only (i.e. it will not run any drift correction scripts that are in the release artifact).
Arguments:
- --target (-t): The JDBC url for the target database to build against (Required)
- --releaseArtifact (-r): The filepath to the release artifact to be deployed (Required)
- --output (-o): The directory to output the drift detection report (Optional) - defaults to the current working directory
- --force (-f): Flag to indicate whether to automatically proceed with the deployment even if drift is detected in the target database (Default = false)
- --user (-u): The user for connecting to the target database (Optional) - must be specified here or in the environment variable PRODUCTION_DATABASE_USER
- --password (-p): The password for connecting to the target database (Optional) - must be specified here or in the environment variable PRODUCTION_DATABASE_PASSWORD
- --verbose (-v): Flag to indicate whether to enable verbose logging (Default = false)
- --quiet (-q): Flag to indicate whether to suppress all logging except error messages (Default = false)
- --IAgreeToTheEula: By using this option you consent to the Redgate EULA. (Required)
rca release perform -r <ReleaseArtifactPath> -t jdbc:oracle:thin:@//<host>:<port>/<service> -v -u <UserName> -p <Password> -f --IAgreeToTheEula
In versions prior to v2.14, this was release-perform, with a dash.
baseline
Marks an existing database as being at a specific version. This will cause RCA to ignore all migrations up to and including the baseline version.
Arguments:
- --target (-t): The JDBC url for the target database to baseline (Required)
- --baselineVersion: The version to baseline the target database with (Required)
- --project (-P) : The path to the *.conf file created by Redgate Change Control (Optional)
- --user (-u): The user for connecting to the target database (Optional) - must be specified here or in the environment variable DATABASE_USER
- --password (-p): The password for connecting to the target database (Optional) - must be specified here or in the environment variable DATABASE_PASSWORD
- --verbose (-v): Flag to indicate whether to enable verbose logging (Default = false)
- --quiet (-q): Flag to indicate whether to suppress all logging except error messages (Default = false)
- --IAgreeToTheEula: By using this option you consent to the Redgate EULA. (Required)
rca baseline -t jdbc:oracle:thin:@//<host>:<port>/<service> --baselineVersion 1 -u <UserName> -p <Password> --IAgreeToTheEula