Version control for PL/SQL
Transcript of Version control for PL/SQL
Version Control for PL/SQL
About Gerger
Gitora Manage your PL/SQL code with Git
Hundreds of customers in 30+ countries.
http://www.gitora.com
Contact me for a free consultation:
• What is the problem?• How did we solve it?
• Demo!!• Implementation Strategies
Customer SpotlightSuccess Story: (In other words, this really works. :-) )
Manages over 20,000 database objects
Rhenus Logistics, leading logistics service company from Germany, uses our solution.
Database objects are spread over 30+ schemas
Continuous delivery implementation
Errors during deployment will reduce by 95%.
You’ll be one of the pioneers.
You’ll deploy to production twice as often.
If you implement version control for DB Development:
Ready to tackle continuous delivery.
PL/SQL is not a file-based programming language.
Version Control is a solved problem in file-based languages.
The version control systems are almost exclusively concerned with file-based programming languages.
Facts:
We need to find a way to bridge the database to these version control systems.
Best path forward
Git is a distributed version control system (unlike SVN)
Facts about Git:
Two types of objects:
CREATE
CREATE OR REPLACE
Code is 90% of the problem.
Facts about database development:
This is how best developers work with Git
This is how best developers work with Git
No Queues
No Blocking
No Interruptions
Automatic deployment
No blocking between projects, features
Branching and merging is possible
Version control rules are enforced by the deployment pipeline
Source code is in Git
Faster hot fixes
Great automated testing
1..N developers
N Project A Servers N Project X Servers
Stage 1 Stage N
Deploy to Production
Every developer works in a private environment in her own WORKING DIRECTORY. She has the full repository with its full history locally.
N levels of upstream integration
N Projects
Traditional PL/SQL Development
Queued access
Blocking
Interrupting
DEV RELEASE TEST INTEGRATION QA
Manual deployment
USER ACCEPTANCE PREPROD PROD
Intermingled projects, features, hot fixes
Practically impossible to branch, merge
Developers are expected to follow version management rules manually.
Version control repo is a last resort back up
or any other version control system
1..n database servers
Manual
No automated testing
DB is the WORKING DIRECTORY
Constraints we live in:
Very little change to the workflow
DBA
Cannot enforce a development tool
No private environment on day one
Minimal intrusion
We need to find a way to bridge the database to existing version control software.
Edit PL/SQL Objects as usual in your favorite editor.
Log in to your own bridge in the editor (can be done automatically in most cases).
Use bridge API’s or bridge GUI to perform version control tasks.
A database trigger listens to DDL events.
Version control commands update the database.
Only executes what’s changes in the DB. (Very fast!)
Bridge consists of a DB schema and some Java.
Create a Working Directory in the OS that is synced with the code in the Database.
DEV TEST
PL/SQL Development with Git Step 1 (One Repository)
Queued access
Blocking
Interrupting
DEV
Automatic deployment
USER ACCEPTANCE HOTFIX
PREPROD PROD
Intermingled projects, features
Basic branching and merging is possible for hot fixes
Version control rules are enforced at the database level.
Source code is in Git
Automatic Script Generation with Git
RELEASE TEST INTEGRATION QA
Development on DEV only. On some other DB’s bug fixes may be allowed.
Faster hot fixes Better automatic testing
PL/SQL Development Step 2 with Git (One Repository)
Fewer Queues
Less Blocking
Less interruption
DEV1
Automatic deployment
PROD
Less intermingled projects, features
Basic branching and merging is possible
Version control rules are enforced at the DB level and managed by a release manager.
Source code is in Git
Automatic DDL Script Generation from Git
RELEASE TEST HOTFIX INTEGRATION QA USER ACCEPTANCE PREPROD
Hot fixes delivered faster
DEV2
N DEV servers DEV1, DEV2, DEV3,…DEVN
Better automatic testing
PL/SQL Development Step 3 with Gitora: Implement Any Git Workflow (One Repository)
No Queues
No Blocking
No Interruptions
Automatic deployment
PROD
No blocking between projects, features
Branching and merging is possible
Version control rules are enforced at the DB level and managed by a release manager.
Source code is in Git
Automatic DDL Script Generation with Git
RELEASE TEST HOTFIX INTEGRATION QA USER ACCEPTANCE PREPROD
Faster hot fixes
Project Server [1..N]
RELEASE TEST INTEGRATION QA
Every developer works in a private environment.
Great automated testing
Demo!!!!
Fewer Queues
Less Blocking
Less interruption
DEV1
Automatic deployment
Less intermingled projects, features
Basic branching and merging is possible
Version control rules are enforced at the DB level and managed by a release manager.
Source code is in Git
PREPROD
Hot fixes delivered faster
DEV2
Better automatic testing
Demo Setup (One Repository)
About Gerger
Gitora Manage your PL/SQL code with Git
Hundreds of customers in 30+ countries.
http://www.gitora.com
Contact me for a free consultation: