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

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
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
 

Recently uploaded (20)

+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...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

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