SlideShare a Scribd company logo
SQL Server Continuous
Integration
Using Jenkins and Red Gate
Ernest Hwang
Principal Software Engineer, Practice Fusion
Presented to the
Silicon Valley SQL Server User Group
May 2013
Who am I?
• Ernest Hwang, Principal Software Engineer
at Practice Fusion in San Francisco
• C#, .NET, SQL Server Developer
• Working with SQL Server since 1999 (SQL Server 6.x)
• Using Red Gate for Continuous Integration since June
2011
• Someone who got tired of maintaining a folder of
database scripts for every release.
Why am I here?
• To show how easy it is to apply CI principals to
Database Development
What’s this?
A “How To” guide for automating your day-to-day
maintenance tasks by…
• *Easily* Versioning your database using Red Gate SQL Source
Control
• Using Continuous Integration (via Jenkins) to validate
Database builds
• Using Jenkins to automate database deployments
• Using CI / tSQLt / SQL Test to run unit tests
Prerequisites
• Experience with source control management systems
(svn, TFS, git, Hg)
• Familiarity with Continuous Integration Products
(Jenkins, Team City, Cruise Control)
• Awareness of build scripting languages (ant,
MSBuild)
What software is used?
• SQL Server 2008 / 2012
• Red Gate SQL Source Control
• Red Gate SQL Compare
• Red Gate SQL Data Compare
• Jenkins Continuous Integration Server
http://jenkins-ci.org/
– Promoted Build Plugin
– Copy Artifacts Plugin
– Version Plugin
– Git Plugin
• MSBuild
What is SQL Source Control?
• Source Control Plug in for SQL Server Management
Studio
• Creates a “snapshot” of the database schema defined by
CREATE scripts
• Snapshot is consumable by SQL Compare and may be
used to compare against the schema of an actual
database
What is SQL Source Control?
SQL Source Control is to SSMS
as
TortoiseSVN is to Windows Explorer
Demo Environment
GitHub
Local Copy of
RGDemo database
Dev, QA, & Prod
Databases
Developer Workstation
Build and Database Server
(Windows Azure VM)
Committing Changes to Source
Control
Demo
Local Database
Changes
Commit Changes
via SQL Source
Control
Changes committed to
SCM repository
How does Continuous Integration fit
in?
• The CI server polls the repository for changes
• When changes are checked in, the CI job kicks off
– Verifies that the database can be built
• Builds a brand new database from scratch using SQL
Compare and SQL Data Compare
– Runs unit tests
• Build should fail if unit tests do not succeed
– Archives the artifacts (for deployments)
• Artifacts can include build/test reports
– Emails engineers if there are problems
Breaking the Build
Demo
Commit Changes
via SQL Source
Control
CI Server Detects Changes
Kicks off Build Process
Build can pass or
fail validation
Deploying Changes to Different
Environments
• The Promoted Builds plug in can be used to deploy
changes to Integration/QA/Staging/Production
environments
• SQL Compare and SQL Data Compare are used to
deploy changes between the sourced controlled
database and your development environments
• Deploying to Production and/or Staging can be
configured to just create the scripts as opposed to
forcing the synchronization
Deploying to Dev / QA
Demo
SQL Source Control
Repository
SQL Compare Development Environment
Database
Creating a Database “Version”
• Make sure the Jenkins Versioning plugin is installed
• Create a User Defined Function called
dbo.DATABASE_VERSION()
• Create a build step that updates the UDF with the
version number
• The updated UDF will be archived and used with
deployments
Versioning your Database
Demo
Commit Changes
via SQL Source
Control
CI Server Detects
Changes
Kicks off Build
Process
Build Task updates
dbo.DATABASE_VERSION()
Function
Updated UDF
Archived
Unit Testing with tSQLt and SQL Test
• tSQLt is an open source set of stored procedures and
functions to facilitate Unit Testing in SQL databases
• SQL Test is a wrapper around this framework that
integrates with SSMS
• Your build server can enforce that your unit tests pass
and generate reports
Unit Testing with tSQLt / SQL Test
Demo
Commit Changes
via SQL Source
Control
CI Server Detects
Changes
Kicks off Build
Process
Build Task executes
Unit Test procedures
Tests can pass or
fail the build
What did SQL Source Control do for us?
• Saves developers time (yay!)
– No more maintaining update scripts
– Don’t need to deploy scripts when QA needs changes
• Identifies holes in your deployment process
– Are developers making changes directly to
production?
– Are indexes/constraints missing from your
Dev/QA/Prod environments?
• Creates a definitive database build that can be easily
deployed and redeployed
Considerations
• Environments must be pristine
• Process must be changed and understood
• Production change scripts should be scrutinized
(especially for the first few releases)
• Migration Scripts can be used to massage data
• DB Replication requires more work for promotions
Appendix 1: Other CI Servers
• Jenkins (open source)
• Team City (JetBrains)
• Bamboo (Atlassian)
• CruiseControl / CruiseControl.NET (open source)
Appendix 2: Other Source Control
Systems
• Subversion (SVN)
• Git
• Team Foundation Server
• Mercurial (Hg)
• AccuRev
• Surround SCM
Links / Contact Info
• ehwang@practicefusion.com
• @ernestedcode
• https://github.com/CF9/Databases.RGDemo
• Practice Fusion is Hiring (email me)
http://practicefusion.com/careers/
• facebook.com/practicefusion
• @practicefusion

