SlideShare a Scribd company logo
1 of 71
SQL AZURE AND DATA-TIER APPLICATIONS

      Vancouver Windows Azure Meetup Group
ANDREW THOMPSON


      Senior Software Engineer @
Some Background First...
WE WERE BUILDING THIS

      Presentation tier



        Middle tier




         Data tier
BUT WE THOUGHT ABOUT THIS

                 Presentation tier



 Middle     Middle          Middle          Middle
  tier       tier            tier            tier



     Data tier      Data tier        Data tier
SO WE MOVED TO THE CLOUD

     Presentation tier



       Middle tier
                                  }   Web Roles




        Data tier
                         }   SQL Azure
3 Months
The Problem...
EVERYTHING WAS ALWAYS BROKEN

   Alter Table                  Alter Procedure



                   SQL Server




Create Procedure                  Drop Table
A single development database
     doesn't work for long.
Difficulty




            # Developers
How can we scale database
     modifications?
POSSIBILITIES
POSSIBILITIES


• Hand   rolled SQL scripts
POSSIBILITIES


• Hand   rolled SQL scripts

• Liquibase
POSSIBILITIES


• Hand   rolled SQL scripts

• Liquibase

• Redgate's   SQL tools
POSSIBILITIES


• Hand     rolled SQL scripts

• Liquibase

• Redgate's    SQL tools

• Visual   Studio’s database tools
What database project do we use?
Uh oh... we’re using the database project
What is a Data-tier Application?
TERMINOLOGY




http://dacguy.wordpress.com/2011/09/09/dac-concepts
TERMINOLOGY


• DAC




        http://dacguy.wordpress.com/2011/09/09/dac-concepts
TERMINOLOGY


• DAC

• DACFx




        http://dacguy.wordpress.com/2011/09/09/dac-concepts
TERMINOLOGY


• DAC

• DACFx

• DAC   Package (DACPAC)




        http://dacguy.wordpress.com/2011/09/09/dac-concepts
TERMINOLOGY


• DAC

• DACFx

• DAC   Package (DACPAC)

• BACPAC



        http://dacguy.wordpress.com/2011/09/09/dac-concepts
DACPAC
HOW DO YOU INTERACT
     WITH IT?
HOW DO YOU INTERACT
          WITH IT?


• Right-click   menus (SSMS or VS2010)
HOW DO YOU INTERACT
          WITH IT?


• Right-click   menus (SSMS or VS2010)

• .NET
HOW DO YOU INTERACT
          WITH IT?


• Right-click   menus (SSMS or VS2010)

• .NET

• PowerShell
GETTING STARTED


Extract a data-tier application from
      your existing database
USE CASE


Upgrade data-tier application locally
USE CASE


Upgrade data-tier application on CI
}
[Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo")
[Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Management.Sdk.Sfc")
[Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Management.Dac")
[Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.ConnectionInfo")             Dependencies

$sqlConnection = new-object System.Data.SqlClient.SqlConnection($connectionString)




                                                                                         }
$serverConnection = new-object Microsoft.SqlServer.Management.Common.ServerConnection(
    $sqlConnection)
$serverConnection.Connect();
$sqlStoreConnection = New-Object
    Microsoft.SqlServer.Management.Sdk.Sfc.SqlStoreConnection(
                                                                                             Connections
        $serverConnection.SqlConnectionObject)
$connectSuccessful = $sqlStoreConnection.Connect()
$dacStore = New-Object Microsoft.SqlServer.Management.Dac.DacStore($serverConnection)


$upgradeOptions = New-Object Microsoft.SqlServer.Management.Dac.DacUpgradeOptions
$upgradeOptions.BlockOnChanges = $false
$upgradeOptions.IgnoreDataLoss = $true
$upgradeOptions.RollbackonFailure = $true
$upgradeOptions.SkipPolicyValidation = $false
                                                                                         }   Options


$dacChanges = $dacStore.GetDatabaseChanges($dataTierAppNameToUpgrade)
    | Out-File -Filepath .DatabaseChanges.txt
$dacStore.GetIncrementalUpgradeScript($dataTierAppNameToUpgrade, $nextDacType)
    | Out-File -Filepath .DatabaseUpgrade.sql
                                                                                         }   Review


$dacStore.IncrementalUpgrade($dataTierAppNameToUpgrade, $nextDacType, $upgradeOptions)
                                                                                         }   Upgrade
USE CASE


Upgrade data-tier application on
         Production
Continuous Integration (CI)
TIP


  Use the DACPAC version # to
avoid pushing unnecessary changes
TIP


Watch out for previous DACFx
          versions
Pros & Cons...
CONS
CONS


• All   schema modifications should occur within Visual Studio
CONS


• All   schema modifications should occur within Visual Studio

• Online   documentation is a bit scarce
CONS


• All   schema modifications should occur within Visual Studio

• Online   documentation is a bit scarce

• Deployments     to SQL Azure can take a while (5 - 30 mins)
CONS
CONS



• Many   questions around how this works with Azure Data Sync
CONS



• Many    questions around how this works with Azure Data Sync

• It   won’t do everything for you
PROS
PROS


• Developers   can seamlessly sync database changes
PROS


• Developers   can seamlessly sync database changes

• Dev-ops   or DBAs can feel comfortable with DACPACs
PROS


• Developers   can seamlessly sync database changes

• Dev-ops   or DBAs can feel comfortable with DACPACs

• Code   analysis
PROS
PROS


• Options   to stop deployments under certain conditions
PROS


• Options   to stop deployments under certain conditions

• Schema/SQL    change tracking
PROS


