12 May 2020
12 May 2020

Deployment Suite for Oracle: What’s new? Redgate Change Automation

Redgate Change Automation is now part of the Deployment Suite for Oracle. It is a command line tool that makes it easier and safer to automate Oracle database deployments. It has four commands to help you build, test, prepare, and perform Oracle database releases with built-in safety checks.

In December 2019, we released Redgate Change Control as part of the Deployment Suite for Oracle. Each developer installs it on their local machine to easily track changes to a development database and generate migration scripts, which can be used in an automated release process.

To deploy these migration scripts, you would have used a combination of command-lines and you would have needed to learn how to build the safety checks into your deployment pipeline. Now, Redgate Change Automation takes care of that for you. Everything you need is in one simple command-line, with the safety checks built-in, which makes it easier to setup.

Redgate Change Control is installed on the developer’s machine to generate migrations. Redgate Change Automation is used for CI/CD to deploy those migrations safely.

Using Redgate Change Automation

Redgate Change Control allows developers to source control the migration scripts describing every required change, including schema changes, data updates, configuration changes, and so on. These are sometimes referred to as change scripts.

The job of Redgate Change Automation is to run them in the right order to update an existing database to the version from source control, safely, and with built-in quality checks. It is a command-line application that can be used as part of a CI/CD pipeline to automate Oracle database deployments with migration scripts, giving you full control over the deployment. It enables you to build a safe, automated release process. Redgate Change Automation has the following commands (see our command line reference for more details on how to use these).

rca build

The build command verifies the migration scripts in the repository by applying them to a clean CI database or updating an existing CI database. It can also run PL/SQL code analysis to check that best practices and naming conventions are being followed. It also checks for any invalid objects.

Most importantly, it generates a build artifact, which is a zip file, that can be used later for deployments. It is a DevOps best practice to build once and then use that same artifact to release to multiple environments, to ensure a consistent and repeatable process.

rca test

This command runs utPLSQL database unit tests and outputs reports for test results and code coverage. utPLSQL is an open source database unit testing framework that Redgate sponsors.

It’s good to have tests to cover any business logic in your procedures and functions. You can also add tests for any routine checks that can be automated to reduce manual risk and the time needed by DBAs to review changes. Some teams will cover testing the database as part of an automated integration test process. This test step is optional and can always be added later if you’re not doing database unit testing yet.

rca release prepare

Prepares a release artifact that is targeted for a specific environment. This release artifact can then be deployed to a downstream database (e.g. Production). The artifact contains a copy of the scripts in your repository along with a change report and deployment script that can be easily reviewed by DBAs. This step also performs drift detection to validate that the target database has not changed since the previous deployment (e.g. through a hotfix). If drift has been detected, additional scripts are generated that allows you to either reverse the detected drift or include the drift in your development environment, so that you’re testing against a more realistic representation of Production.

rca release perform

Deploys the release artifact generated by rca release prepare against the target database. This will run the deployment.sql script only if no drift has happened since it was generated. If a DBA is happy that the drift will not impact this release, then they can use a force flag to proceed with the deployment.

Built-in safety checks

Redgate Change Automation provides the following built-in safety checks to make Oracle database releases as safe as possible.

  • Build:
    • PL/SQL code analysis checks that best practices are being followed and your naming conventions are being enforced. These rules can be customized per pipeline and you can set the severity level to warning or error. For errors, you can choose to stop the build from continuing and give quick feedback to developers to review the changes.
    • The invalid objects report makes you aware of any objects that might need to be reviewed.
  • Release:
    • A detailed change report so DBAs can quickly understand what objects will be changed and how as part of each release. Post-release, this report also makes it easy to see what objects changed and how, which can make it easier to identify the cause if there are any problems.
    • The exact SQL deployment script for DBAs that still want to perform a manual review step as part of an automated pipeline.
    • Drift detection to make releases safer and catch any changes that happen outside of your release process. If a change is only on Production, then the tests that you have done in your earlier environments (like Dev, Test, and QA) may not accurately capture any issues that happen on Production since the schema is different.
    • Drift correction scripts to revert drift from Production or include it in your development environment so you are developing/testing against the most representative Production schema, and future releases won’t be identified as drifted.

CI/CD Integrations

Redgate Change Automation will work with any CI/CD system that can call a command-line. The CI/CD agents can be Linux or Windows machines. Redgate Change Automation is also available on Docker Hub, which makes it easy to automatically get the latest version of it, as part of your pipeline process.

On our documentation site, we have worked examples for using Redgate Change Automation to automate Oracle database deployments with Jenkins, Azure DevOps, and TeamCity and Octopus Deploy. These examples along with the command-line documentation can be used to setup other CI/CD systems like GitHub Actions, GitLab CI/CD Pipelines, Bitbucket Pipelines, IBM UrbanCode, XebiaLabs, and more. If your system is not listed and you need help, please let us know.

Summary

We’d love to hear your thoughts on Redgate Change Automation, and work with you to help you automate your Oracle database deployments safely. You can learn more and download the latest Deployment Suite for Oracle from our website.

 

You may also like

  • Article

    Support for static data added to Source Control for Oracle

    With the speed of software development increasing, more and more companies and organizations are recognizing that version controlling code is becoming as important for databases as it is for applications. In recognition of this, Source Control for Oracle has been upgraded so that it now version controls static data within databases as well as database

  • Article

    Deployment Suite for Oracle: What's New?

    Stephanie Herr describes the new features in the Deployment Suite for Oracle that will help you automate your database releases safely, on Linux or Windows.

  • Article

    Automating Oracle Database Deployments using the Hybrid Approach

    Stephanie Herr explains how to use the 'hybrid' approach in the Deployment Suite for Oracle to automate Oracle database deployments. This is where the team maintains the current state of the database in version control during development. then, at key stages, they generate and test the migrations script that will be used to deploy the new database changes safely.

  • Event

    Oracle OpenWorld, San Francisco

    Join Redgate at this year's Oracle OpenWorld in San Francisco on October 22-25. We'll be sharing how you can adopt Compliant Database DevOps to deliver software quicker whilst keeping your data safe.

  • Article

    Deployment Suite for Oracle: What’s New? Git Integration in Redgate Change Control v3.0

    In Redgate Change Control v3.0, you can now commit your database changes to your local Git repository and collaborate with your team by pushing and pulling changes from the remote Git repository. If you’re using branches, you can also create and switch Git branches from within Redgate Change Control.

  • Forums

    Deployment Suite For Oracle Forum

    Schema Compare for Oracle, Data Compare for Oracle, Source Control for Oracle, Data Masker for Oracle and Automated Build and Release for Oracle