More Related Content

What's hot (20)

PDF
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
Edureka!
 
PPTX
DBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
DBmaestro - Database DevOps
 
PPTX
Best Practices for Database Deployments
Red Gate Software
 
PPTX
The Challenges & Pitfalls of Database Continuous Delivery
Perforce
 
PPTX
In (database) automation we trust
DBmaestro - Database DevOps
 
ZIP
Continuous Integration, Build Pipelines and Continuous Deployment
Christopher Read
 
PDF
Why source control your Oracle Database?
Red Gate Software
 
PPTX
Why retail companies can't afford database downtime
DBmaestro - Database DevOps
 
PDF
Continuous integration
hugo lu
 
PPTX
Challenges and Best Practices of Database Continuous Delivery
DBmaestro - Database DevOps
 
PPTX
Continuous Delivery & the Database- The Final Frontier
DBmaestro - Database DevOps
 
PPTX
Continuous Delivery & the Database - the Final Frontier
XebiaLabs
 
PPTX
Challenges and best practices of database continuous delivery
DBmaestro - Database DevOps
 
PPT
Continuous integration
amscanne
 
PDF
Introduction to CICD
Knoldus Inc.
 
PPTX
Delphix and DBmaestro
Kyle Hailey
 
PPTX
Jenkins - From Continuous Integration to Continuous Delivery
Virendra Bhalothia
 
PDF
Continuous Delivery Distilled
Matt Callanan
 
PDF
Continuous Integration, Continuous Quality, Continuous Delivery
John Ferguson Smart Limited
 
PDF
The future of DevOps: fully left-shifted deployments with version control and...
Red Gate Software
 
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
Edureka!
 
DBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
DBmaestro - Database DevOps
 
Best Practices for Database Deployments
Red Gate Software
 
The Challenges & Pitfalls of Database Continuous Delivery
Perforce
 
In (database) automation we trust
DBmaestro - Database DevOps
 
Continuous Integration, Build Pipelines and Continuous Deployment
Christopher Read
 
Why source control your Oracle Database?
Red Gate Software
 
Why retail companies can't afford database downtime
DBmaestro - Database DevOps
 
Continuous integration
hugo lu
 
Challenges and Best Practices of Database Continuous Delivery
DBmaestro - Database DevOps
 
Continuous Delivery & the Database- The Final Frontier
DBmaestro - Database DevOps
 
Continuous Delivery & the Database - the Final Frontier
XebiaLabs
 
Challenges and best practices of database continuous delivery
DBmaestro - Database DevOps
 
Continuous integration
amscanne
 
Introduction to CICD
Knoldus Inc.
 
Delphix and DBmaestro
Kyle Hailey
 
Jenkins - From Continuous Integration to Continuous Delivery
Virendra Bhalothia
 
Continuous Delivery Distilled
Matt Callanan
 
Continuous Integration, Continuous Quality, Continuous Delivery
John Ferguson Smart Limited
 
The future of DevOps: fully left-shifted deployments with version control and...
Red Gate Software
 

Viewers also liked (10)

PDF
Best Practices for Database Deployments - Grant Fritchey, Justin Caldicott - ...
Red Gate Software
 
PDF
Meetup_Warsaw_Lean_Startup&Innovations_in_Corpo_1
Bartek Janowicz
 
PDF
Lean Startup Machine Warsaw - first edition
Bartek Janowicz
 
