dcm for iloug
DESCRIPTION
The History of DCM (Database Change Management) and what are the requirements of a good DCMTRANSCRIPT
www.dbmaestro.com
CONTROL.DEPLOY.PROTECT.COMPLY
Footer
CONTROL.DEPLOY.PROTECT.COMPLY
DCM & SCM
ilOUG .NET forum2012
www.dbmaestro.com
CONTROL.DEPLOY.PROTECT.COMPLY
Footer
DCM DCM – Database Change Management Part of ALM (Application Lifecycle Management)
solutions
2
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
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
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
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
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…
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
www.dbmaestro.com
CONTROL.DEPLOY.PROTECT.COMPLY
Footer
Demo
24
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
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
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
www.dbmaestro.com
CONTROL.DEPLOY.PROTECT.COMPLY
Footer
Thank you
Thank you for your time
28