<?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 tag 'SQL Server Data Tools'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=SQL+Server+Data+Tools&amp;orTags=0</link><description>Search results matching tag 'SQL Server Data Tools'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Creating your own SQL snippets in SSDT</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2013/04/22/creating-your-own-sql-snippets-in-ssdt.aspx</link><pubDate>Mon, 22 Apr 2013 21:33:35 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:48822</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;SQL Server Data Tools (SSDT) has a neat feature where you can add snippets into your scripts via the right-click context menu:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_32A460AD.png"&gt;&lt;img title="image" 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="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_238D81D3.png" width="597" height="125" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I’m finding it very useful indeed. The same feature exists in SQL Server Management Studio (SSMS) as well by the way:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_2968256C.png"&gt;&lt;img title="image" 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="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_6F78E27F.png" width="601" height="108" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;One thing I really wanted to be able to do was create my own snippets for SSDT and I ventured to the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/ssdt/threads" target="_blank"&gt;SSDT forum&lt;/a&gt; to ask if it was possible. Turns out the answer is “yes” and Gert Drapers &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/ssdt/thread/a351955d-c33b-4ff1-afca-94cabdeb2aa5" target="_blank"&gt;replied to my thread by providing an excellent run through of how to do it&lt;/a&gt;. What Gert’s post didn’t quite clarify is that if you follow his instructions then you have to manually edit the .snippet file that you created so that the language is set to SQL_SSDT:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_47663360.png"&gt;&lt;img title="image" 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="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_78856E00.png" width="620" height="155" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;(well, I had to do that anyway)&lt;/p&gt;  &lt;p&gt;Once you do that you’ll be able to import the snippet into Visual Studio (Gert’s post shows you how) and thereafter your snippets will show up in the snippets menu:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_5072BEE1.png"&gt;&lt;img title="image" 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="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_04A6E828.png" width="504" height="108" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Very handy indeed.&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><item><title>Detecting Database Drift using SSDT</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2013/04/04/detecting-database-drift-using-ssdt.aspx</link><pubDate>Thu, 04 Apr 2013 09:31:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:48526</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;One of the nice things about doing user group presentations is that when you’re putting the presentation together you invariably learn about features that were previously unbeknown to you; so it proved as I stumbled upon SSDT’s database drift detection features while researching material for my forthcoming pre-conference seminar &lt;a target="_blank" href="http://sqlbits.com/information/Event11/SSDT_Database_projects_from_the_ground-up1/TrainingDetails.aspx"&gt;SSDT from the ground up&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;What is database drift?&lt;/h3&gt;  &lt;p&gt;You have probably experienced database drift, you just didn’t happen to refer to it as that. More likely you might have spluttered the following, perhaps sprinkled with a few expletives:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;“Who put these tables in my database?” &lt;/li&gt;    &lt;li&gt;“Who changed this view definition?” &lt;/li&gt;    &lt;li&gt;“Why is this guy in db_owner?” &lt;/li&gt;    &lt;li&gt;“Where has my stored procedure gone?”&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;In other words database drift can loosely be described as&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;i&gt;stuff that appears, gets removed, or gets modified in your production databases that perhaps shouldn’t be&lt;/i&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;Detecting database drift using SSDT&lt;/h3&gt;  &lt;p&gt;If you’re using SSDT to manage your database schema then you probably consider the source code in your SSDT projects to be “the truth” and hence anything that appears in your databases that is not in your source code would be considered database drift.&lt;/p&gt;  &lt;p&gt;In order to detect database drift using SSDT you must ensure that your database is registered as a Data-Tier Application. This can be done when you publish your database project (i.e. dacpac) by selecting “Register as a Data-tier Application”:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML450c41_2A02E493.png"&gt;&lt;img title="SNAGHTML450c41" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;display:inline;" border="0" alt="SNAGHTML450c41" width="495" height="254" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML450c41_thumb_4800F287.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Thereafter you can check for database drift on subsequent publishes by selecting “Block publish when database has drifted from registered version”:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML46b2db_7BC8E8D8.png"&gt;&lt;img title="SNAGHTML46b2db" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;display:inline;" border="0" alt="SNAGHTML46b2db" width="496" height="254" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML46b2db_thumb_7A844FF9.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you check that box and database drift has occurred then the publish operation will fail and you see an appropriate message in the Data Tools Operations pane, “Publish stopped. The target database has drifted from the registered version.”:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML4bd20f_5271A0DA.png"&gt;&lt;img title="SNAGHTML4bd20f" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;display:inline;" border="0" alt="SNAGHTML4bd20f" width="461" height="267" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML4bd20f_thumb_78675130.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Clicking the &lt;font color="#0080c0"&gt;View Report&lt;/font&gt; hyperlink displays the Drift Report which is represented in an XML file:&lt;/p&gt;  &lt;blockquote&gt;   &lt;pre style="font-size:13px;font-family:consolas;background:white;color:black;"&gt;&lt;span style="color:blue;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color:#a31515;"&gt;xml&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color:red;"&gt;version&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;1.0&lt;/span&gt;"&lt;span style="color:blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color:red;"&gt;encoding&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;utf-8&lt;/span&gt;"&lt;span style="color:blue;"&gt;?&amp;gt;&lt;/span&gt;
&lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DriftReport&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color:red;"&gt;xmlns&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;http://schemas.microsoft.com/sqlserver/dac/DriftReport/2012/02&lt;/span&gt;"&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Additions&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Object&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color:red;"&gt;Name&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;[View_1]&lt;/span&gt;"&lt;span style="color:blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color:red;"&gt;Parent&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;[dbo]&lt;/span&gt;"&lt;span style="color:blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color:red;"&gt;Type&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;SqlView&lt;/span&gt;"&lt;span style="color:blue;"&gt; /&amp;gt;&lt;/span&gt;
&lt;span style="color:blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;ExtendedProperty&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color:red;"&gt;HostName&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;[View_1]&lt;/span&gt;"&lt;span style="color:blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color:red;"&gt;HostParent&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;[dbo]&lt;/span&gt;"&lt;span style="color:blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color:red;"&gt;HostType&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;SqlView&lt;/span&gt;"&lt;span style="color:blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color:red;"&gt;Count&lt;/span&gt;&lt;span style="color:blue;"&gt;=&lt;/span&gt;"&lt;span style="color:blue;"&gt;2&lt;/span&gt;"&lt;span style="color:blue;"&gt; /&amp;gt;&lt;/span&gt;
&lt;span style="color:blue;"&gt;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Additions&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Removals&lt;/span&gt;&lt;span style="color:blue;"&gt; /&amp;gt;&lt;/span&gt;
&lt;span style="color:blue;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Modifications&lt;/span&gt;&lt;span style="color:blue;"&gt; /&amp;gt;&lt;/span&gt;
&lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DriftReport&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this case a view called [dbo].[View_1] has been added to the target database. That view did not exist in the dacpac that was most recently deployed against the database thus the publish operation fails. Keeping one’s deployed databases as “clean” as possible is something that I am all in favour of so personally I think this is a pretty cool feature.&lt;/p&gt;