PPTX
Evolution of Agile world with Lean Startup Concepts
ShriKant Vashishtha
 
PDF
Lean startup conference '2014_corporate_innovations
Bartek Janowicz
 
PDF
Lean leadership w google campus 16062016
Bartek Janowicz
 
PPTX
Large scale automation with jenkins
Kohsuke Kawaguchi
 
PPTX
Introduction to jenkins
Abe Diaz
 
PDF
There is no snapshot
Ole Christian Langfjæran
 
PDF
Apply the Lean Startup in B2B to Build Products Businesses Want (Course Slides)
Étienne Garbugli
 
Best Practices for Database Deployments - Grant Fritchey, Justin Caldicott - ...
Red Gate Software
 
Meetup_Warsaw_Lean_Startup&Innovations_in_Corpo_1
Bartek Janowicz
 
Lean Startup Machine Warsaw - first edition
Bartek Janowicz
 
Evolution of Agile world with Lean Startup Concepts
ShriKant Vashishtha
 
Lean startup conference '2014_corporate_innovations
Bartek Janowicz
 
Lean leadership w google campus 16062016
Bartek Janowicz
 
Large scale automation with jenkins
Kohsuke Kawaguchi
 
Introduction to jenkins
Abe Diaz
 
There is no snapshot
Ole Christian Langfjæran
 
Apply the Lean Startup in B2B to Build Products Businesses Want (Course Slides)
Étienne Garbugli
 
Ad

Similar to Microsoft SQL Server Continuous Integration (20)

PDF
Database Build and Release - SQL In The City - Ernest Hwang
Red Gate Software
 
PPTX
#DOAW16 - DevOps@work Roma 2016 - Databases under source control
Alessandro Alpi
 
PDF
KoprowskiT_Session2_SDNEvent_SourceControlForDBA
Tobias Koprowski
 
PPTX
Sql source control
AndyPickett
 
PPTX
Part of the DLM Story: Automated database build and test with TeamCity
Red Gate Software
 
PPTX
Getting CI right for SQL Server
Alex Yates
 
PDF
Database CI Demo Using Sql Server
Umesh Kumar
 
PDF
Microsoft SQL server 2017 Level 300 technical deck
George Walters
 
PPTX
Database CI/CD Pipeline
muhammadhashir57
 
PDF
Automated Build and Test (for Continuous Integration) - David Atkinson - SQL ...
Red Gate Software
 
PDF
Using Redgate, AKS and Azure to bring DevOps to your Database
Red Gate Software
 
PDF
Using Redgate, AKS and Azure to bring DevOps to your database
Red Gate Software
 
PPTX
Continuous integration sql in the city
Ike Ellis
 
PDF
Database Source Control: Migrations vs State
Eduardo Piairo
 
PPTX
DevOps+Data: Working with Source Control
Ed Leighton-Dick
 
PDF
Databases in a Continuous Integration/Delivery Process
TechWell
 
PPTX
Bringing DevOps to the Database
Michaela Murray
 
PPTX
Redgate Database Devops Demo webinar - Visual Studio Team Services - 21st Fe...
KateDuggan2
 
PPTX
Extending DevOps practices to SQL Server databases - branching & merging with...
Red Gate Software
 
PPTX
[ENG] Sql Saturday 355 in Parma - New "SQL Server databases under source cont...
Alessandro Alpi
 
Database Build and Release - SQL In The City - Ernest Hwang
Red Gate Software
 
#DOAW16 - DevOps@work Roma 2016 - Databases under source control
Alessandro Alpi
 
KoprowskiT_Session2_SDNEvent_SourceControlForDBA
Tobias Koprowski
 
Sql source control
AndyPickett
 
Part of the DLM Story: Automated database build and test with TeamCity
Red Gate Software
 
Getting CI right for SQL Server
Alex Yates
 
Database CI Demo Using Sql Server
Umesh Kumar
 
Microsoft SQL server 2017 Level 300 technical deck
George Walters
 
Database CI/CD Pipeline
muhammadhashir57
 
Automated Build and Test (for Continuous Integration) - David Atkinson - SQL ...
Red Gate Software
 
Using Redgate, AKS and Azure to bring DevOps to your Database
Red Gate Software
 
Using Redgate, AKS and Azure to bring DevOps to your database
Red Gate Software
 
Continuous integration sql in the city
Ike Ellis
 
Database Source Control: Migrations vs State
Eduardo Piairo
 
