Real-time monitoring for Liquibase database changes is here!

Liquibase Pro 3.10 Released with SQL Plus Integration

June 15, 2020
Liquibase Pro 3.10 Released with SQL Plus Integration

Devs and DBAs (and many others) use Liquibase to track their database changes. Usually, this is done in SQL or XML (or JSON or YAML) over traditional JDBC connections. While this works for most people most of the time, there are occasions when the JDBC connector has trouble processing highly-specialized or variable-rich SQL. In these cases, a more purpose-built tool like SQL Plus is required. Previously, this was not easily achieved with out-of-the-box Liquibase usage.

Well, we have some good news for you!

No more weird workarounds for complex SQL

We are introducing an optional changeset attribute for all Liquibase Community and Pro users called “runWith”. As you might guess, this attribute allows you to specify an “executor” to run your SQL. This new capability works with changesets in formatted SQL changelogs, and in XML changelogs which call inline SQL or <sqlFile> tagged changesets. There is also a new .conf file, which lives alongside your liquibase.properties file, where you can optionally specify some useful key-value pairs.

Introducing SQL Plus integration

For Liquibase Pro users, we are including SQL Plus integration! We have repeatedly heard the message that Oracle / SQL Plus users are likely to have both legacy and complex database needs for which standard JDBC connections’ capabilities fall short.

Liquibase SQL Plus integration will save you time, reduce weird workarounds, and let you use the SQL you already have. 

Using Liquibase SQL Plus integration

To use the new SQL Plus integration, make sure you have the latest version of Liquibase (download Liquibase 3.10.0 or higher). When you’re ready, simply add runWith="sqlplus" to a changeset and have SQL Plus in your PATH (or configure it in the accompanying liquibase.sqlplus.conf file).

Yup. It’s now that easy to run your complex or specialized SQL changesets with SQL Plus. View documentation on the runWith attribute.

Open extensibility beyond SQL Plus

As exciting, and true to open-source and open-extensibility, Liquibase Community and Pro users can write their own classes to integrate their own executor. Say, for example, you need an encrypted JDBC tool, which you want to call as ejdbc from your changeset? We’ve included an example executor with the 3.10.0 release files so you can see exactly how to do the following:

  1. Write and configure the classes to call your tool. 
  2. Set up a .conf file (in this example named liquibase.ejdbc.conf).
  3. Add runWith="ejdbc" to select changesets to process them with your custom executor.

Let us know how it’s going

We are excited to see how Liquibase will use this new feature! When you have something to share, let us know with a Pull Request or contact us, and we will definitely shine a spotlight on it. If it is proprietary, hit us up directly and we’d love to figure out a deal to make it more available in ways that pay off for everyone.

Overall, we think the ability to process SQL with the executor of your choice helps Liquibase Community and Pro users get even more out of their time. That way you can focus on more important things, like developing cool features and hanging out with your family.

We hope this makes your database life easier!

Article author
Mario Champion (@mariochampion) Product Manager