in (database) automation we trust
DESCRIPTION
In (database) automation we trust - Slides from our WebinarTRANSCRIPT
![Page 1: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/1.jpg)
Yaniv Yehuda
In (Database) Automation We Trust
![Page 2: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/2.jpg)
2
• You will be on mute for the duration of the event
• We are now talking so please type a message in the Questions box in the Control Panel if you can’t hear us (please check your speakers and GoToWebinar audio settings first)
• If you have questions during the session, please submit them on the Q&A bar on your gotowebinar dashboard and we will address them at the end
• A recording of the full webinar will be put up online
Before We Begin
![Page 3: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/3.jpg)
3
Presenter
Yaniv Yehuda
• CTO, Co-Founder at DBmaestro
![Page 4: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/4.jpg)
About DBmaestro
• Founded in 2008, product launched in 2010
• Founded by Yariv Tabac and Yaniv Yehuda
• Headquartered in Israel, Global Operations
![Page 5: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/5.jpg)
5
In Database Automation
We Trust!
(Or do we?)
![Page 6: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/6.jpg)
6
• Over 150 Companies
• Over 200 participants
• Continuous Delivery is on the rise!
• Database Automation meets mistrust…
• Why?
• What can be done?
Recently Conducted DBmaestro Survey
![Page 7: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/7.jpg)
7
Recently Conducted DBmaestro Survey
![Page 8: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/8.jpg)
8
Why automation?
• What is Continuous Delivery?
• Why is it important?
Automation
![Page 9: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/9.jpg)
9
Continuous Integration
Continuous Delivery
Continuous Deployment
Automation is the Name of the Game…
![Page 10: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/10.jpg)
10
• A process, not a tool…
• Focus on streamlining development
• Developers integrate code into shared repository
• Each check-in is verified
• Automated builds
• Automated tests
• A feedback loop
• High visibility
• Easier & quicker to prevent and find problems,
less back tracks => short integrations
What is Continuous Integration?
![Page 11: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/11.jpg)
11
• Next step after continuous integration
• Becoming lean, and even more Agile
• Make sure each change is releasable • Develop-> build-> test-> move to staging-> acceptance test
• Build a process to release with a push of a button• Deploy to production-> test production
• Actual deployment to production is manually
actuated
=> Ensure risk mitigation and high efficiency
And Continuous Delivery?
![Page 12: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/12.jpg)
12
• Why is that happening?
Continuous Delivery Moving Ahead!
![Page 13: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/13.jpg)
13
• Doing better with less
• Reacting quickly to market needs
• Getting ahead of competition
• Just can’t wait 6 months for that next
release…
• Agile Development
• Process Automation
• DevOps
Living in an Agile world…
![Page 14: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/14.jpg)
Dealing with Risk
Smaller and more focused changes are easier to manage (Agile…) Automation of repeating tasks lowers risk of (human) error Development and Operations should work in synergy (DevOps)
![Page 15: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/15.jpg)
15
• Rapid changes• Reacting quickly to market needs
• Getting ahead of competition
• Fewer changes backed out
• Better collaboration
• Fewer defects
• Ultimately better service
• Happy customers
• Profitability
Why Continuous Delivery?
![Page 16: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/16.jpg)
16
This is why!
![Page 17: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/17.jpg)
17
But…
![Page 18: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/18.jpg)
18
• Why not 100%?
• 19% think it is impossible??
• What is so special about the database?
Where is the gap?
![Page 19: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/19.jpg)
19
• The database holds your essential information
• Any changes can impact the entire system
• Need to be synchronized with other changes
• Often overlooked
Database is a Key Component
![Page 20: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/20.jpg)
20
• There is more to a database than SQL scripts
• Schema structure
• Code
• Content and meta-content
• Internal dependencies
• …
• Ensure that changes are not made without
authorization
• Ensure no out-of-process changes
Reaching Inside the Database
![Page 21: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/21.jpg)
21
• Old adage but true
• The database is often neglected and therefore can
become the weakest link
• Essential from a compliance and business point of
view
• Should be the strongest link
The Weakest Link In a Chain
![Page 22: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/22.jpg)
22
• Why?
Down from 81% to a HALF?
![Page 23: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/23.jpg)
23
• Silos exist…
• Don’t always communicate effectively
• Need to share knowledge
• Need to follow same procedures & best
practices
Developers and DBAs
![Page 24: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/24.jpg)
24
• Mistrust…
So why not move forward?
![Page 25: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/25.jpg)
25
Lets talk about Mistrust…
“it was difficult to track who made a change to a database object and
what change they made.” (working-around file based version control)
“it took hours to get releases working. some changes were not
documented and left out…” (manual and error prone releases)
“We had multiple releases to production every day. That is one release
a week with multiple follow up fixes, and yet more fixes”(code overrides, partial versions, wrong versions – all pushed to production)
“We recently had a disaster - the script in the version control was not
updated and when executed in production, ran the wrong revision. That
cost tens of thousands of $”(an out-of-process update to QA that was not properly tracked)
![Page 26: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/26.jpg)
26
• Root Causes for issues:
• Manual script based version control process
• Deployment tools unaware of version control
• No release automation red-flags…
![Page 27: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/27.jpg)
27
Mistrust in version control…
Version Control Process
(file based)
Development Process
Check-Out Script
Modify Script
Get updated Script from DB
Check-In Script
Compile Scriptin DB
Debug Scriptin DB
?
??
?
A
A’
![Page 28: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/28.jpg)
28
Scripts & Version Control
Challenges…
• Code-overrides
• Working on the wrong revisions
• Scripts do not always find their way to the version control solution
• Out of process updates go unnoticed
• Hard to locate outdated update scripts
Playing safe? what we really need:
• The actual code of the object
• The upgrade script
• A roll-back script
Scripts
• Hard to test in their entirely (holistically)
• Hard to test due to colliding dependencies
• Need to run in a specific order…
• Much harder to deal with project scope changes
![Page 29: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/29.jpg)
29
X1.11.1.11.11.21.31.41.51.61.7
Mistrust in scripting automation…
Int QA Stage Prod
Database Deploy Script
Environment
Re-Base (due to defects)
Dev
Dev
Dev
Model
1.1 1.2
1.2 1.3
1.3 1.4
1.4 1.5
1.5 1.6
1.6 1.7
1.11.11.41.7
1.1 1.2
1.2 1.3
1.3 1.4
1.4 1.5
1.5 1.6
1.6 1.7
1.1 1.2
1.2 1.3
1.3 1.4
1.4 1.5
1.5 1.6
1.6 1.7
Out of Process Change
X
X
X
X
X
? 1.1.1
X
![Page 30: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/30.jpg)
30
Scripts are static…
Scripts, unless super sophisticated:
• Unaware of changes made in the target environment
• Time passed from their coding to the time they are run
• Potentially overriding production hot-fixes or work done in parallel by
another team
Content changes are very hard to manage
• Metadata & lookup content does not practically fit into the VC
• In most cases they are simply not managed
![Page 31: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/31.jpg)
31
Gaining Trust!
Coordinated Process Traceability
Start in the Beginning
No Out-of-Process Changes
Impact Analysis
Automation
Task Based Development
Well Defined Processes
![Page 32: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/32.jpg)
32
Version Control - One Enforced Process
![Page 33: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/33.jpg)
33
Dealing with challenges…
Integrated Database Version Control process
• Leverage proven version control best practices
• Forcing check in & out for changes
• Labels
• etc..
• No code-overrides
• Always working with the correct revision
• All changes are documented
• Always know who did what, when, why and from where
• No out-of-process changes
• Supporting structure, code and content
No time spent on manual coding of the change scripts
![Page 34: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/34.jpg)
34
Bonus Points
Task based development…
• Correlate each database change with a change request
• Task ID
• Work Item
• Trouble Ticket
• CR
• etc…
…enables task based deployments• Partial deployments (a feature, a collection of bugs, etc…)
• Scope changes easily synced between code and database
![Page 35: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/35.jpg)
For deployment automation we need:
Repeatability & Safety
Using tools make sense …
![Page 36: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/36.jpg)
36
1.11.21.31.41.51.61.7
Build & Deploy On Demand
*
Int QA Stage Prod
Database Deploy Script
Environment* Execute the same script being executed at the Stage environment
Re-Base (due to defects)
Dev
Dev
Dev
Model
1.1 1.2
1.2 1.3
1.3 1.4
1.4 1.5
1.5 1.6
1.6 1.7
1.1 1.4
1.4 1.7
1.1.1 1.7
1.1 1.1 1.11.41.7
File Based Version Control
Out of Process Change
1.1.11.7 1.1.11.7
![Page 37: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/37.jpg)
Using tools
Test cases using compare & sync tools:
An index exists in source (QA) but not in target (Production)
What should we do? Add the index or not?
![Page 38: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/38.jpg)
38
Compare & Sync tools
Safe to automate?
Sure… (?)
![Page 39: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/39.jpg)
Deployment Automation
An index exists in Target (Production) but not in source (QA)
What should we do? Drop the index or not?
![Page 40: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/40.jpg)
40
Compare & Sync tools
Safe to automate?
No. Requires manual inspection…
![Page 41: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/41.jpg)
41
Safe?
Simple, right?NO! we are going to BREAK production without even
knowing…
![Page 42: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/42.jpg)
42
Why break production???
A compare & sync tool:
• Is unaware of any changes that occurred before the time it ran
• Has no knowledge of changes that took place at the target environment
• Does not leverage version control for more information
• Unable to deal with conflicts & merges between different teams
• Requires manual inspection
• Requires detailed knowledge regarding each change as part of the
process
Mistrust AGAIN…
So…no automation… as we fear automating problems into
production and a major risk!!!
![Page 43: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/43.jpg)
43
We need to leverage version control
into deployment decisions…
![Page 44: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/44.jpg)
Safety Net For Deployment Automation
Source vs. Target
Action
= No Action
≠ ?
Source vs. Baseline
Target vs. Baseline
Action
= = No Action
≠ = Deploy Changes
= ≠ Protect Target
≠ ≠ Merge Changes
You do not have all of the information
With Baselines and 3 way analysis the unknown is now known
Simple Compare & Sync Baseline aware Analysis
![Page 45: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/45.jpg)
45
Deploying Changes if Needed
Development Baseline
Previous Label /
Production Golden Copy
Production
If we had the index in the baseline =>
we should take it down from production…
(Deploy Change)
![Page 46: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/46.jpg)
46
Or Protecting Target Environment…
Development Baseline
Previous Label /
Production Golden Copy
Production
BUT… If no index in baseline =>
we should protect the NEW index on production!!!
(Protect Target)
![Page 47: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/47.jpg)
Deployment Automation
And Merge!!!
![Page 48: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/48.jpg)
48
Conflict Resolving – Database Code
![Page 49: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/49.jpg)
49
Conflict Resolving – Meta Data/Content
![Page 50: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/50.jpg)
50
Impact Analysis
![Page 51: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/51.jpg)
51
Impact Analysis! not Damage Control…
![Page 52: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/52.jpg)
52
Safety Net For Deployment Automation
Database Safe Deployment Automation:
• Leverages version control (baselines & previous revisions)
• Has a flexible scope (deploy multi schema to single task or work item)
• Can be run as a batch process (repeatable & consistent)
• Integrates to ALM (labels, CRs, Continuous Integration & Delivery)
• Deals with conflicts & merges to match code agility
Can raise red flags to stop the line…
if requires human intervention
![Page 53: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/53.jpg)
53
Mistrust
• Database Version control
• Database Automation
Awareness
![Page 54: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/54.jpg)
Summary - What is DBmaestro TeamWork?
• Database Enforced Change Management solution+ Database version control
+ Enforce best practices
+ Plugs into the ALM (change request, tickets & work items)
+ Database merge & change impact analysis
+ Know who can do what, where, when & why
• DevOps Solution for databases + Baseline aware deployment automation, rollback &
recovery
+ Reduce database deployment issues
+ Plugs into release management & Continuous Delivery
![Page 55: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/55.jpg)
55
Q & A
![Page 56: In (database) automation we trust](https://reader034.vdocuments.net/reader034/viewer/2022052622/559664841a28abf9338b4762/html5/thumbnails/56.jpg)