<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'dacpac' and 'SQL Server 2012'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=dacpac,SQL+Server+2012&amp;orTags=0</link><description>Search results matching tags 'dacpac' and 'SQL Server 2012'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>A dacpac limitation – Deploy dacpac wizard does not understand SqlCmd variables</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2012/11/13/a-dacpac-limitation-deploy-dacpac-wizard-does-not-understand-sqlcmd-variables.aspx</link><pubDate>Tue, 13 Nov 2012 21:53:04 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:46159</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;Since the release of SQL Server 2012 I have become a big fan of using dacpacs for deploying SQL Server databases (for reasons that I will explain some other day) and I chose to use a dacpac to distribute my recently announced utility sp_ssiscatalog (read: &lt;a title="http://sqlblog.com/blogs/jamie_thomson/archive/2012/11/07/introducing-sp-ssiscatalog-v1-0-0-0.aspx" href="http://sqlblog.com/blogs/jamie_thomson/archive/2012/11/07/introducing-sp-ssiscatalog-v1-0-0-0.aspx" target="_blank"&gt;Introducing sp_ssiscatalog (v1.0.0.0)&lt;/a&gt;). Unfortunately if you read that blog post you may have taken note of the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Ordinarily a dacpac can be deployed to a SQL Server from SSMS using the Deploy Dacpac wizard however in this case there is a limitation. Due to sp_ssiscatalog referring to objects in the SSIS Catalog (which it has to do of course) the dacpac contains a SqlCmd variable to store the name of the database that underpins the SSIS Catalog; unfortunately the Deploy Dacpac wizard in SSMS has a rather gaping limitation in that it cannot deploy dacpacs containing SqlCmd variables.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I think it is worth calling out this limitation separately in this blog post because its a limitation that all dacpac users need to be aware of. If you try and deploy the dacpac containing sp_ssiscatalog using the wizard in SSMS then this is what you will see:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image001_4325C5F1.jpg"&gt;&lt;img title="SSMS dacpac limitation" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="Error deploying dacpac containing a SqlCmd variable when using SSMS" src="http://sqlblog.com/blogs/jamie_thomson/image001_thumb_6B74F845.jpg" width="619" height="578" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;TITLE: Microsoft SQL Server Management Studio     &lt;br /&gt;------------------------------      &lt;br /&gt;Could not deploy package. (Microsoft.SqlServer.Dac)      &lt;br /&gt;------------------------------      &lt;br /&gt;ADDITIONAL INFORMATION:      &lt;br /&gt;Missing values for the following SqlCmd variables:SSISDB. (Microsoft.Data.Tools.Schema.Sql)      &lt;br /&gt;------------------------------      &lt;br /&gt;BUTTONS:      &lt;br /&gt;OK      &lt;br /&gt;------------------------------&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The message is quite correct. The SSDT DB project that I used to build this dacpac *&lt;b&gt;does&lt;/b&gt;* have a SqlCmd variable in it called SSISDB:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image002_51348F21.png"&gt;&lt;img title="SqlCmdVariable" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SqlCmd variable in an SSDT project" src="http://sqlblog.com/blogs/jamie_thomson/image002_thumb_577B65AF.png" width="593" height="164" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Quite simply, the Dac Deployment wizard in SSMS is not capable of deploying such dacpacs. Your only option for deploying such dacpacs is to use the command-line tool sqlpackage.exe. &lt;/p&gt;  &lt;p&gt;Generally I use sqlpackage.exe anyway (which is why it has taken me months to encounter the aforementioned problem) and have found it preferable to using a GUI-based wizard. Your mileage may vary.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/jamiet" target="_blank"&gt;@Jamiet&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>