&lt;h3&gt;Generating a drift report from the command-line&lt;/h3&gt;

&lt;p&gt;The drift report can be generated by the command-line tool &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/hh550080(v=vs.103).aspx"&gt;sqlpackage.exe&lt;/a&gt;. To do so you need to define:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;the action to be &lt;font face="cons"&gt;DriftReport&lt;/font&gt;&lt;/li&gt;

  &lt;li&gt;a target server &amp;amp; database&lt;/li&gt;

  &lt;li&gt;an output file&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&amp;gt;SqlPackage.exe /A:&lt;b&gt;DriftReport&lt;/b&gt; /tsn:"&lt;b&gt;(localdb)\Projects&lt;/b&gt;" /tdn:"&lt;b&gt;Database1&lt;/b&gt;" /op:&lt;b&gt;DriftReport.xml&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML57a506_024C429C.png"&gt;&lt;img title="SNAGHTML57a506" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;display:inline;" border="0" alt="SNAGHTML57a506" width="521" height="127" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML57a506_thumb_361438ED.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As far as I know there is no support for generating a drift report from SQL Server Management Studio (SSMS). I’m hoping that changes so that this feature gets more visibility.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;If you have any comments stick them in the comments section below!&lt;/p&gt;

&lt;p&gt;&lt;a target="_blank" href="http://twitter.com/jamiet"&gt;@Jamiet&lt;/a&gt;&lt;/p&gt;</description></item><item><title>SSDT naming confusion cleared up. Somewhat.</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2013/04/03/ssdt-naming-confusion-cleared-up-somewhat.aspx</link><pubDate>Wed, 03 Apr 2013 07:49:30 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:48507</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;In March 2012 I published &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2012/04/03/ssdt-what-s-in-a-name.aspx" target="_blank"&gt;SSDT - What's in a name?&lt;/a&gt; where I lamented the mistakes that Microsoft made in the naming of SQL Server Data Tools.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;…official documentation stating that SSDT includes all the stuff for building SSIS/SSAS/SSRS solutions (this is confirmed in the installer, remember) yet someone from Microsoft tells him &amp;quot;SSDT doesn't include any BIDs components&amp;quot;.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;I have been close to this for a long time (all the way through the CTPs) so I can kind of understand where the confusion stems from. To my understanding SSDT was originally the name of the database dev stuff but eventually that got expanded to include all of the dev tools - I guess not everyone in Microsoft got the memo.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Since then I’ve seen lots of questions pertaining to SSIS/SSAS/SSRS being posted on the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/ssdt/threads" target="_blank"&gt;SSDT forum on MSDN&lt;/a&gt; which, frankly, is the wrong place for them.&lt;/p&gt;  &lt;p&gt;With the release of the &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=36843" target="_blank"&gt;SSIS/SSAS/SSRS project templates for Visual Studio 2012&lt;/a&gt; Microsoft have attempted to clear up the confusion. Matt Masson from the SSIS product team attempts to explain in his usual jovial way:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;note that the component was renamed – we added “Business Intelligence” to the end to distinguish it from the &lt;/em&gt;&lt;a href="http://msdn.microsoft.com/en-us/data/tools.aspx"&gt;&lt;em&gt;SQL Server Data Tools&lt;/em&gt;&lt;/a&gt;&lt;em&gt; (Juneau). We now refer to it as SSDTBI, rather than “SSDT, no, not that one, the other one – you know, the one that comes with the SQL installation media, not the one you download”.       &lt;br /&gt;&lt;a title="http://www.mattmasson.com/2013/04/installing-ssis-for-visual-studio-2012/" href="http://www.mattmasson.com/2013/04/installing-ssis-for-visual-studio-2012/"&gt;http://www.mattmasson.com/2013/04/installing-ssis-for-visual-studio-2012/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;So to clarify, its now:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;SSDT – for building databases&lt;/li&gt;    &lt;li&gt;SSDTBI – for building SSIS/SSAS/SSRS solutions&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Got it? Good!&lt;/p&gt;  &lt;p&gt;That may all seem slightly confusing but its a darn sight clearer than it was SQL Server 2012 was released over a year ago. And if nothing else you have to be amused with Microsoft’s penchant for ever-lengthening acronyms, I can’t recall ever seeing a six-letter-acronym before, can you?&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><item><title>Considerations when starting a new SSDT database project</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2013/03/21/considerations-when-starting-a-new-ssdt-database-project.aspx</link><pubDate>Thu, 21 Mar 2013 10:58:03 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:48327</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;As you may have realised from much of my blogging over the past year or so I’m an advocate of using SSDT database projects for building database solutions on SQL Server. I have been using SSDT database projects a lot in that time and have come up with a checklist of things to consider when starting a new SSDT database project and I’ll be detailing that checklist below. I strongly advise you to consider making decisions about these items before you even write a scrap of code as invariably it will be more difficult to change later, especially if you have already deployed your database.&lt;/p&gt;  &lt;hr /&gt;  &lt;p&gt;In no particular order here is my checklist:&lt;/p&gt;  &lt;h3&gt;Folder Structure&lt;/h3&gt;  &lt;p&gt;By default SSDT will not provide a folder structure for new projects in which to store all your script files so you might want to consider setting one up yourself. I recommend not trying to create a large hierarchy of folders to start with as this will evolve as you go about building your database. Here’s a simple starter for ten:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_2ADBA6CA.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_174E4729.png" width="212" height="138" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;Filegroups&lt;/h3&gt;  &lt;p&gt;If you don’t understand the importance of filegroups then read Thomas Larock’s recent blog post &lt;a href="http://thomaslarock.com/2013/01/database-filegroups-just-like-seatbelts-but-with-less-chafing/"&gt;DATABASE FILEGROUPS: JUST LIKE SEATBELTS BUT WITH LESS CHAFING&lt;/a&gt;. Quite often your organisation will stipulate policies for what filegroups you should be using and I highly recommend that you set up filegroups in your database projects to match those policies sooner rather than later. If your organisation does not have any such policies then perhaps think about defining them yourself, Thomas lists a few considerations that may influence your decisions:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;separation of system data from user data &lt;/li&gt;    &lt;li&gt;larger indexes may benefit from their own filegroup &lt;/li&gt;    &lt;li&gt;archival of data can benefit from using dedicated filegroups as this will reduce backup maintenance tasks &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If you follow my suggested folder structure above then put your filegroups into the “Storage” folder:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_2852750C.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_75826E97.png" width="183" height="173" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Above all, specify your default filegroup especially as many DBAs won’t be happy about you putting objects into the PRIMARY filegroup (which is the default). This is done by right-clicking on the project and selecting “Properties..” When there hit “Database Settings…” and set your default filegroup on the “Operational” tab:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML1ebb40b8_7FD392F7.png"&gt;&lt;img title="SNAGHTML1ebb40b8" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="SNAGHTML1ebb40b8" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML1ebb40b8_thumb_25C9434E.png" width="405" height="146" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If you intend to use the filestream feature of SQL Server then you can set the default filestream filegroup here too.&lt;/p&gt;  &lt;h3&gt;Collation&lt;/h3&gt;  &lt;p&gt;If you take only one piece of advice from this blog post make it this: &lt;strong&gt;set your collation before you write a single line of code&lt;/strong&gt; (just trust me on this, OK). You’ll find this in Project Properties-&amp;gt;Project Settings-&amp;gt;Database Settings-&amp;gt;Common&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML1ebc6e3e_4BBEF3A4.png"&gt;&lt;img title="SNAGHTML1ebc6e3e" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="SNAGHTML1ebc6e3e" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML1ebc6e3e_thumb_71B4A3FA.png" width="415" height="160" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Again, find out if your organisation has any guidance on database collation.&lt;/p&gt;  &lt;h3&gt;Specify Target platform&lt;/h3&gt;  &lt;p&gt;SSDT allows you to deploy a project to SQL Server 2005, 2008, 2012 or Azure so it stands to reason that you should specify which you are intending to deploy to. You’ll find this in Project Properties-&amp;gt;Project Settings:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_778F4793.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_5AA622BE.png" width="399" height="128" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h3&gt;Default Schema&lt;/h3&gt;  &lt;p&gt;If you follow the premise that “anything that SQL Server picks as the default is probably wrong” then you should probably think about changing the default schema which, by default, will be [dbo]. SSDT will create all new objects in the default schema (unless otherwise specified).&lt;/p&gt;  &lt;p&gt;Generally I’m of the opinion that not accepting SQL Server’s defaults is a good idea if only because it forces you to think about these things and be aware of them; in the case of schemas it forces you to think about security and who should have GRANT or DENY permissions and on what.&lt;/p&gt;  &lt;p&gt;Specify the default schema in Project properties-&amp;gt;Project Settings:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_158D5588.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_791063A7.png" width="428" height="71" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;Review other database settings&lt;/h3&gt;  &lt;p&gt;I’ve mentioned the most important database settings that you should look to change however you should also glance over the rest of the defaults that SSDT chooses for you to verify that they are valid for your project. Again, these are in Project Properties-&amp;gt;Project Settings-&amp;gt;Database Settings. a few I’d call out as being especially worthy of your attention are:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Auto update stats (on by default) &lt;/li&gt;    &lt;li&gt;Recovery model (FULL by default) &lt;/li&gt;    &lt;li&gt;Transaction Isolation (RCSI off by default) &lt;/li&gt;    &lt;li&gt;Service broker (disabled by default) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_18530A7B.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_6C360D89.png" width="244" height="240" /&gt;&lt;/a&gt;       &lt;br /&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_5D1F2EAF.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_42DEC58B.png" width="395" height="404" /&gt;&lt;/a&gt;       &lt;br /&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_289E5C67.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_12684115.png" width="396" height="403" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;Code Analysis&lt;/h3&gt;  &lt;p&gt;SSDT always checks the syntax of your database code, that’s one of the main justifications for using SSDT database projects. However what it does not do (not by default anyway) is check whether the code you write might be considered &lt;em&gt;good &lt;/em&gt;code. That’s what Code Analysis is for, your code gets checked to see if it adheres to well-understood good practices for SQL Server database development. For example, Code Analysis will check for use of “SELECT*” which is generally regarded as a bad thing.&lt;/p&gt;  &lt;p&gt;Code analysis is turned off by default. I recommend that you head into Project Properties-&amp;gt;Code Analysis and turn it on. Moreover I recommend that you check all the boxes under “Treat Warning as Error” – this forces developers to address issues that get raised by Code Analysis.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_0D195A64.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_2B839B4D.png" width="437" height="255" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;Big Labels&lt;/h3&gt;  &lt;p&gt;Add a banner to your Pre-Deployment script as I describe in &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2012/09/26/big-label-generator.aspx" target="_blank"&gt;Big label generator&lt;/a&gt;. This may seem rather unnecessary but it takes about 30 seconds and believe me, at some point you’ll be glad you did!&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;img src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_2A99351D.png" width="619" height="334" /&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The demo project that I took some of the above screenshots from is downloadable from &lt;a title="http://sdrv.ms/ZW0gNt" href="http://sdrv.ms/ZW0gNt"&gt;http://sdrv.ms/ZW0gNt&lt;/a&gt; and might provide a useful template for your own SSDT database projects.&lt;/p&gt;  &lt;hr /&gt;  &lt;p&gt;If you have any more suggestions for my checklist please add them to the comments below!&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><item><title>Connected development in SSDT versus SSMS</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2013/03/19/connected-development-in-ssdt-versus-ssms.aspx</link><pubDate>Tue, 19 Mar 2013 16:28:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:48314</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;When you install the database projects template of SSDT you get SQL Server Object Explorer (SSOX) installed as well. SSOX is a pane within Visual Studio and is the main enabler of the Connected Development experience that the SSDT team have attempted to provide.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML15dc3f62_18DB391E.png"&gt;&lt;img title="SNAGHTML15dc3f62" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;display:inline;" border="0" alt="SNAGHTML15dc3f62" width="335" height="118" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML15dc3f62_thumb_0C6D15F5.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;SSOX provides some really cool capabilities that are not in SQL Server Management Studio (I hope to blog about them in the near future). In theory these capabilities make it possible for a database developer to spend all their time in SSDT (i.e. Visual Studio) thus making SSMS a pureplay DBA tool (this does of course depend on your definition of both a database developer and a DBA, but I’m not getting into that debate here).&lt;/p&gt;  &lt;p&gt;With that in mind I have spent a few days trying to work without SSMS, preferring to live wholly inside Visual Studio instead. By and large I was able to do everything I needed to do from within Visual Studio however there were a few nuances about the experience that kept pushing me back to SSMS, I detail those nuances below.&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;hr&gt;  &lt;h3&gt;Server groups&lt;/h3&gt;  &lt;p&gt;SSOX combines the functions of SSMS’s Object Explorer and Registered Servers pane. I don’t mind either way of working but it does mean that there is no ability to group servers in SSOX like you can in the Registered Servers pane&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_568820DA.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" width="244" height="97" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_4E907E78.png"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_0977B142.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" width="244" height="230" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_6C8E8C6C.png"&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h3&gt;F6&lt;/h3&gt;  &lt;p&gt;In SSMS I regularly use the F6 keyboard shortcut to jump between the query, results &amp;amp; messages panes of a query window. No such keyboard shortcut exists in SSDT and they’ve already canned &lt;a target="_blank" href="https://connect.microsoft.com/sqlserver/feedback/details/780990/ssdt-f6-to-move-between-panes-in-a-query-window#tabs"&gt;my request on Connect to get this fixed&lt;/a&gt; (even though it laughably has status “closed as fixed”).&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;i&gt;UPDATE: See the comments below where Brett Gerhardi informed me of a different keyboard shortcut that does the same thing as F6. Actually its not quite the same, if you have multiple resultsets in your results pane then the behaviour is slightly different to F6 in SSMS - but that's not an issue you'll hot frequently.&lt;/i&gt;&lt;/p&gt;  &lt;h3&gt;Change Connection&lt;/h3&gt;  &lt;p&gt;The context menu in SSMS provides the ability to change a connection as well as connect and disconnect:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_72693005.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" width="546" height="115" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_11ABD6D9.png"&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;SSDT doesn’t have change connection and believe me, you don’t know how much you use a feature until its not there:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_09B43477.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" width="438" height="58" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_28F6DB4A.png"&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;There’s also no hotkey to jump to “Connection” on the context menu like there is in SSMS (“C”) and I find that annoying too.&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;hr&gt;Those were the main annoyances that forced me back to SSMS. The lack of F6 was a major bugbear for me as I am a big keyboard shortcut junkie. If such things don’t bother you then you may be able to live in Visual Studio quite happily. If you have any similar experiences to share I’d be keen to read them.&lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;&lt;a target="_blank" href="http://twitter.com/jamiet"&gt;@Jamiet&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Deployment of client-specific database code using SSDT</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2013/03/10/deployment-of-client-specific-database-code-using-ssdt.aspx</link><pubDate>Sun, 10 Mar 2013 13:24:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:48159</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;Yesterday I attended &lt;a target="_blank" href="http://www.sqlsaturday.com/194/"&gt;SQL Saturday 194&lt;/a&gt; in Exeter for which many people deserve credit but especially the organisers &lt;a target="_blank" href="https://twitter.com/fatherjack"&gt;Jonathan Allen&lt;/a&gt; &amp;amp; &lt;a target="_blank" href="https://twitter.com/mrs_fatherjack"&gt;Annette Allen&lt;/a&gt; and the sponsors &lt;a target="_blank" href="http://www.fusionio.com/"&gt;Fusion-IO&lt;/a&gt;, &lt;a target="_blank" href="http://www.confio.com/"&gt;Confio Software&lt;/a&gt;, &lt;a target="_blank" href="http://www.nexusopensystems.co.uk/"&gt;Nexus&lt;/a&gt;, &lt;a target="_blank" href="http://www.bigbangdata.co.uk/Pages/default.aspx"&gt;Big Bang Data Company&lt;/a&gt;, &lt;a target="_blank" href="http://www.purplefrogsystems.com/"&gt;Purple Frog Systems&lt;/a&gt;, &lt;a target="_blank" href="http://www.red-gate.com/"&gt;Redgate&lt;/a&gt;, &lt;a target="_blank" href="http://www.idera.com/"&gt;idera&lt;/a&gt;, &lt;a target="_blank" href="http://pluralsight.com"&gt;Pluralsight&lt;/a&gt;, &lt;a target="_blank" href="http://exeterhotels.jurysinns.com/"&gt;Jurys Inn Exeter&lt;/a&gt; &amp;amp; &lt;a target="_blank" href="http://eu.wiley.com/"&gt;Wrox&lt;/a&gt;.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_072C63C9.png"&gt;&lt;img title="image" 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="image" width="327" height="238" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_312C61F1.png"&gt;&lt;/a&gt;&lt;/td&gt;        &lt;td&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_57221247.png"&gt;&lt;img title="image" 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="image" width="317" height="296" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_161392E3.png"&gt;&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;hr&gt;I gave a talk entitled &lt;b&gt;Declarative Database Development with SSDT&lt;/b&gt;; both during the session and then afterwards on Twitter &lt;a target="_blank" href="https://twitter.com/leopasta"&gt;Leo Pasta&lt;/a&gt; asked me&lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a target="_blank" href="https://twitter.com/leopasta/status/310680898049826816"&gt;&lt;img title="image" 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="image" width="519" height="281" src="http://sqlblog.com/blogs/jamie_thomson/image_5505137E.png"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;i&gt;&lt;a target="_blank" href="https://twitter.com/leopasta/status/310680898049826816"&gt;would you have any extra references on how to handle client-specific changes to the DB schema&lt;/a&gt;&lt;/i&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I promised Leo an answer, hence this blog post.&lt;/p&gt;  &lt;p&gt;If I understand Leo’s question correctly he has an application that is used by multiple clients, he has a separate instance of the application for every client, and the database requires client-specific customisations; luckily for Leo there is a new feature in SSDT that is perfect for this situation. First let’s set up our solution in SSDT:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_45EE34A4.png"&gt;&lt;img title="image" 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="image" width="359" height="284" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_52E814B5.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We have three database projects:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;_core - This contains all the objects that are common to all clients. For demonstration purposes it simply contains a table called [Sales]&lt;/li&gt;    &lt;li&gt;clientFoo – All the objects that are required only by client “Foo”. In this case there is view which aggregates the data in [Sales] by Customer&lt;/li&gt;    &lt;ul&gt;&lt;/ul&gt;    &lt;li&gt;clientBar – All the objects that are required only by client “Bar”. In this case there is view which aggregates the data in [Sales] by Location&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;In order that the reference to table [Sales] in the two views can be resolved both of the client-specific projects have a database reference to _core:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_38A7AB91.png"&gt;&lt;img title="image" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="image" width="242" height="244" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_09E1F2EF.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It is those database references that allows objects in clientFoo/clientBar to refer to objects in _core. Now here’s the important bit. When we set up those two database references &lt;b&gt;we must specify that the objects in the referenced project are intended to be in the same database&lt;/b&gt;:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTMLa9aab43_48D3738A.png"&gt;&lt;img title="SNAGHTMLa9aab43" 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="SNAGHTMLa9aab43" width="643" height="525" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTMLa9aab43_thumb_4722A7B6.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Having objects from one database split over multiple projects is called &lt;b&gt;composite projects&lt;/b&gt;. The effect of this is that (by default) whenever clientFoo or clientBar are deployed &lt;b&gt;the objects in _core will get deployed as well&lt;/b&gt;. We can see this in the output when we deploy clientFoo:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_5ACF914A.png"&gt;&lt;img title="image" 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="image" width="561" height="166" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_59F72B60.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Notice how &lt;b&gt;even though we chose not to deploy _core&lt;/b&gt; two objects have been created; table [Sales] (from the _core project) and view [vSalesPerCustomer]. This is the new feature in SSDT that I spoke of above – a deployment of a project will (by default) also deploy all the objects in referenced projects where objects in the referenced database are intended to be in the same database (incidentally this functionality replaces the “partial projects” feature from previous incarnations of SSDT).&lt;/p&gt;  &lt;p&gt;Note that you can change this default behaviour in the advanced publish settings by unchecking the “Include composite objects” box:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTMLaac90d1_5CBCE053.png"&gt;&lt;img title="SNAGHTMLaac90d1" 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="SNAGHTMLaac90d1" width="422" height="612" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTMLaac90d1_thumb_61BF1E02.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Hence, with the “Include Composite Objects” setting turned on, we can deploy both projects clientFoo &amp;amp; clientBar and both will contain table [Sales] plus their own client-specific view:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_2E16B1A4.png"&gt;&lt;img title="image" 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="image" width="394" height="628" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_3F1ADF87.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;which (I hope) is exactly what Leo was after!&lt;/p&gt;  &lt;p&gt;That’s all there is to it. A very very nice new feature of SSDT!&lt;/p&gt;  &lt;p&gt;&lt;a target="_blank" href="http://twitter.com/jamiet"&gt;@Jamiet&lt;/a&gt;&lt;/p&gt;</description></item><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>Video accompanying my SSDT article is now available</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2013/01/28/video-accompanying-my-ssdt-article-is-now-available.aspx</link><pubDate>Mon, 28 Jan 2013 23:52:07 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47368</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;A couple of weeks ago in &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2013/01/10/get-to-know-sql-server-2012-s-sql-server-data-tools-article-published.aspx" target="_blank"&gt;Get to Know SQL Server 2012's SQL Server Data Tools [article published]&lt;/a&gt; I stated that an article that I wrote about SSDT had been published and was &lt;a href="http://www.devproconnections.com/article/sql-server-2012/sql-server-2012-data-tools-144829" target="_blank"&gt;available for reading online&lt;/a&gt; at &lt;a title="http://www.devproconnections.com/article/sql-server-2012/sql-server-2012-data-tools-144829" href="http://www.devproconnections.com/"&gt;http://www.devproconnections.com/&lt;/a&gt;. The article has since been updated to include a 10-minute video that I recorded demonstrating some of the basic concepts of SSDT so if you want to hear me drone on about SSDT in my dulcet Yorkshire brogue (!!!), &lt;a href="http://www.devproconnections.com/article/sql-server-2012/sql-server-2012-data-tools-144829"&gt;click through&lt;/a&gt;, settle back and enjoy!&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_7CD4CB93.png"&gt;&lt;img title="image" 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="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_5DCEA7F5.png" width="453" height="257" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://twitter.com/jamiet" target="_blank"&gt;@Jamiet&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Continuous deployment of SSDT database projects to Windows Azure using Team Foundation Service</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2013/01/27/continuous-deployment-of-ssdt-database-projects-to-windows-azure-using-team-foundation-service.aspx</link><pubDate>Sun, 27 Jan 2013 20:07:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47339</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;Continuous deployment is described by Wikipedia as:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Most CI systems allow the running of scripts after a build finishes. In most situations, it is possible to write a script to deploy the application to a live test server that everyone can look at. A further advance in this way of thinking is &lt;/em&gt;&lt;em&gt;Continuous Deployment&lt;/em&gt;&lt;em&gt;, which calls for the software to be deployed directly into production       &lt;br&gt;&lt;a title="http://en.wikipedia.org/wiki/Continuous_Integration" href="http://en.wikipedia.org/wiki/Continuous_Integration"&gt;http://en.wikipedia.org/wiki/Continuous_Integration&lt;/a&gt;&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I think of Continuous Deployment as a natural extension of Continuous Integration where not only do we build the source code, we deploy it as well. As I continue to put together my &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2013/01/15/my-sqlbits-pre-conference-seminar-ssdt-database-projects-from-the-ground-up.aspx"&gt;SSDT Database Projects from the ground-up&lt;/a&gt; seminar it occurred to me that demonstrating Continuous Deployment for SSDT database projects would be very useful. It then occurred to me that the recently released &lt;a href="http://tfs.visualstudio.com/"&gt;Team Foundation Service&lt;/a&gt; (TFS) includes a facility to build source code so I wondered, could one perhaps use TFS to build an SSDT database project and deploy it to a Windows Azure SQL Database (aka SQL Azure)? It turns out that the answer is “yes” and this blog provides a step-by-step guide to doing just that.&lt;/p&gt;  &lt;p&gt;Its worth noting that Team Foundation Service is free for up to five users. SSDT is also free. Windows Azure SQL Databases, however, are not free so you may have to pay a small amount to get one or alternatively adapt the steps herein to use Team Foundation Server to deploy to an on-premises SQL Server instance. Note that a MSDN subscription does include some small usage of Windows Azure SQL Database and that allowance will be more than enough to go through the steps herein.&lt;/p&gt;  &lt;p&gt;We can break our process down into the following high-level steps:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Create a Windows Azure SQL Database&lt;/li&gt;    &lt;li&gt;Sign up for Team Foundation Service (TFS)&lt;/li&gt;    &lt;li&gt;Create an SSDT database project&lt;/li&gt;    &lt;li&gt;Add the SSDT project to TFS Source Control&lt;/li&gt;    &lt;li&gt;Setup your Publish Profile file&lt;/li&gt;    &lt;li&gt;Create a Build Definition&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Let’s dive into all of those steps.&lt;/p&gt;  &lt;h3&gt;Create a new Windows Azure SQL Database&lt;/h3&gt;  &lt;p&gt;Visit &lt;a title="https://manage.windowsazure.com/" href="https://manage.windowsazure.com/"&gt;https://manage.windowsazure.com/&lt;/a&gt; and sign up for a new Windows Azure SQL Database:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_713EE18A.png"&gt;&lt;img width="675" height="183" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_6FFA48AB.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Your new database will be viewable in the portal immediately:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_43DD4BBA.png"&gt;&lt;img width="611" height="447" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_14AB6023.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Windows Azure SQL Databases are, by default, closed to the outside world so you must edit the list of IP addresses that are allowed to access the server. Setting this up is outside the scope of this blog post however simply go to &lt;a href="http://msdn.microsoft.com/en-us/library/ee621783.aspx" target="_blank"&gt;How to: Configure the Server-Level Firewall Settings (Windows Azure SQL Database)&lt;/a&gt; to learn how to do this (its very easy).&lt;/p&gt;  &lt;h3&gt;Sign up for Team Foundation Service&lt;/h3&gt;  &lt;p&gt;Visit &lt;a title="https://tfs.visualstudio.com/" href="https://tfs.visualstudio.com/"&gt;https://tfs.visualstudio.com/&lt;/a&gt; to sign up to use Team Foundation Service using your Microsoft Account (aka Windows Live ID). Once you have signed-up you will have a dedicated service URL (mine, for example,&amp;nbsp; is &lt;a href="https://jamiet.visualstudio.com/)."&gt;https://jamiet.visualstudio.com/).&lt;/a&gt; Visit that URL and click “New Team Project”:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_0CB3BDC1.png"&gt;&lt;img width="673" height="202" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_59778457.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Fill in the pertinent details and hit “Create Project”:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_7F6D34AD.png"&gt;&lt;img width="441" height="374" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_308C6F4E.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Creating the Team Project will take a minute or so but will be ready for you when you need it shortly.&lt;/p&gt;  &lt;h3&gt;Create an SSDT database project&lt;/h3&gt;  &lt;p&gt;For this you’re going to need SSDT for Visual Studio 2010 or Visual Studio 2012. They are both free and can be downloaded from &lt;a href="http://msdn.microsoft.com/en-us/data/gg427686" target="_blank"&gt;here&lt;/a&gt;; I am using SSDT for Visual Studio 2012.&lt;/p&gt;  &lt;p&gt;You will need to create a new SQL Server Database Project:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_0F98FCA7.png"&gt;&lt;img width="765" height="432" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_07A15A45.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Once the project is created it will appear in Solution Explorer and be empty at this point. We are going to be deploying to Windows Azure SQL Database therefore we must tell the project that that will be the case. To do that right-click on the project and select Properties:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_623766D6.png"&gt;&lt;img width="459" height="146" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_21951A67.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In Project Settings select Windows Azure SQL Database as the Target platform:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_60869B02.png"&gt;&lt;img width="539" height="178" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_63B882EA.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;You’ll need to add a database object to your project otherwise this is all rather pointless. Given that this is simply for demo purposes we shall simply create a table called [Table1].&lt;/p&gt;                  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_5097563E.png"&gt;&lt;img width="419" height="272" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_5D91364F.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML4741cca_559993ED.png"&gt;&lt;img width="728" height="146" title="SNAGHTML4741cca" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="SNAGHTML4741cca" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML4741cca_thumb_4DA1F18B.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_1EDC38E9.png"&gt;&lt;img width="404" height="152" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_0C273F32.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;OK, we now have a Windows Azure SQL Database, a TFS service (is that Team Foundation Service service???) and a SSDT database project with a simple table in it. Let’s now hook them all together.&lt;/p&gt;  &lt;h3&gt;Add the SSDT project to TFS Source Control&lt;/h3&gt;  &lt;p&gt;Interaction with TFS from within Visual Studio is done using the Team Explorer pane.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_0B4ED948.png"&gt;&lt;img width="367" height="169" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_0A76735E.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;From Team Explorer you will need to connect to your new TFS. Click on the address bar in Team Explorer and point to “Connect to Team Projects…”&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_1B7AA141.png"&gt;&lt;img width="501" height="352" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_488F8E0F.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Choose your project and click Connect. Your server is simply the name of the server that was setup earlier; remember that mine was jamiet.visualstudio.com (note that it uses an https connection, not http):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML48ae7f5_0061D233.png"&gt;&lt;img width="530" height="482" title="SNAGHTML48ae7f5" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="SNAGHTML48ae7f5" src="http://sqlblog.com/blogs/jamie_thomson/SNAGHTML48ae7f5_thumb_6D40A586.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;You should now be connected to your Team Foundation Service. Add your source code to TFS Source Control from inside Solution Explorer:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_2BC5F32D.png"&gt;&lt;img width="467" height="338" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_0AD28086.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_3B858831.png"&gt;&lt;img width="347" height="469" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_487F6842.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;And check in your SSDT database project (or “commit” if you prefer that terminology):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_6E08E5A3.png"&gt;&lt;img width="348" height="285" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_3F432D01.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_5E19A0DF.png"&gt;&lt;img width="287" height="518" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_63F44478.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;You will now be able to browse to your TFS home page (mine is &lt;a href="https://jamiet.visualstudio.com"&gt;https://jamiet.visualstudio.com&lt;/a&gt;), click on your project and browse through your checked in code:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_2279921F.png"&gt;&lt;img width="681" height="387" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_415005FD.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;Setup your Publish Profile file&lt;/h3&gt;  &lt;p&gt;You need to tell SSDT where to deploy the project to, that information is stored in a &lt;a href="http://sqlblog.com/blogs/jamie_thomson/archive/2012/05/09/publish-profile-files-in-sql-server-data-tools-ssdt.aspx" target="_blank"&gt;Publish Profile file&lt;/a&gt;. In Solution Explorer right-click and select “Publish…”&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_78B6172B.png"&gt;&lt;img width="449" height="234" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_49F05E89.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Enter the details of the Windows Azure SQL Database that you prepared earlier:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_1DD36198.png"&gt;&lt;img width="597" height="338" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_75C0B278.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Once the Publish Profile file has been saved it will be saved in your project:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_7B2F231C.png"&gt;&lt;img width="346" height="216" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_0175F9AB.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;At the time of writing Windows Azure SQL Database only supports SQL authentication so we have to edit the Publish Profile file to include the password for the account that will be used for deployment. Right-click on the Publish Profile file, select “Open with…” and from the resultant dialog select “XML (Text) Editor:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_40677A46.png"&gt;&lt;img width="485" height="367" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_11A1C1A4.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Edit the Connection String to include your password:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_7761587F.png"&gt;&lt;img width="720" height="168" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_417C6365.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;NOW you can check in:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_55294CF9.png"&gt;&lt;img width="334" height="279" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_5450E70F.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_2114ADA6.png"&gt;&lt;img width="264" height="490" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_191D0B44.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;Create a Build Definition&lt;/h3&gt;  &lt;p&gt;A Build Definition defines how and when the source code in the project should get built. Create a new Build Definition by selecting “Builds” in the Team Explorer address bar and choosing New Build Definition:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_3EA688A5.png"&gt;&lt;img width="358" height="333" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_61F37D4A.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_4ED2509E.png"&gt;&lt;img width="244" height="182" title="image" style="margin:0px;border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_0710C7B7.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Follow the steps shown in the screenshots below to setup your Build Definition:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_7F192554.png"&gt;&lt;img width="623" height="426" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_3E0AA5F0.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_319C82C7.png"&gt;&lt;img width="625" height="428" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_5B9C80EF.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_55E16749.png"&gt;&lt;img width="623" height="427" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_46CA886F.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_172C69E3.png"&gt;&lt;img width="811" height="478" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_7BA767DF.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;(Credit for informing me about the MSBuild arguments goes entirely to Jakob Ehn and his blog post &lt;a title="http://geekswithblogs.net/jakob/archive/2012/04/25/deploying-ssdt-projects-with-tfs-build.aspx" href="http://geekswithblogs.net/jakob/archive/2012/04/25/deploying-ssdt-projects-with-tfs-build.aspx"&gt;Deploying SSDT Projects with TFS Build&lt;/a&gt;)&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;And you’re done!&lt;/h3&gt;  &lt;p&gt;If you have set everything up correctly then any future check in should trigger a build and thus a Publish of the SSDT project to your Windows Azure SQL Database. Here is my first build report:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_52BC52D6.png"&gt;&lt;img width="490" height="407" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_78B2032C.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;and back in SSDT I can use SQL Server Object Explorer to browse my newly deployed table:&lt;/p&gt;  &lt;blockquote&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/jamie_thomson/image_053FB049.png"&gt;&lt;img width="374" height="425" title="image" style="border:0px currentColor;padding-top:0px;padding-right:0px;padding-left:0px;display:inline;background-image:none;" alt="image" src="http://sqlblog.com/blogs/jamie_thomson/image_thumb_4F5ABB2E.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;That’s Continuous Deployment for SSDT projects to Windows Azure SQL Database using Team Foundation Service. Awesome!&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><item><title>More SSDT naming confusion</title><link>http://sqlblog.com/blogs/jamie_thomson/archive/2013/01/16/more-ssdt-naming-confusion.aspx</link><pubDate>Wed, 16 Jan 2013 22:05:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47189</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;I have blogged previously at &lt;a target="_blank" href="http://sqlblog.com/blogs/jamie_thomson/archive/2012/04/03/ssdt-what-s-in-a-name.aspx"&gt;SSDT – What’s in a name?&lt;/a&gt; about the naming confusion that Microsoft have created by their inconsistent use of the term “SQL Server Data Tools” (SSDT) in SQL Server 2012. Is it a Visual Studio shell incorporating project templates for building databases, SSIS packages, SSAS cubes &amp;amp; SSRS reports? Or is it simply the project template for databases? Pick any two people on the SQL Server team and they’ll probably give you two different (and probably ambiguous) answers.&lt;/p&gt;  &lt;p&gt;The situation infuriates the hell out of me but probably not as much as it does &lt;a target="_blank" href="http://social.msdn.microsoft.com/Forums/en-GB/ssdt/thread/9185c1ca-9e42-413d-a95a-02d0aec9c12a"&gt;this guy&lt;/a&gt; who posted to the SSDT forum:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;i&gt;I installed SSDT 2012 (December version) on an existing Visual Studio 2012 Premium install but I can't find the BI templates!!!?&lt;/i&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;When informed that the BI project templates (i.e. SSIS, SSAS, SSRS) only come with a SQL Server installation and that actually they’re (&lt;b&gt;still&lt;/b&gt;) not available for VS2012 he had this to say:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;i&gt;I wish this was better documented so that I could have saved a few hours.&lt;/i&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;That’s a guy who has wasted hours of his life simply because Microsoft can’t name their products properly and sensibly. Is it really that difficult?&lt;/p&gt;  &lt;p&gt;Rant over. Sorry, but it needed to be said.&lt;/p&gt;  &lt;p&gt;&lt;a target="_blank" href="http://twitter.com/jamiet"&gt;@Jamiet&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;white-space:normal;orphans:2;widows:2;font-size-adjust:none;font-stretch:normal;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;"&gt;UPDATE. A day after publishing this blog post and I stumble across someone &lt;a target="_blank" href="http://social.msdn.microsoft.com/Forums/en-GB/ssdt/thread/7453d77b-894d-4a0f-bba2-e0e72ec5c211"&gt;asking a question&lt;/a&gt; about SSIS on the SSDT forum. The SSDT forum is for questions about SSDT database projects but of course, this person has read all the documentation from Microsoft saying that SSIS is part of SSDT and hence posts his SSIS questions on the SSDT forum. This is bad. Bad bad bad.&lt;/span&gt;&lt;/p&gt;</description></item></channel></rss>