Posted 01 Jun 2016 by Nathan Voxland
The role of the Database Administrator is evolving and has never been more complex. DBA’s 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 bring a sense of control to the database deployment process while still giving DBAs the control they need. In addition Liquibase works alongside the database professionals preferred toolset.
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.
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 you want.
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.
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.
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.
Thanks to Liquibase’s cross-database support, DBAs can even use a single changelog that supports Oracle, MS SqlServer, Postgresql, and more.
If your DBAs determine their needs extend beyond all the great capabilities Liquibase offers check out Datical. Datical builds upon Liquibase and lets DBAs:
More information on Datical DB can be found here.