DZone
Database Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Database Zone > Liquibase for DBAs

Liquibase for DBAs

With the DBA role becoming more complex, automation is key to getting the job done. Check out Liquibase's strengths and see if it might be helpful in your toolset.

Nathan Voxland user avatar by
Nathan Voxland
·
Jun. 02, 16 · Database Zone · Analysis
Like (3)
Save
Tweet
6.51K Views

Join the DZone community and get the full member experience.

Join For Free

The role of the Database Administrator is evolving and has never been more complex. DBAs are constantly juggling schema management, performance tuning, change control, plus database administration all within ever-shortening application development cycles. On top of all that, there are more database environments to manage than ever before, more distributed sources of database changes, and more stringent compliance requirements.

It is easy for database changes to get lost or misapplied along the way, and far too often the place where problems are found is in production. Fortunately, Liquibase can automate the database deployment process while still giving DBAs the control they need. In addition, Liquibase works alongside the database professional's preferred toolset.

No Change Is Forgotten

Liquibase tracks which changelog statements have run against each database, so DBAs no longer have to manually track which SQL statements have been run and which have not.

Like SQL? Use SQL

XML-formatted changelogs have their advantages, but many DBAs still prefer good old fashioned SQL. If that is what the team is most comfortable working with, Liquibase-formatted SQL provides the standard changeSet tracking used in any changelog format, but lets the DBA specify the exact SQL that is desired.

Manually Verify the Database Changes With Each Release

Liquibase supports an “updateSql” command that will not actually update the database, but instead output the SQL that will run. That script can be read and verified to ensure everything is correct and performing as expected.

Once everything is correct, DBAs can either run a Liquibase update or run the script through their favorite tools. The script will include the DATABASECHANGELOG inserts so everything will still be correctly tracked.

Prepare for Deployment Problems

Releases don’t always go as planned, so Liquibase ensures contingency plans are correct before each release. As teams get closer to releasing new application updates, besides checking the updateSql output, DBAs can also run futureRollbackSql which will output the SQL needed to bring a fully updated database back to the current state. It will be much less stressful verifying the rollback logic before the release.

A Unified Changelog for All Your Databases

DBAs try to keep all databases the same, but there are always differences. QA needs test data, production gets a couple extra tables, and the hot-backup server needs extra configuration. Liquibase supports contexts, labels, parameters, and preconditions that let database professionals address minor differences in scripts to adjust things as needed.

  • Contexts and labels target certain changeSets to run in only some environments.
  • Parameters perform simple text substitutions when things like schema names vary from database to database.
  • Preconditions check the state of the database to dynamically determine if a changeSet should be executed or not.

Thanks to Liquibase’s cross-database support, DBAs can even use a single changelog that supports Oracle, MS SqlServer, Postgresql, and more.

Enterprise Features With Datical

If your DBAs determine their needs extend beyond all the great capabilities Liquibase offers, then check out Datical.  Datical builds upon Liquibase and lets DBAs:

  • Package database schema changes alongside application code
  • Simulate or rehearse database deployments to forecast potential errors
  • Know the deployment status of every schema in the database
  • Integrate with popular DevOps tools

More information on Datical DB can be found here.

Liquibase Database

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • 6 Things Startups Can Do to Avoid Tech Debt
  • Top Six Kubernetes Best Practices for Fleet Management
  • Why to Implement GitOps into Your Kubernetes CI/CD Pipelines
  • Suspicious Sortings in Unity, ASP.NET Core, and More

Comments

Database Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo