An overview of how Data-tier Applications (DACPACs) work with SQL Azure and SQL Server 2008. Also included is how this Microsoft technology fits in with a continuous integration (CI) process. Visit my blog for more details: http://andrewmatthewthompson.blogspot.com/
55. CONS
• All schema modifications should occur within Visual Studio
56. CONS
• All schema modifications should occur within Visual Studio
• Online documentation is a bit scarce
57. 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)
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
\n
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
Now look at us...\n\n0 to 8 engineers in 6 months... no more barbies\n
RESAAS is building a platform, by their very nature platforms needs to scale.\n
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
\n
The transition took us approx. 3 months\n
\n
Developer’s were trying to understand and fix things but were breaking things at the same time (affecting everybody)\n
And if you have one that’s working think about the productivity you might be losing\n
The problem gets worse as our team grows\n
Simple everyone develops on their own database...\n\nBut then we have another problem... how do we sync & merge together DB changes?\n
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
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
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
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
\n
We pick the SQL Server 2008 Database Project...\n
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
Contains all database schema objects AND when compiled produces a DACPAC\n
Individual SQL create scripts under each folder\n
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
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
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
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
Deep integration: DACPAC can be used in both SSMS & VS\n\nWorks with SQL Server & SQL Azure\n
\n
\n
\n
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
\n
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
\n
\n
\n
\n
PowerShell script\n\nGetting the options right and then upgrading are the most crucial parts\n
\n
This is currently a manual process for us. (Extra protection)\n
\n
\n
\n
This saves a lot of time for CI builds (if you don’t need to sync the DB then don’t)\n
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
\n
\n
Minor learning curve (most people are used to SSMS)\n\n
Minor learning curve (most people are used to SSMS)\n\n
Minor learning curve (most people are used to SSMS)\n\n
\n
\n
\n
\n
\n
\n
Options: Dataloss, Drift, Policy Validation\n\nYou can apply the exact same DACPAC and it does nothing\n
Options: Dataloss, Drift, Policy Validation\n\nYou can apply the exact same DACPAC and it does nothing\n
Options: Dataloss, Drift, Policy Validation\n\nYou can apply the exact same DACPAC and it does nothing\n
Continuous Deployment - DACPAC being one technology at the heart of this\n