{"id":491,"date":"2012-05-16T12:10:00","date_gmt":"2012-05-16T12:10:00","guid":{"rendered":"\/blogs\/bobb\/post\/DACFx-30-The-new-programming-API.aspx"},"modified":"2014-01-20T12:22:02","modified_gmt":"2014-01-20T20:22:02","slug":"dacfx-3-0-the-new-programming-api","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/bobb\/dacfx-3-0-the-new-programming-api\/","title":{"rendered":"DACFx 3.0: The new programming API"},"content":{"rendered":"<p>\nLooking at the API and at the serialized form (i.e. the DACPAC), it turns out that DACFx 3.0 is not just &quot;DAC V-next&quot;. It&#39;s an entire quantum change&nbsp;from all other versions, including DAC 2.0, the version that introduced the BACPAC (serialized schema and data). This has some interesting repercussions with compatibility. Let&#39;s start with the &quot;native&quot; API (meaning, programming over the DLL directly, I&#39;ll leave the REST API used by SQL Azure Portal&#39;s&nbsp;Import\/Export for another time).\n<\/p>\n<p>\nThe DACFx 3.0 API lives in a different DLL than previous versions of DAC. The old DAC (2.0 and below) lives in Microsoft.SqlServer.Management.Dac; DACFx 3.0 lives in Microsoft.SqlServer.Dac. The API is quite different with respect to classes and methods then the <a href=\"http:\/\/www.sqlmag.com\/article\/sql-server\/datatier-apps-sql-azure-databases-140919\">one I wrote about<\/a> in SQL Server Magazine&#39;s Jan 2012 issue. Instead of using the DacStore and DacExtractionUnit classes from previous versions, most everything has been refactored into the all-new DacServices controller class. This new controller class contains most of the methods from the original DAC (albeit with different names like Deploy, Extract, Register, Unregister) along with new methods that generate a drift report and methods to Export and Import the BACPAC (schema and data) format. The one method that&#39;s been dropped in the new API is the Uninstall (unregister and drop database) method.\n<\/p>\n<p>\nOne other difference is that DACFx 3.0 can work with DACPACs and BACPACs from previous DAC versions, but can only emit DAC 3.0 formats. The upshot of this is you can&#39;t use a DACPAC from SQL Server Data Tools or SSMS 2012 with earlier versions or tools.\n<\/p>\n<p>\nThe nice improvement we get from the DACFx 3.0 format is support for almost every object in SQL Server 2005-2012. In addition, when using the 3.0 APIs directly, or with SSDT, there are i<span style=\"line-height: 115%; font-family: 'Verdana','sans-serif'; font-size: 8.5pt\">nfinitely<\/span> more options for working with DACPAC, encapsulated in the DacDeployOptions or DacExtractOptions classes. These options are exposed by SSDT as project properties, and its command-line utility, SqlPackage as command-line parameters as well. Some random examples would be the deploy option to &quot;BlockWhenDriftDetected&quot; or the extract option to &quot;IgnoreUserLoginMappings&quot;.\n<\/p>\n<p>\nYou can read the documentation for the new classes in Microsoft.SqlServer.Dac <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/hh753459\">here<\/a>.\n<\/p>\n<p>\n@bobbeauch<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Looking at the API and at the serialized form (i.e. the DACPAC), it turns out that DACFx 3.0 is not just &quot;DAC V-next&quot;. It&#39;s an entire quantum change&nbsp;from all other versions, including DAC 2.0, the version that introduced the BACPAC (serialized schema and data). This has some interesting repercussions with compatibility. Let&#39;s start with the [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,31,33],"tags":[],"class_list":["post-491","post","type-post","status-publish","format-standard","hentry","category-data-tier-applications-dac","category-sql-server-2012","category-sql-server-data-tools"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.9.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>DACFx 3.0: The new programming API - Bob Beauchemin<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlskills.com\/blogs\/bobb\/dacfx-3-0-the-new-programming-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DACFx 3.0: The new programming API - Bob Beauchemin\" \/>\n<meta property=\"og:description\" content=\"Looking at the API and at the serialized form (i.e. the DACPAC), it turns out that DACFx 3.0 is not just &quot;DAC V-next&quot;. It&#039;s an entire quantum change&nbsp;from all other versions, including DAC 2.0, the version that introduced the BACPAC (serialized schema and data). This has some interesting repercussions with compatibility. Let&#039;s start with the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/bobb\/dacfx-3-0-the-new-programming-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Bob Beauchemin\" \/>\n<meta property=\"article:published_time\" content=\"2012-05-16T12:10:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-01-20T20:22:02+00:00\" \/>\n<meta name=\"author\" content=\"Bob Beauchemin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bob Beauchemin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/dacfx-3-0-the-new-programming-api\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/dacfx-3-0-the-new-programming-api\/\",\"name\":\"DACFx 3.0: The new programming API - Bob Beauchemin\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website\"},\"datePublished\":\"2012-05-16T12:10:00+00:00\",\"dateModified\":\"2014-01-20T20:22:02+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/dacfx-3-0-the-new-programming-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/bobb\/dacfx-3-0-the-new-programming-api\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/dacfx-3-0-the-new-programming-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Data-Tier Applications (DAC)\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/category\/data-tier-applications-dac\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"DACFx 3.0: The new programming API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/\",\"name\":\"Bob Beauchemin\",\"description\":\"SQL Server Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e\",\"name\":\"Bob Beauchemin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g\",\"caption\":\"Bob Beauchemin\"},\"sameAs\":[\"http:\/www.sqlskills.com\/blogs\/bobb\/\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/author\/bobb\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DACFx 3.0: The new programming API - Bob Beauchemin","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlskills.com\/blogs\/bobb\/dacfx-3-0-the-new-programming-api\/","og_locale":"en_US","og_type":"article","og_title":"DACFx 3.0: The new programming API - Bob Beauchemin","og_description":"Looking at the API and at the serialized form (i.e. the DACPAC), it turns out that DACFx 3.0 is not just &quot;DAC V-next&quot;. It&#39;s an entire quantum change&nbsp;from all other versions, including DAC 2.0, the version that introduced the BACPAC (serialized schema and data). This has some interesting repercussions with compatibility. Let&#39;s start with the [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/dacfx-3-0-the-new-programming-api\/","og_site_name":"Bob Beauchemin","article_published_time":"2012-05-16T12:10:00+00:00","article_modified_time":"2014-01-20T20:22:02+00:00","author":"Bob Beauchemin","twitter_misc":{"Written by":"Bob Beauchemin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/dacfx-3-0-the-new-programming-api\/","url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/dacfx-3-0-the-new-programming-api\/","name":"DACFx 3.0: The new programming API - Bob Beauchemin","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website"},"datePublished":"2012-05-16T12:10:00+00:00","dateModified":"2014-01-20T20:22:02+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/dacfx-3-0-the-new-programming-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/bobb\/dacfx-3-0-the-new-programming-api\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/dacfx-3-0-the-new-programming-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/bobb\/"},{"@type":"ListItem","position":2,"name":"Data-Tier Applications (DAC)","item":"https:\/\/www.sqlskills.com\/blogs\/bobb\/category\/data-tier-applications-dac\/"},{"@type":"ListItem","position":3,"name":"DACFx 3.0: The new programming API"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/","name":"Bob Beauchemin","description":"SQL Server Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/bobb\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e","name":"Bob Beauchemin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g","caption":"Bob Beauchemin"},"sameAs":["http:\/www.sqlskills.com\/blogs\/bobb\/"],"url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/author\/bobb\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts\/491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/comments?post=491"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts\/491\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/media?parent=491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/categories?post=491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/tags?post=491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}