DevOps+Data: Working with Source Control
Ed Leighton-Dick
 
Databases in a Continuous Integration/Delivery Process
TechWell
 
Bringing DevOps to the Database
Michaela Murray
 
Redgate Database Devops Demo webinar - Visual Studio Team Services - 21st Fe...
KateDuggan2
 
Extending DevOps practices to SQL Server databases - branching & merging with...
Red Gate Software
 
[ENG] Sql Saturday 355 in Parma - New "SQL Server databases under source cont...
Alessandro Alpi
 
Ad

More from Mark Ginnebaugh (20)

PDF
Automating Microsoft Power BI Creations 2015
Mark Ginnebaugh
 
PDF
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Mark Ginnebaugh
 
PDF
Platfora - An Analytics Sandbox In A World Of Big Data
Mark Ginnebaugh
 
PDF
Microsoft SQL Server Relational Databases and Primary Keys
Mark Ginnebaugh
 
PDF
DesignMind Microsoft Business Intelligence SQL Server
Mark Ginnebaugh
 
PDF
San Francisco Bay Area SQL Server July 2013 meetings
Mark Ginnebaugh
 
PDF
Silicon Valley SQL Server User Group June 2013
Mark Ginnebaugh
 
PDF
Hortonworks Big Data & Hadoop
Mark Ginnebaugh
 
PDF
Microsoft SQL Server Physical Join Operators
Mark Ginnebaugh
 
PDF
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Mark Ginnebaugh
 
PDF
Fusion-io Memory Flash for Microsoft SQL Server 2012
Mark Ginnebaugh
 
PDF
Microsoft Data Mining 2012
Mark Ginnebaugh
 
PDF
Microsoft SQL Server PASS News August 2012
Mark Ginnebaugh
 
PDF
Business Intelligence Dashboard Design Best Practices
Mark Ginnebaugh
 
PDF
Microsoft Mobile Business Intelligence
Mark Ginnebaugh
 
PDF
Microsoft SQL Server 2012 Cloud Ready
Mark Ginnebaugh
 
PDF
Microsoft SQL Server 2012 Master Data Services
Mark Ginnebaugh
 
PDF
Microsoft SQL Server PowerPivot
Mark Ginnebaugh
 
PDF
Microsoft SQL Server Testing Frameworks
Mark Ginnebaugh
 
PDF
Microsoft SQL Server - How to Collaboratively Manage Excel Data
Mark Ginnebaugh
 
Automating Microsoft Power BI Creations 2015
Mark Ginnebaugh
 
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Mark Ginnebaugh
 
Platfora - An Analytics Sandbox In A World Of Big Data
Mark Ginnebaugh
 
Microsoft SQL Server Relational Databases and Primary Keys
Mark Ginnebaugh
 
DesignMind Microsoft Business Intelligence SQL Server
Mark Ginnebaugh
 
San Francisco Bay Area SQL Server July 2013 meetings
Mark Ginnebaugh
 
Silicon Valley SQL Server User Group June 2013
Mark Ginnebaugh
 
Hortonworks Big Data & Hadoop
Mark Ginnebaugh
 
Microsoft SQL Server Physical Join Operators
Mark Ginnebaugh
 
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Mark Ginnebaugh
 
Fusion-io Memory Flash for Microsoft SQL Server 2012
Mark Ginnebaugh
 
Microsoft Data Mining 2012
Mark Ginnebaugh
 
Microsoft SQL Server PASS News August 2012
Mark Ginnebaugh
 
Business Intelligence Dashboard Design Best Practices
Mark Ginnebaugh
 
Microsoft Mobile Business Intelligence
Mark Ginnebaugh
 
Microsoft SQL Server 2012 Cloud Ready
Mark Ginnebaugh
 
Microsoft SQL Server 2012 Master Data Services
Mark Ginnebaugh
 
Microsoft SQL Server PowerPivot
Mark Ginnebaugh
 
Microsoft SQL Server Testing Frameworks
Mark Ginnebaugh
 
Microsoft SQL Server - How to Collaboratively Manage Excel Data
Mark Ginnebaugh
 

Recently uploaded (20)

PDF
LDM Recording for Yogi Goddess Projects Summer 2025
LDMMia GrandMaster
 
PDF
FastnersFastnersFastnersFastnersFastners
mizhanw168
 
PDF
The Complete Guide to SME IPO in 2025.pdf
India IPO
 
DOCX
DiscoveryBit The 21st century seen.docx
seomehk
 
PDF
Buy Facebook Accounts Buy Facebook Accounts
darlaknowles49
 
PDF
Reflect, Refine & Implement In-Person Business Growth Workshop.pdf
TheoRuby
 
PPTX
Top Oil and Gas Companies in India Fuelling the Nation’s Growth.pptx
Essar Group
 
PDF
Robbie Teehan - Owns The Pro Composer
Robbie Teehan
 
PDF
Gabino Barbosa - A Master Of Efficiency
Gabino Barbosa
 
PPTX
Technical Analysis of 1st Generation Biofuel Feedstocks - 25th June 2025
TOFPIK
 
PPTX
Revolutionizing Retail: The Impact of Artificial Intelligence
RUPAL AGARWAL
 
PPTX
Business profile making an example ppt for small scales
Bindu222929
 
PPTX
Asia Pacific Tropical Fruit Puree Market Overview & Growth
chanderdeepseoexpert
 
PDF
How do we fix the Messed Up Corporation’s System diagram?
YukoSoma
 
PDF
NewBase 03 July 2025 Energy News issue - 1799 by Khaled Al Awadi_compressed.pdf
Khaled Al Awadi
 
PDF
Flexible Metal Hose & Custom Hose Assemblies
McGill Hose & Coupling Inc
 
PDF
Top Trends Redefining B2B Apparel Exporting in 2025
ananyaa2255
 
PDF
Native Sons Of The Golden West - Boasts A Legacy Of Impactful Leadership
Native Sons of the Golden West
 
PPTX
Ensar Capabilities by team ensar (1).pptx
redyamanil
 
PDF
Jordan Minnesota City Codes and Ordinances
Forklift Trucks in Minnesota
 
LDM Recording for Yogi Goddess Projects Summer 2025
LDMMia GrandMaster
 
FastnersFastnersFastnersFastnersFastners
mizhanw168
 
The Complete Guide to SME IPO in 2025.pdf
India IPO
 
DiscoveryBit The 21st century seen.docx
seomehk
 
Buy Facebook Accounts Buy Facebook Accounts
darlaknowles49
 
Reflect, Refine & Implement In-Person Business Growth Workshop.pdf
TheoRuby
 
Top Oil and Gas Companies in India Fuelling the Nation’s Growth.pptx
Essar Group
 
Robbie Teehan - Owns The Pro Composer
Robbie Teehan
 
Gabino Barbosa - A Master Of Efficiency
Gabino Barbosa
 
Technical Analysis of 1st Generation Biofuel Feedstocks - 25th June 2025
TOFPIK
 
Revolutionizing Retail: The Impact of Artificial Intelligence
RUPAL AGARWAL
 
Business profile making an example ppt for small scales
Bindu222929
 
Asia Pacific Tropical Fruit Puree Market Overview & Growth
chanderdeepseoexpert
 
How do we fix the Messed Up Corporation’s System diagram?
YukoSoma
 
NewBase 03 July 2025 Energy News issue - 1799 by Khaled Al Awadi_compressed.pdf
Khaled Al Awadi
 
Flexible Metal Hose & Custom Hose Assemblies
McGill Hose & Coupling Inc
 
Top Trends Redefining B2B Apparel Exporting in 2025
ananyaa2255
 
Native Sons Of The Golden West - Boasts A Legacy Of Impactful Leadership
Native Sons of the Golden West
 
Ensar Capabilities by team ensar (1).pptx
redyamanil
 
Jordan Minnesota City Codes and Ordinances
Forklift Trucks in Minnesota
 

