Successfully reported this slideshow.
Your SlideShare is downloading. ×

Deploying data tier applications sql saturday dc

Loading in …3

Check these out next

1 of 26 Ad

More Related Content

Slideshows for you (20)

Similar to Deploying data tier applications sql saturday dc (20)


More from Joseph D'Antoni (20)

Recently uploaded (20)


Deploying data tier applications sql saturday dc

  1. 1. Deploying Data Tier Applications with VS 2010 and SQL Server 2008 R2<br />Joe D’Antoni<br />PSSUG 08 December 2010<br />
  2. 2. <ul><li>DBA with 10+ years of experience
  3. 3. Primarily in health care
  4. 4. Vice President of the Philadelphia SQL Server User Group
  5. 5. I like to talk about and use new technologies
  6. 6. @jdanton on Twitter</li></ul>About Me <br />
  7. 7. My favorite moment… <br />
  8. 8. Data Tier Applications<br />Requirements<br />The Good, the Bad and the Ugly<br />Demos<br />Overview <br />
  9. 9.
  10. 10. DBAs and Developers<br />
  11. 11. How Did We Get Here? <br />
  12. 12. <ul><li>New feature in SQL Server 2008 R2
  13. 13. Allows developers to own the database schema and definitions
  14. 14. Still needs work (more to come)
  15. 15. Microsoft seems to have invested deeply to build this, so it will get better (hopefully)
  16. 16. Interacts with SQL Azure—way to deploy applications there</li></ul>Data Tier Applications<br />
  17. 17. “A data-tier application (DAC) is an entity that contains all of the database and instance objects used by an application. A DAC provides a single unit for authoring, deploying, and managing the data-tier objects instead of having to manage them separately. A DAC allows tighter integration of data-tier development with the development of the associated application code. It also gives administrators an application level view of resource usage in their systems.“<br />Definition (Books Online) <br />
  18. 18. Visual Studio 2010<br />SQL Server 2008 R2 Enterprise (for deployments—Data Tier Applications can be created from versions of SQL back to 2000) or SQL Azure<br />Requirements <br />
  19. 19. Model for Development<br />Data-Tier Application Project<br />(Departmental apps in V1)<br />Database Project<br />(Mission or business critical)<br />Visual Studio<br />Visual Studio<br />Build<br />Build<br />.sql<br />Generate scripts<br />Deploy<br />.dacpac<br />.dbschema<br />SQL Server 2008 R2<br />Deploy<br />
  20. 20. Architecture<br />
  21. 21. Target DBs for DAC V1<br />Number of Apps<br />CRM<br />ERP<br />App Sophistication<br />
  22. 22. What’s in a DACPAC File<br />
  23. 23. Sounds pretty cool right?<br />
  24. 24. We’re going to be here for a while.<br />Extended Stored Procedures<br />XML Schema Collections<br />XML Indexes<br />SQL Server Passwords<br />CLR Objects<br />SQL Server Service Broker<br />Limitations (The Bad) <br />
  25. 25. Filestream columns<br />Symmetric keys, asymmetric keys, certificates<br />DDL triggers<br />Application roles<br />Full-text catalog objects<br />Encrypted objects (for example, encrypted stored procedures, views, functions, and triggers)<br />Objects containing cross-database dependencies and linked server references<br />Extended properties<br />Synonyms<br />Limitations (continued)<br />
  26. 26. Problems?<br />
  27. 27. The upgrade process<br />Generates new database with a temporary name<br />Generates all of the objects in the new database<br />Moves all data from the V 1.0 database to V 1.1 database<br />Requires data file space full size of database twice.<br />Also requires transaction log space for the largest table in the database<br />Not all databases can be converted into DACPACs<br />Pubs and Northwind do not work<br />Problems (The Ugly) <br />
  28. 28. Required for SQL Azure<br />Better SQL code management<br />If you are developing fairly simple applications—this can be a great utility.<br />Example—My shop does a good bit of in house web development, with small SQL Server databases, most are compatible.<br />Speculation in that version two of DACPAC will work with older versions of SQL Server and be more feature rich.<br />Why Use Data Tier Applications<br />
  29. 29. MSDB<br />[dbo].[sp_sysdac_rename_database] <br />[dbo].[sp_sysdac_setreadonly_database]<br />[dbo].[sp_sysdac_update_history_entry]<br />Recovery model is pulled from Model on target instance <br />Internals <br />
  30. 30. Building and Deploying Data Tier Application <br />Demos<br />
  31. 31. MS White Paper<br /><br />References<br />
  32. 32. Questions<br />
  33. 33. Data Tier Applications can make database code deployments more consistent<br />Currently this feature has a lot of limitations<br />Overall, it’s worth learning and will get better in time.<br />Summary<br />
  34. 34. @jdanton on Twitter<br /><br />Contact Info<br />