• Options   to stop deployments under certain conditions

• Schema/SQL    change tracking

• You   define the schema and it figures out how to apply it
What will the future hold?
Questions?


andrew.thompson@resaas.com

More Related Content

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 

Recently uploaded (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

SQL Azure and Data-tier Applications (DACPAC)

Editor's Notes

  1. \n
  2. RESAAS: Social platform for real estate professionals to connect and communicate in real time\nElectrical and Computer Engineering Degree from UBC\nMedical robotics research (Cancer Agency), Advanced visualization at Toshiba Medical (EU), WebApps at Blast Radius\n
  3. \n
  4. May 7, 2011 just before I joined RESAAS as the first full-time engineer\n\nCEO’s daughter, so it started as a playground for barbies\n
  5. Now look at us...\n\n0 to 8 engineers in 6 months... no more barbies\n
  6. RESAAS is building a platform, by their very nature platforms needs to scale.\n
  7. How could we scale effectively without first provisioning all the hardware?\n\nWe could use Windows Azure\n\nLot’s of other technologies but these are the bear minimum\n
  8. \n
  9. The transition took us approx. 3 months\n
  10. \n
  11. Developer’s were trying to understand and fix things but were breaking things at the same time (affecting everybody)\n
  12. And if you have one that’s working think about the productivity you might be losing\n
  13. The problem gets worse as our team grows\n
  14. Simple everyone develops on their own database...\n\nBut then we have another problem... how do we sync & merge together DB changes?\n
  15. SQL: There has got to be a better way\nLiquibase: Stored procs are not supported\nRedgate would work fine but costs extra ($695)\nVS2010 Database tools are only available in Premium or Ultimate versions\n
  16. SQL: There has got to be a better way\nLiquibase: Stored procs are not supported\nRedgate would work fine but costs extra ($695)\nVS2010 Database tools are only available in Premium or Ultimate versions\n
  17. SQL: There has got to be a better way\nLiquibase: Stored procs are not supported\nRedgate would work fine but costs extra ($695)\nVS2010 Database tools are only available in Premium or Ultimate versions\n
  18. SQL: There has got to be a better way\nLiquibase: Stored procs are not supported\nRedgate would work fine but costs extra ($695)\nVS2010 Database tools are only available in Premium or Ultimate versions\n
  19. \n
  20. We pick the SQL Server 2008 Database Project...\n
  21. Not a good idea... SQL Azure’s subset of supported schema objects doesn’t work nicely with database projects.\n\nWe were told to use Data-tier applications\n
  22. Contains all database schema objects AND when compiled produces a DACPAC\n
  23. Individual SQL create scripts under each folder\n
  24. DAC: The general brand that encompasses all subsequent names and concepts\nDACFx: The actual framework consisting of several DLL files\nDACPAC: The file format used by DACFx to represent the full definition of an application (usually schema only). Best analogy: an MSI.\nBACPAC: The file format used by DACFx to contain the definition of an application as well as its (table) data.\n
  25. DAC: The general brand that encompasses all subsequent names and concepts\nDACFx: The actual framework consisting of several DLL files\nDACPAC: The file format used by DACFx to represent the full definition of an application (usually schema only). Best analogy: an MSI.\nBACPAC: The file format used by DACFx to contain the definition of an application as well as its (table) data.\n
  26. DAC: The general brand that encompasses all subsequent names and concepts\nDACFx: The actual framework consisting of several DLL files\nDACPAC: The file format used by DACFx to represent the full definition of an application (usually schema only). Best analogy: an MSI.\nBACPAC: The file format used by DACFx to contain the definition of an application as well as its (table) data.\n
  27. DAC: The general brand that encompasses all subsequent names and concepts\nDACFx: The actual framework consisting of several DLL files\nDACPAC: The file format used by DACFx to represent the full definition of an application (usually schema only). Best analogy: an MSI.\nBACPAC: The file format used by DACFx to contain the definition of an application as well as its (table) data.\n
  28. Deep integration: DACPAC can be used in both SSMS & VS\n\nWorks with SQL Server & SQL Azure\n
  29. \n
  30. \n
  31. \n
  32. data-tier application == database\n\nDevelopers will want to make changes and test them out\nAlso for sync’ing DB changes across the dev team\n
  33. \n
  34. data-tier application == database\n\nDevelopers will want to make changes and test them out\nAlso for sync’ing DB changes across the dev team\n
  35. \n
  36. \n
  37. \n
  38. \n
  39. PowerShell script\n\nGetting the options right and then upgrading are the most crucial parts\n
  40. \n
  41. This is currently a manual process for us. (Extra protection)\n
  42. \n
  43. \n
  44. \n
  45. This saves a lot of time for CI builds (if you don’t need to sync the DB then don’t)\n
  46. When using PowerShell to upgrade the database used by the CI build (i.e for tests)...\n... check whether to upgrade or not based on the version #\n
  47. \n
  48. \n
  49. Minor learning curve (most people are used to SSMS)\n\n
  50. Minor learning curve (most people are used to SSMS)\n\n
  51. Minor learning curve (most people are used to SSMS)\n\n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. Options: Dataloss, Drift, Policy Validation\n\nYou can apply the exact same DACPAC and it does nothing\n
  59. Options: Dataloss, Drift, Policy Validation\n\nYou can apply the exact same DACPAC and it does nothing\n
  60. Options: Dataloss, Drift, Policy Validation\n\nYou can apply the exact same DACPAC and it does nothing\n
  61. Continuous Deployment - DACPAC being one technology at the heart of this\n
  62. RESAAS will grow so get in touch.\n