Microsoft SQL Server Continuous Integration

  • 1. SQL Server Continuous Integration Using Jenkins and Red Gate Ernest Hwang Principal Software Engineer, Practice Fusion Presented to the Silicon Valley SQL Server User Group May 2013
  • 2. Who am I? • Ernest Hwang, Principal Software Engineer at Practice Fusion in San Francisco • C#, .NET, SQL Server Developer • Working with SQL Server since 1999 (SQL Server 6.x) • Using Red Gate for Continuous Integration since June 2011 • Someone who got tired of maintaining a folder of database scripts for every release.
  • 3. Why am I here? • To show how easy it is to apply CI principals to Database Development
  • 4. What’s this? A “How To” guide for automating your day-to-day maintenance tasks by… • *Easily* Versioning your database using Red Gate SQL Source Control • Using Continuous Integration (via Jenkins) to validate Database builds • Using Jenkins to automate database deployments • Using CI / tSQLt / SQL Test to run unit tests
  • 5. Prerequisites • Experience with source control management systems (svn, TFS, git, Hg) • Familiarity with Continuous Integration Products (Jenkins, Team City, Cruise Control) • Awareness of build scripting languages (ant, MSBuild)
  • 6. What software is used? • SQL Server 2008 / 2012 • Red Gate SQL Source Control • Red Gate SQL Compare • Red Gate SQL Data Compare • Jenkins Continuous Integration Server http://jenkins-ci.org/ – Promoted Build Plugin – Copy Artifacts Plugin – Version Plugin – Git Plugin • MSBuild
  • 7. What is SQL Source Control? • Source Control Plug in for SQL Server Management Studio • Creates a “snapshot” of the database schema defined by CREATE scripts • Snapshot is consumable by SQL Compare and may be used to compare against the schema of an actual database
  • 8. What is SQL Source Control? SQL Source Control is to SSMS as TortoiseSVN is to Windows Explorer
  • 9. Demo Environment GitHub Local Copy of RGDemo database Dev, QA, & Prod Databases Developer Workstation Build and Database Server (Windows Azure VM)
  • 10. Committing Changes to Source Control Demo Local Database Changes Commit Changes via SQL Source Control Changes committed to SCM repository
  • 11. How does Continuous Integration fit in? • The CI server polls the repository for changes • When changes are checked in, the CI job kicks off – Verifies that the database can be built • Builds a brand new database from scratch using SQL Compare and SQL Data Compare – Runs unit tests • Build should fail if unit tests do not succeed – Archives the artifacts (for deployments) • Artifacts can include build/test reports – Emails engineers if there are problems
  • 12. Breaking the Build Demo Commit Changes via SQL Source Control CI Server Detects Changes Kicks off Build Process Build can pass or fail validation
  • 13. Deploying Changes to Different Environments • The Promoted Builds plug in can be used to deploy changes to Integration/QA/Staging/Production environments • SQL Compare and SQL Data Compare are used to deploy changes between the sourced controlled database and your development environments • Deploying to Production and/or Staging can be configured to just create the scripts as opposed to forcing the synchronization
  • 14. Deploying to Dev / QA Demo SQL Source Control Repository SQL Compare Development Environment Database
  • 15. Creating a Database “Version” • Make sure the Jenkins Versioning plugin is installed • Create a User Defined Function called dbo.DATABASE_VERSION() • Create a build step that updates the UDF with the version number • The updated UDF will be archived and used with deployments
  • 16. Versioning your Database Demo Commit Changes via SQL Source Control CI Server Detects Changes Kicks off Build Process Build Task updates dbo.DATABASE_VERSION() Function Updated UDF Archived
  • 17. Unit Testing with tSQLt and SQL Test • tSQLt is an open source set of stored procedures and functions to facilitate Unit Testing in SQL databases • SQL Test is a wrapper around this framework that integrates with SSMS • Your build server can enforce that your unit tests pass and generate reports
  • 18. Unit Testing with tSQLt / SQL Test Demo Commit Changes via SQL Source Control CI Server Detects Changes Kicks off Build Process Build Task executes Unit Test procedures Tests can pass or fail the build
  • 19. What did SQL Source Control do for us? • Saves developers time (yay!) – No more maintaining update scripts – Don’t need to deploy scripts when QA needs changes • Identifies holes in your deployment process – Are developers making changes directly to production? – Are indexes/constraints missing from your Dev/QA/Prod environments? • Creates a definitive database build that can be easily deployed and redeployed
  • 20. Considerations • Environments must be pristine • Process must be changed and understood • Production change scripts should be scrutinized (especially for the first few releases) • Migration Scripts can be used to massage data • DB Replication requires more work for promotions
  • 21. Appendix 1: Other CI Servers • Jenkins (open source) • Team City (JetBrains) • Bamboo (Atlassian) • CruiseControl / CruiseControl.NET (open source)
  • 22. Appendix 2: Other Source Control Systems • Subversion (SVN) • Git • Team Foundation Server • Mercurial (Hg) • AccuRev • Surround SCM
  • 23. Links / Contact Info • [email protected] • @ernestedcode • https://github.com/CF9/Databases.RGDemo • Practice Fusion is Hiring (email me) http://practicefusion.com/careers/ • facebook.com/practicefusion • @practicefusion