Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora...

18
Version Control for PL/SQL

Transcript of Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora...

Page 1: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

Version Control for PL/SQL

Page 2: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

• What is the problem?• How did we solve it?

• Demo!!• Implementation Strategies

Page 3: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

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

Page 4: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

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.

Page 5: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

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.

Page 6: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

Best path forward

Git is a distributed version control system (unlike SVN)

Facts about Git:

Page 7: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

Two types of objects:

CREATE

CREATE OR REPLACE

Code is 90% of the problem.

Facts about database development:

Page 8: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

This is how best developers work with Git

Page 9: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

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

Page 10: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

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

Page 11: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

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.

Page 12: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

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

Page 13: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

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

Page 14: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

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

Page 15: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

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

Page 16: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

Demo!!!!

Page 17: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

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)

Page 18: Version Control for PL/SQL ODTUG - Amazon S3 · Demo Setup (One Repository) About Gerger Gitora Manage your PL/SQL code with Git Hundreds of customers in 30+ countries. ... Version

About Gerger

Gitora Manage your PL/SQL code with Git

Hundreds of customers in 30+ countries.

[email protected]

http://www.gitora.com

Contact me for a free consultation: