Dcm for ilOUG

28
www.dbmaestro.com CONTROL.DEPLOY.PROTECT.COMPLY Footer CONTROL.DEPLOY.PROTECT.C OMPLY DCM & SCM ilOUG .NET forum 2012

description

The History of DCM (Database Change Management) and what are the requirements of a good DCM

Transcript of Dcm for ilOUG

Page 1: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

CONTROL.DEPLOY.PROTECT.COMPLY

DCM & SCM

ilOUG .NET forum2012

Page 2: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

DCM DCM – Database Change Management Part of ALM (Application Lifecycle Management)

solutions

2

Page 3: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Applications & Databases Database is a Major Part of the Application

Schema Structure PL/SQL Code Lookup Content

Database is a Central Resource

Business Data Mustbe Saved

3

Page 4: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

SCM Concepts Structure of a repository & gained functionality

4

File based Separation of Working

environment and repository File Locking Check out / in Baseline Tag / Label Head / Latest Rollback Compare / Merge Deploy / Build

Page 5: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

SCM Concepts did not apply to the database world Traditional SCM concept doesn’t fit the Database

world… A database is not a collection of files DDL (Data Definition Language) DML (Data Manipulation Language) DDL extraction No debug environment Content ? Database duplication – constant synchronization

5

Page 6: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

SCM Concepts did not apply to the database world Moving changes… Development to QA, integration and production

Code – simple file copy & registration DB objects cant just be “moved” – content… What do we do with db content changes ?

So the whole thing was neglected for years...

Manual process where created to deal with eal life situations

6

Page 7: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Manual process Lists depicting database changes are created

Detailed documents in SCM

Code is written to alter database structure without content loss

7

Post-it SCM

Don’t forget to add the index…

Page 8: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Manual process But:

Lists are usually not part of an SCM process Not mandatory Not policy enforced Code developed for deployment is not part of ALM Not following the same restrictions

(QA, code review…) No simple solution for content change management

(backups? Database duplications?)

Clearly, automation is required!

8

Page 9: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Automation – First Generation database change management A new concept is created Compare & Sync

Automated tools compare different environments Reports are generated, and differences are found Automatic code generation Some products can even analyze content and propagate

content changes Deployment became more stable and less

prone to human mistakes

We where happy for a while…

9

Page 10: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Automation – First Generation database change management But:

What if test environment has undergone changes? What happened while in development cycle? Anyone privileged can update the database, even if it is

not required… How can we match database development with

application development? Partial deployments? Team synchronization? Who did What, When and Why?

So, a lot of the traditional SCM goals are not answered

10

Page 11: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Automation – First Generation database change management File Locking Check out / in Baseline * Tag / Label Head / Latest, but this it the DB itself, so actually … Rollback Compare / Merge Deploy / Build ** Partial

11

Page 12: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

DATABASE ?!

SCM without DCM

12

SCM Native Code Business Req. Integration

Conflict code Resolver

Automated Deployment

Continuous Integration

File Based Version Control: Java, .NET, C#, C++

Change Management Systems

Correlate Change with Activity

Merge Code

Agile

Quick Iterations

Reduce Overhead

Increase Team Satisfaction

Any Change Tested Over Night

Page 13: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

DCM Lack of Inherent Risks Falling Behind Deadlines Code Overrides No Tracking Changes Release Rollback Lack of Recovery Release Unreliability Lack of Automation Audit Compliance Security Breaches

13

Page 14: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Correction

This is not

Database Change ManagementThis is

Database Deployment ManagementSo,

We still need to

Manage Change

14

Page 15: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Next generation database change management

Requirements Follow traditional SCM concepts

Check-Out / Check-In / Tagging / … Support Any Database client IDE

Enforce a well disciplined change process (no out of process updates)

Synchronize team work Support entire life cycle

(development, testing, going to production)15

Page 16: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Next generation database change management

Requirements Manage content changes Good, stable repository

Save all development Auditing

Link / embed to traditional SCM projects Enable deployment based on SCM tasks

16

Page 17: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Follow SCM ConceptsNG database change management

Requirements File Locking Check out / in Baseline Tag / Label Head / Latest Rollback Compare / Merge Deploy / Build

17

Page 18: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer 18

Without DCM Two unrelated Processes

Check-Out Script

Modify Script

Get updated Script from DB

Check-In Script

Compile Scriptin DB

Debug Scriptin DB

Page 19: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer 19

With DCMOne Enforced Process

Check-Out Object

Modify Object in DB

Run Applications’ Tests

Check-In Object

Page 20: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

NG database change managementHow is it done? Challenges:

Creating a new type of repository A problem - central resource vs. replicated resource

Enforcing change process Synchronizing development teams

Linking to traditional SCM Linking versions Linking change sets

Leveraging deployments

20

Page 21: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Benefits & Risk Avoidance Policy enforcement Concurrent development

Preventing collisions and conflicts

Standards Check-in and check-out Labels

Complete audit trail of all changes

21

Page 22: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Benefits & Risk Avoidance Lookup tables data management

Automated Roll back of changes Development Production systems

Automated deployments between multiple databases Three way analysis Requirement based deployment

22

Page 23: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

SCM Native CodeDCM

Database Code

Business Req.

Integration

Conflict code Resolver

Automated Deployment

Continuous Integration

Any Change Tested Over Night

It’s all about a Safety Net

23

File Based Version Control: Java, .NET, C#, C++

Change Management Systems

Correlate Change with Activity

Merge Code

Agile

Quick Iterations

Reduce Overhead

Increase Team Satisfaction

Database Version Control

Change Policy

Automatic Deployment Script

Page 24: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Demo

24

Page 25: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Baseline in Deployments

25

Source vs. Target

Action

= No Action

≠ ?

Source vs. Baseline

Target vs. Baseline

Action

= = No Action

≠ = Override= ≠ Ignore≠ ≠ Merge

You do not have all the information

With Baseline the unknown is now known

Page 26: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

DCM & Development Methodologies Agile Branches Multiple Development – short & long development Shared Environment Teams’ Environment Design tools ORM tools

26

Page 27: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Summary SCM works well with File-Based objects DCM created for Databases objects

Support ALL IDEs working with the Database Support ANY development methodology

Prepare yourself to the deployment phase

27

Page 28: Dcm for ilOUG

www.dbmaestro.com

CONTROL.DEPLOY.PROTECT.COMPLY

Footer

Thank you

Thank you for your time

Uri [email protected]

28