Lifecycle Management and DevOps for Oracle Databases — The Cloud Way
Databases play a critical role in most software project architecture. However it seems that the concepts of agile methodology, version management, and continuous delivery are somehow less mature in the world of DBAs and database developers.
In this article we’ll show you how to bring modern development techniques to the world of database objects and logic leveraging Oracle Developer Cloud Service.
Managing SQL Scripts Lifecycle
Database objects are defined through a set of SQL Scripts which act as the “source code” for your database. Just like any other source artifact of your project, you should be managing these scripts in a central code repository. By leveraging a modern version management system — such as Git — you’ll be able to create branches for specific database fixes and enhancements, and have better insight into your SQL scripts versions and changes over time.
To truly enable agile development methodology for your database artifacts you’ll also want to have an issue tracking system that is synched with your code repository — so you can track the progress of your project development along with code changes.
Oracle Developer Cloud Service — a free service that is provisioned for customers of Oracle Database Cloud Services and other Oracle PaaS services — includes project management platform with a combination of private Git repostiroes, a task tracking system, agile project management features, as well as wikis for team knowledge collaboration. This makes it very simple to track your SQL scripts lifecycle and manage them effectively.
In the first video in this article, we show you how to:
- Track your development to-do list centrally
- Manage tasks for your team members
- Manage your SQL Scripts in a Git repository
- Leverage the popular SQL Developer tool Git integration functionality
- Branch your SQL Script for working on specific tasks
- Conduct code review with your peers online
- Merge changes into the master branch
Continuous Integration and Delivery for the Database
So now you have your SQL Scripts all managed, but there is still one challenge:
“How do you make sure that your SQL Scripts are actually reflecting and are reflected in your actual database instance?”
In many organizations, it was up to the DBA to manually run these scripts and make sure the database is synched with them. But what if the DBA missed a change? What happens if we didn’t do the same change across the various DB instances we have (dev, test, prod)?
DevOps automation and continuous delivery solve this problem. They create an automated chain that starts from a code change that was merged into our line of code and automatically synch the database with the new script. The automation can also replicate the exact same steps on various databases instances ensuring consistency. Another part of this automation can include running tests to make sure the new structure doesn’t break functionality.
Developer Cloud Service has the features to help you automate this delivery automation, whether based on code changes or on a regular schedule.
In the second demo video we show you how to:
- Configure a deployment chain based on Git merge operations
- Connect your build step to your database
- Execute SQL scripts and SQLcl commands on your database
- Monitor the execution and success of the continuous integration process
As you can see the features in Oracle Developer Cloud Service can help DBAs and SQL developers keep their database and code current and in synch with the work they are doing during development — with automation features that reduce the chances for human errors in keeping their database instance in synch.
Originally published at blogs.oracle.com on February 16, 2017.