<?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 'SQL Server', 'SQL Server Data Tools', and 'Datadude'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=SQL+Server,SQL+Server+Data+Tools,Datadude&amp;orTags=0</link><description>Search results matching tags 'SQL Server', 'SQL Server Data Tools', and 'Datadude'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Which version of SSDT Database Projects do I have installed?</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2013/02/08/which-version-of-ssdt-database-projects-do-i-have-installed.aspx</link><pubDate>Fri, 08 Feb 2013 21:15:52 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47608</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;SQL Server Data Tools (SSDT) is released on a very regular cadence (note that I’m talking about the &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2012/04/03/ssdt-what-s-in-a-name.aspx" target="_blank"&gt;database projects part of SSDT&lt;/a&gt;, this is nothing to do with SSIS/SSAS/SSRS). Since the first release in &lt;a href="http://blogs.msdn.com/b/ssdt/archive/2012/03/05/available-today-sql-server-data-tools-rtw.aspx" target="_blank"&gt;March 2012&lt;/a&gt; there have been releases in &lt;a href="http://blogs.msdn.com/b/ssdt/archive/2012/09/14/now-available-sql-server-data-tools-september-2012-update.aspx" target="_blank"&gt;September 2012&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/ssdt/archive/2012/11/07/sql-server-data-tools-november-2012-is-now-available.aspx" target="_blank"&gt;November 2012&lt;/a&gt;, &amp;amp; &lt;a href="http://blogs.msdn.com/b/ssdt/archive/2012/12/13/available-today-ssdt-december-2012.aspx" target="_blank"&gt;December 2012&lt;/a&gt;. I personally have found it difficult to keep track of not only which particular version I am using but also that which are my colleagues are using – quite simply I didn’t know how to discover the current version number. I assumed that the answer would lie within Visual Studio 2012 in the Help-&amp;gt;About Microsoft Visual Studio menu option, when I checked there I saw this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML339e96a2_1BDE30CA.png"&gt;&lt;img title="SNAGHTML339e96a2" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="SNAGHTML339e96a2" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML339e96a2_thumb_286BDDE6.png" width="507" height="333" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;A version number – 11.1.21208.0. What does that mean though? To understand more we have to go to Add/Remove programs:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML42d8efe8_2008088F.png"&gt;&lt;img title="SNAGHTML42d8efe8" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="SNAGHTML42d8efe8" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML42d8efe8_thumb_528B6601.png" width="934" height="275" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;There are many different items listed there, let’s look at them in turn:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Microsoft SQL Server 2012 Data-Tier App Framework&lt;/strong&gt;. This is fairly self-explanatory if you know what the Data-Tier App Framework (aka DACFx) is. If you don’t, see the notes at the end of this blog post*. The reason that you see two entries in the list above is due to my having the 32bit &amp;amp; 64bit versions installed – the fact that there is no differentiation between the two in the title is a bug. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Microsoft SQL Server 2012 Express LocalDB&lt;/strong&gt;. LocalDB is the small server-less version of SQL Server that now gets deployed with SQL Server proper. LocalDB also gets installed with SSDT if you do not already have it, but you should consider it part of SQL Server itself. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Microsoft SQL Server Data Tools 2010&lt;/strong&gt;. This was described to me as the “installation chainer” – it is the installation component that manages SSDT and its dependencies. I think of it as the SSDT shell within Visual Studio 2010. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Microsoft SQL Server Data Tools 2012&lt;/strong&gt;. This was described to me as the “installation chainer” – it is the installation component that manages SSDT and its dependencies. I think of it as the SSDT shell within Visual Studio 2012. Note that the version number is the same as in the Help-&amp;gt;About screenshot at the top of this article – that is because they are one and the same. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Microsoft SQL Server Data Tools – Database Projects – Web installer entry point&lt;/strong&gt;. A stub project that gets installed when you install SQL Server. Its the SSDT database project entry point. &lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;&lt;u&gt;&lt;strong&gt;Microsoft SQL Server Data Tools – enu (10.3.21208.0)&lt;/strong&gt; &amp;amp; &lt;strong&gt;Microsoft SQL Server Data Tools – enu (11.1.21208.0)&lt;/strong&gt;. These are the things we’re interested in. These *are* SSDT database projects, for Visual Studio 2010 &amp;amp; Visual Studio 2012 respectively. The version numbers are those for the December 2012 release; note that the build numbers are the same (X.X.21208.X), only the major and minor numbers are different.&lt;/u&gt;&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Microsoft SQL Server Data Tools Build Utilities – enu (10.3.21208.0)&lt;/strong&gt; &amp;amp; &lt;strong&gt;Microsoft SQL Server Data Tools Build Utilities – enu (11.1.21208.0)&lt;/strong&gt;. Everything you need to do a headless (i.e. without having Visual Studio installed) build/deploy of an SSDT database project. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So at the end of all that we have determined the following version numbers for SSDT database projects are:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;         &lt;p align="center"&gt;&lt;strong&gt;Release&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;&amp;nbsp;&lt;/td&gt;        &lt;td&gt;         &lt;p align="center"&gt;&lt;strong&gt;Visual Studio 2010 version number&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;&amp;nbsp;&lt;/td&gt;        &lt;td&gt;         &lt;p align="center"&gt;&lt;strong&gt;Visual Studio 2012 version number&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p align="center"&gt;September 2012&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;&amp;nbsp;&lt;/td&gt;        &lt;td&gt;         &lt;p align="center"&gt;10.3.20905.0&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;&amp;nbsp;&lt;/td&gt;        &lt;td&gt;         &lt;p align="center"&gt;11.1.20905.0&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p align="center"&gt;November 2012&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;&amp;nbsp;&lt;/td&gt;        &lt;td&gt;         &lt;p align="center"&gt;10.3.21101.1&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;&amp;nbsp;&lt;/td&gt;        &lt;td&gt;         &lt;p align="center"&gt;11.1.21101.1&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p align="center"&gt;December 2012&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;&amp;nbsp;&lt;/td&gt;        &lt;td&gt;         &lt;p align="center"&gt;10.3.21208.0&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;&amp;nbsp;&lt;/td&gt;        &lt;td&gt;         &lt;p align="center"&gt;11.1.21208.0&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;&lt;strike&gt;I do not know the version numbers for the March 2012, September 2012 &amp;amp; November 2012 releases (if anyone out there does know please let me know in the comments) however I shall update this blog post for future releases.&lt;/strike&gt; September 2012 and November 2012 releases now added!&lt;/p&gt;  &lt;p&gt;I have requested that any blog post to announce future releases should contain the version numbers. Let’s hope that happens.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/jamiet" target="_blank"&gt;@Jamiet&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;* DACFx is described &lt;a href="http://www.microsoft.com/en-gb/download/details.aspx?id=35756" target="_blank"&gt;here&lt;/a&gt; as:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The Microsoft® SQL Server® 2012 Data-Tier Application Framework (DACFx) is a component which provides application lifecycle services for database development and management for Microsoft® SQL Server® and Windows Azure SQL Databases.      &lt;br /&gt;DacFX supports various database deployment and management scenarios for SQL Server and Windows Azure SQL Databases including extracting/exporting a live database to a DAC package, deploying a DAC package to a new or existing database, and migrating from on-premise SQL Server to Windows Azure. This functionality is exposed via the DACFx managed API. DACFx can target SQL Server 2005 SP4, 2008 SP1, 2008R2, 2012, and Windows Azure SQL Databases. DACFx also provides the command-line utility SqlPackage.exe for creating and deploying .dacpac and .bacpac packages. DACFx supports scenarios provided by SQL Server client tooling including SQL Server Data Tools and SQL Server Management Studio 2012.&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Responses to SSDT questions</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2013/01/11/responses-to-ssdt-questions.aspx</link><pubDate>Fri, 11 Jan 2013 22:22:24 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47124</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;My recent article &lt;a href="http://www.devproconnections.com/article/sql-server-2012/sql-server-2012-data-tools-144829"&gt;Get to Know SQL Server 2012's SQL Server Data Tools&lt;/a&gt; prompted two questions to come to me via email and in the interests of sharing knowledge via search engines I thought I would answer them here rather than by simply replying by email (I hate that so much useful information gets trapped inside closed inboxes).&lt;/p&gt;  &lt;hr /&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#c0504d"&gt;Question: How would you handle cases below, our main database has many objects already, we are using redgate source control to keep things under sourcecontrol but ssdt would be awesome.        &lt;br /&gt;Our database has some invalid stored procs etc, unfortunately we do not want to drop them, underlying objects either don't exists or has changed etc         &lt;br /&gt;There are linked servers or code referencing other objects stored in the database         &lt;br /&gt;There are staging table named automatically in the database and we do not want to include them in the project and not drop them or touch them in a deploy &lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;JT: The overall question here seems to be “how do we prevent SSDT from DROPping sprocs and staging tables that are in the target database but are not in the SSDT project?” Fortunately SSDT has an option within it to allow exactly what the questioner requires. When an SSDT project is published one has the option to set some properties relating to that publish. One of the settings is “DROP objects in target but not in project”:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML5751f10_20688721.png"&gt;&lt;img title="SNAGHTML5751f10" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="SNAGHTML5751f10" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML5751f10_thumb_11A9A170.png" width="340" height="484" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If that option is left unchecked (which is the default) then no objects will get removed from the target database.&lt;/p&gt;  &lt;hr /&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#c0504d"&gt;Question: At my previous shop, I done a proof of concept with one of our databases, but never got it implemented as VS2012 (with SSDT) had not been released yet. Well, fast forward 9 or so months, and at my new shop (which is extremely agile) I've been tasked with setting up our db projects with SSDT so for the immediate short term goals/objectives we can;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;em&gt;&lt;font color="#c0504d"&gt;Allow new or existing developers to be able to easily get the latest databases from source control downloaded from TFS, built and deployed onto our local sandbox db environments. This ideally will be done via a powershell script or something of the sort. &lt;/font&gt;&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;&lt;font color="#c0504d"&gt;&lt;em&gt;Be able to employ C.I. so that every night a database deployment is done to our system test servers.&lt;/em&gt; &lt;/font&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;em&gt;&lt;font color="#c0504d"&gt;3 days into it, and I've wrestled with 3 of our databases, reverse engineering them into TFS and getting them built etc. My question is, what are the best practices or guidelines for;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;em&gt;&lt;font color="#c0504d"&gt;Allowing only Windows authentication for the local deploys to the sandbox environment. i.e. is it best to have a script with all our team user logins in a script? How would the project recognise a team member which will create a login for them so once the project is deployed they can login to their local db? &lt;/font&gt;&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;&lt;em&gt;&lt;font color="#c0504d"&gt;Using a 1-touch/click action (preferably outside of VS2010) to get latest, build project &amp;amp; deploy to local sandbox &lt;/font&gt;&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;&lt;em&gt;&lt;font color="#c0504d"&gt;Same as above but to a system test server&lt;/font&gt;&lt;/em&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;JT: There are quite a few questions there. Firstly I’ll say that its great to hear of sandboxed environments and Continuous Integration (CI) being used – I openly advocate these techniques in my blog post &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2012/01/01/implementing-sql-server-solutions-using-visual-studio-2010-database-projects-a-compendium-of-project-experiences.aspx"&gt;Implementing SQL Server solutions using Visual Studio 2010 Database Projects – a compendium of project experiences&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Now, taking each question in turn:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Windows Auth for local deploys. I’m not sure if there’s any recognised best practise here but if developers are working on local sandboxes I would assume they would have sysadmin rights so I’m not sure there’s a need to have a script of team logins. Perhaps I have misunderstood the question in which case please clarify in the comments below. I will say this though – I think its better to have a Windows group that you can move all of your devs in and out of rather than having to modify a script each time a user joins your team. &lt;/li&gt;    &lt;li&gt;1-click get latest, build &amp;amp; deploy. Scripting your build &amp;amp; deploy is something else I advocate in the &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2012/01/01/implementing-sql-server-solutions-using-visual-studio-2010-database-projects-a-compendium-of-project-experiences.aspx"&gt;aforementioned blog post&lt;/a&gt;:       &lt;blockquote&gt;       &lt;p&gt;&lt;em&gt;Building and deploying your datadude projects within Visual Studio can become a real time hog; in my experience its not unusual for deployments to take many minutes and your Visual Studio environment will be unavailable for further development work during that time. For that reason I recommend investing some time in writing some msbuild scripts that will build and deploy your project(s) from the command-line.&lt;/em&gt;&lt;/p&gt;     &lt;/blockquote&gt;      &lt;p&gt;I’ll go further here and say that the script with which you use to build and deploy to your sandbox should be the same script as which you use for your production environment and everything in between. The script should take a parameter value to name the environment and then deploy appropriately.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;See 2. &lt;/li&gt; &lt;/ol&gt;    &lt;hr /&gt;Hope that is useful. Any questions? Please put them in the comments.    &lt;p&gt;&lt;a href="http://twitter.com/jamiet" target="_blank"&gt;@Jamiet&lt;/a&gt;&lt;/p&gt;</description></item><item><title>SQL Server Data Tools does support required variables</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2012/02/12/sql-server-data-tools-does-support-required-variables.aspx</link><pubDate>Sun, 12 Feb 2012 11:58:24 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:41704</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;Over the past few years of using datadude (aka DBPro aka Visual Studio Database Projects) I have fallen prey to a peculiar little nuance – if you forget to supply a value for a sqlcmd variable then it will simply use a default and often that is not the desired behaviour. Hence why yesterday I submitted the following suggestion to &lt;a href="http://connect.microsoft.com/sqlserver/feedback"&gt;http://connect.microsoft.com/sqlserver/feedback&lt;/a&gt; :&lt;/p&gt;  &lt;blockquote&gt;   &lt;h3&gt;&lt;em&gt;Specify sqlcmdvars properties as &amp;quot;required to be overridden”&lt;/em&gt;&lt;/h3&gt;    &lt;p&gt;&lt;em&gt;In my current place of work I am responsible for maintaining our datadude projects and we have another team that is in charge of deployments. Hence, when we place new properties into the sqlcmdvars file I need to tell the deployment team what values to supply for that property per environment (dev, systest, uat, prod).       &lt;br /&gt;Unfortunately lack of communication/human error occasionally creeps in and, for whatever reason, no value gets supplied for some property at deployment time. If this is the case the default value as specified in the sqlcmdvars file gets used instead - invariably this will be the wrong value. I would like a mechanism within SSDT of preventing this from ever happening.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;One simple way to prevent this would be to specify that a sqlcmdvars property is *required* to be overridden during the deployment. In other words, never use the default. if an override is not supplied at deployment time then the deployment should fail.       &lt;br /&gt;Note that this stipulation should only be in place when deployment occurs from the command-line - if deploying from Visual Studio the default should be allowed (simply because Visual Studio doesn't provide a way to specify anything other than the default value supplied in the sqlcmdvars file).&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="https://connect.microsoft.com/sqlserver/feedback/details/724366/ssdt-specify-sqlcmdvars-properties-as-required-to-be-overridden#details"&gt;&lt;em&gt;https://connect.microsoft.com/sqlserver/feedback/details/724366/ssdt-specify-sqlcmdvars-properties-as-required-to-be-overridden#details&lt;/em&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;It transpires that this requested feature is already available in the forthcoming SQL Server Data Tools (SSDT) as I shall now demonstrate. This screenshot shows the project properties of a SSDT project where we define the sqlcmd variables, I have defined a variable called $(Id_value):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_49257C87.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_63856F9E.png" width="732" height="259" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In SSDT the nomenclature for deploying a project is “Publish”, a function that can be found by right-clicking on a project in Solution Explorer:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_1438774A.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_05219870.png" width="368" height="248" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Selecting that brings up the Publish dialog.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_4AC6228E.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_6FE36CFA.png" width="554" height="536" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Notice how the “Publish” button is greyed out – that it because I have not supplied a value for $(Id_value); supplying a value enables the Publish button and I can go ahead and publish my project. In other words, SSDT &lt;em&gt;insists&lt;/em&gt; that I supply a value for that variable – exactly as I requested in my Connect submission.&lt;/p&gt;  &lt;p&gt;The same is true if I use the command-line publishing tool sqlpackage.exe. The following command does essentially the same thing as the above depicted Publish dialog:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;gt;sqlpackage.exe /TargetDatabaseName:MyDB /TargetServerName:&amp;quot;.\RC0&amp;quot; /Action:Publish /SourceFile:&amp;quot;TestRequiredSqlCmdVars.dacpac&amp;quot;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Executing that gives me an error:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Publishing to database 'MyDB' on server '.\RC0'.     &lt;br /&gt;&lt;font color="#ff0000"&gt;*** Missing values for the following SqlCmd variables:       &lt;br /&gt;'Id_value'.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Here’s a screenshot showing the same:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_40454E6E.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_05E9D88D.png" width="618" height="201" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In order to supply a value for the variable from the command-line you need to use the /v: switch like so:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;gt;sqlpackage.exe /TargetDatabaseName:MyDB /TargetServerName:&amp;quot;.\RC0&amp;quot; /Action:Publish /SourceFile:&amp;quot;TestRequiredSqlCmdVars.dacpac&amp;quot; &lt;strong&gt;/v:Id_value=1&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_4B8E62AB.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_5C265D99.png" width="617" height="201" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;As you can see, publish was successful!&lt;/p&gt;  &lt;p&gt;So there you go, using SSDT you’ll no longer be able to fall prey to the problem I highlighted at the top of this blog post. In a later blog post I’ll show how you CAN supply a default value if you want to and also how you can override for your local environment.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://twitter.com/jamiet"&gt;@jamiet&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>