<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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 'tsbt-db'</title><link>http://blogs.msdn.com/search/SearchResults.aspx?tag=tsbt-db&amp;o=datedescending</link><description>Search results matching tag 'tsbt-db'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>DefaultDataPath</title><link>http://blogs.msdn.com/gertd/archive/2009/11/30/defaultdatapath.aspx</link><pubDate>Mon, 30 Nov 2009 08:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9930502</guid><dc:creator>gertd</dc:creator><description>&lt;p&gt;VSDB uses the the ($DefaultDataPath) SQLCMD variable to represent the location where you would place your data and log file of your database. The deployment engine sets the value of SQLCMD variable by querying SQL Server using the following query:&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;DECLARE&lt;/span&gt; @&lt;span class="kwrd"&gt;value&lt;/span&gt; nvarchar(512),&lt;/pre&gt;
&lt;/div&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;        @rc    &lt;span class="kwrd"&gt;int&lt;/span&gt;;&lt;/pre&gt;
&lt;/div&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&lt;span class="kwrd"&gt;EXEC&lt;/span&gt;    @rc = [master].[dbo].[xp_instance_regread] N&lt;span class="str"&gt;'HKEY_LOCAL_MACHINE'&lt;/span&gt;,N&lt;span class="str"&gt;'Software\Microsoft\MSSQLServer\MSSQLServer'&lt;/span&gt;,N&lt;span class="str"&gt;'DefaultData'&lt;/span&gt;, @&lt;span class="kwrd"&gt;value&lt;/span&gt; &lt;span class="kwrd"&gt;output&lt;/span&gt;&lt;span class="rem"&gt;-- , 'no_output'; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt;  @&lt;span class="kwrd"&gt;value&lt;/span&gt; &lt;span class="kwrd"&gt;AS&lt;/span&gt; [&lt;span class="kwrd"&gt;Value&lt;/span&gt;]&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;The problem is that this value by default is not getting populated when you install SQL Server! You have to set it using SQL Server Management Studio, using the Server properties dialog, on the Database Settings tab,&amp;#160; you will find the “Database default locations”.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/gertd/WindowsLiveWriter/DefaultDataPath_F342/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/gertd/WindowsLiveWriter/DefaultDataPath_F342/image_thumb.png" width="753" height="675" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;You can programmatically set it using the following query:&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;EXEC&lt;/span&gt; xp_instance_regwrite N&lt;span class="str"&gt;'HKEY_LOCAL_MACHINE'&lt;/span&gt;, N&lt;span class="str"&gt;'Software\Microsoft\MSSQLServer\MSSQLServer'&lt;/span&gt;, N&lt;span class="str"&gt;'DefaultData'&lt;/span&gt;, REG_SZ, N&lt;span class="str"&gt;'d:\dbs\MSSQL10.MSSQLSERVER\MSSQL\DATA'&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;This brings up the next question, what does VSDB return as the value if the DefaultData location Registry entry is not set? It returns the location of the master.mdf file. If you would turn on SQL tracing you will see the following query fly by:&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;DECLARE&lt;/span&gt; @filepath nvarchar(260),&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;        @rc &lt;span class="kwrd"&gt;int&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&lt;span class="kwrd"&gt;EXEC&lt;/span&gt; master.dbo.xp_instance_regread N&lt;span class="str"&gt;'HKEY_LOCAL_MACHINE'&lt;/span&gt;,N&lt;span class="str"&gt;'Software\Microsoft\MSSQLServer\MSSQLServer'&lt;/span&gt;,N&lt;span class="str"&gt;'DefaultData'&lt;/span&gt;, @filepath &lt;span class="kwrd"&gt;output&lt;/span&gt;, &lt;span class="str"&gt;'no_output'&lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;&lt;span class="kwrd"&gt;IF&lt;/span&gt; ((@filepath &lt;span class="kwrd"&gt;IS&lt;/span&gt; &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;) &lt;span class="kwrd"&gt;AND&lt;/span&gt; (CHARINDEX(N&lt;span class="str"&gt;'\'&lt;/span&gt;, @filepath, len(@filepath)) = 0))&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;    &lt;span class="kwrd"&gt;SELECT&lt;/span&gt;     @filepath = @filepath + N&lt;span class="str"&gt;'\'&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;&lt;span class="kwrd"&gt;IF&lt;/span&gt; (@filepath &lt;span class="kwrd"&gt;IS&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;    &lt;span class="kwrd"&gt;SELECT&lt;/span&gt;     @filepath = [sdf].[physical_name]&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;    &lt;span class="kwrd"&gt;FROM&lt;/span&gt;       [master].[sys].[database_files] &lt;span class="kwrd"&gt;AS&lt;/span&gt; [sdf]&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;    &lt;span class="kwrd"&gt;WHERE&lt;/span&gt;      [file_id] = 1&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; @filepath &lt;span class="kwrd"&gt;AS&lt;/span&gt; FilePath&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Now this still does not mean it works, because SQL Server or SQL Server Management Studio&lt;em&gt; &lt;strong&gt;&lt;u&gt;not&lt;/u&gt;&lt;/strong&gt;&lt;/em&gt; validate if this location actually exists and is accessible from within SQL Server. &lt;/p&gt;

&lt;p&gt;So the question becomes how can you protect yourself against this inside my deployment? &lt;/p&gt;

&lt;p&gt;The following script can be helpful as a pre-deployment script to check if the $(DefaultDataPath) location actually exists and take action accordingly. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://cid-526eb9977609d51e.skydrive.live.com/self.aspx/DataDude/Samples/Scripts/DataPathExistsCheck.sql" target="_blank"&gt;DataPathExistsCheck.sql&lt;/a&gt;&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="rem"&gt;-- If we raise an error we want to stop execution of the deployment engine&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;:&lt;span class="kwrd"&gt;ON&lt;/span&gt; ERROR &lt;span class="kwrd"&gt;EXIT&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&lt;span class="kwrd"&gt;SET&lt;/span&gt; NOCOUNT &lt;span class="kwrd"&gt;ON&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&lt;span class="kwrd"&gt;DECLARE&lt;/span&gt; @&lt;span class="kwrd"&gt;value&lt;/span&gt; nvarchar(512),&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        @rc    &lt;span class="kwrd"&gt;int&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;&lt;span class="kwrd"&gt;EXEC&lt;/span&gt;    @rc = [master].[dbo].[xp_instance_regread] N&lt;span class="str"&gt;'HKEY_LOCAL_MACHINE'&lt;/span&gt;,N&lt;span class="str"&gt;'Software\Microsoft\MSSQLServer\MSSQLServer'&lt;/span&gt;,N&lt;span class="str"&gt;'DefaultData'&lt;/span&gt;, @&lt;span class="kwrd"&gt;value&lt;/span&gt; &lt;span class="kwrd"&gt;output&lt;/span&gt;&lt;span class="rem"&gt;-- , 'no_output'; &lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;&lt;span class="rem"&gt;-- debug: shows the output&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;&lt;span class="rem"&gt;-- SELECT  @value AS [Value], @rc as [RC];&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;&lt;span class="kwrd"&gt;DECLARE&lt;/span&gt; @&lt;span class="kwrd"&gt;result&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;&lt;span class="kwrd"&gt;DECLARE&lt;/span&gt; @&lt;span class="kwrd"&gt;table&lt;/span&gt; &lt;span class="kwrd"&gt;as&lt;/span&gt; &lt;span class="kwrd"&gt;table&lt;/span&gt;(FileExists &lt;span class="kwrd"&gt;int&lt;/span&gt;, DirExist &lt;span class="kwrd"&gt;int&lt;/span&gt;, ParentDirExists &lt;span class="kwrd"&gt;int&lt;/span&gt;)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;&lt;span class="rem"&gt;-- debug: shows the output&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;&lt;span class="rem"&gt;-- EXEC [master].[dbo].[xp_fileexist] @value&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;INSERT  @&lt;span class="kwrd"&gt;table&lt;/span&gt; &lt;span class="kwrd"&gt;EXEC&lt;/span&gt; [master].[dbo].[xp_fileexist] @&lt;span class="kwrd"&gt;value&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;&lt;span class="kwrd"&gt;IF&lt;/span&gt; &lt;span class="kwrd"&gt;EXISTS&lt;/span&gt; (&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; * &lt;span class="kwrd"&gt;FROM&lt;/span&gt; @&lt;span class="kwrd"&gt;table&lt;/span&gt; &lt;span class="kwrd"&gt;WHERE&lt;/span&gt; DirExist = 1)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;&lt;span class="kwrd"&gt;BEGIN&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;    &lt;span class="kwrd"&gt;PRINT&lt;/span&gt; &lt;span class="str"&gt;' DIRECTORY '&lt;/span&gt; + @&lt;span class="kwrd"&gt;value&lt;/span&gt; + &lt;span class="str"&gt;' EXISTS'&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;&lt;span class="kwrd"&gt;END&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;&lt;span class="kwrd"&gt;ELSE&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;&lt;span class="kwrd"&gt;BEGIN&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;    &lt;span class="kwrd"&gt;PRINT&lt;/span&gt; &lt;span class="str"&gt;' DIRECTORY '&lt;/span&gt; + @&lt;span class="kwrd"&gt;value&lt;/span&gt; + &lt;span class="str"&gt;' DOES NOT EXIST'&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;    &lt;span class="kwrd"&gt;RAISERROR&lt;/span&gt;(&lt;span class="str"&gt;'DIRECTORY DOES NOT EXIST'&lt;/span&gt;, 16, 1)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;&lt;span class="kwrd"&gt;END&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;:&lt;span class="kwrd"&gt;ON&lt;/span&gt; ERROR &lt;span class="kwrd"&gt;IGNORE&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;I hope this is helpful and builds a better understanding on how VSDB works under the covers, 
  &lt;br /&gt;GertD @ &lt;a href="http://www.DBProj.com"&gt;www.DBProj.com&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Oracle provider Beta Available!</title><link>http://blogs.msdn.com/camerons/archive/2009/07/22/oracle-provider-beta-available.aspx</link><pubDate>Wed, 22 Jul 2009 07:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9844108</guid><dc:creator>camerons</dc:creator><description>&lt;p&gt;As many of you already know, I started my career at Microsoft as the PUM responsible for building the first version of Database Professionals, which was later merged into the VSTS Developer box. &lt;/p&gt;  &lt;p&gt;I was thrilled to see the announce email ( which I have pasted verbatim into this post ) hit my inbox, announcing the beta availability of the Oracle DSP provider that works with the beta version of &lt;a href="http://msdn.microsoft.com/en-us/teamsystem/dd819231.aspx"&gt;VSTS 2010&lt;/a&gt;. What this essentially means is that with these new bits from Quest Software, you can point the DBPro functionality at an Oracle database! &lt;/p&gt;  &lt;p&gt;If you have seen the capabilities that the DBPro feature set enables but have been unable to take advantage of it due to the fact that your organization runs on top of an Oracle database, follow some of the links below!&lt;/p&gt;  &lt;p&gt;You'll be glad you did!&lt;/p&gt;  &lt;p&gt;Cameron&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;&amp;lt;BetaAnnounceEmail&amp;gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://cwskinner.members.winisp.net/OracleproviderBetaAvailable_F92B/clip_image002.jpg"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="clip_image002" src="http://cwskinner.members.winisp.net/OracleproviderBetaAvailable_F92B/clip_image002_thumb.jpg" width="613" height="153" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;The beta is LIVE!!&lt;/b&gt;&lt;b&gt;      &lt;br /&gt;&lt;/b&gt;It seems like just yesterday that we began working on Project Fuze, the DSP for Oracle database support in Visual Studio Team System 2010&amp;#8230; maybe that&amp;#8217;s because I didn&amp;#8217;t have to write the code! Anyway, after many, many months in our &lt;a href="http://maps.google.com/maps?ie=UTF8&amp;amp;q=5+polaris+way,+aliso+viejo,+ca&amp;amp;fb=1&amp;amp;split=1&amp;amp;gl=us&amp;amp;cid=0,0,9596331769329382693&amp;amp;ei=p-ZkSur2LoqusgO7-ZRn&amp;amp;ll=33.585827,-117.723849&amp;amp;spn=0.008115,0.013325&amp;amp;t=h&amp;amp;z=16&amp;amp;iwloc=A"&gt;super-secret development lab&lt;/a&gt; we&amp;#8217;ve finally finished the beta version! The public beta is now available on &lt;a href="http://www.teamfuze.net/beta.jspa"&gt;TeamFuze.net&lt;/a&gt; &amp;#8211; make sure that you visit Microsoft&amp;#8217;s site for more information on their public beta of &lt;a href="http://msdn.microsoft.com/en-us/teamsystem/dd819231.aspx"&gt;Visual Studio Team System 2010&lt;/a&gt; since you&amp;#8217;ll need to have that running in order to try out Project Fuze.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Your participation is key!      &lt;br /&gt;&lt;/b&gt;Beta participation is free and open to anyone. However, in order to make the software actually &lt;i&gt;useful&lt;/i&gt; to you, we need to hear back from you about the things you like (send that to me&amp;#8230;) as well as the things you don&amp;#8217;t like (send that to the developers!). Seriously, without your invaluable feedback, the beta is nothing more than a glorified preview. We want to do everything possible to make sure that Project Fuze will deliver an excellent experience and make you more productive in Visual Studio Team System; we can&amp;#8217;t do that without your consistent, honest feedback. So please &lt;a href="http://www.teamfuze.net/forumindex.jspa?categoryID=636"&gt;join the forums&lt;/a&gt; and post often! We&amp;#8217;re listening!&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Check out the video!      &lt;br /&gt;&lt;/b&gt;We recorded a &lt;a href="http://www.youtube.com/watch?v=hlKKb3XDxQU"&gt;video demonstration&lt;/a&gt; of how to use Project Fuze inside of Visual Studio Team System 2010. In it we cover creating a new Oracle database project, importing your schema, managing and altering objects, comparing your changes to the live schema and deploying them back to the database. Don&amp;#8217;t forget to bookmark our &lt;a href="http://www.youtube.com/view_play_list?p=A5F3FF92D17B20F8"&gt;YouTube playlist&lt;/a&gt; for future video updates.&lt;/p&gt;  &lt;p&gt;Thanks to all of you for your patience these last few months!&lt;/p&gt;  &lt;p&gt;-- The TeamFuze Team&lt;/p&gt;  &lt;p&gt;For more information or to opt out of this newsletter, please contact &lt;a href="mailto:info@teamfuze.net"&gt;info@teamfuze.net&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;&amp;lt;/BetaAnnounceEmail&amp;gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>DBSchema file for SQL LiteSpeed XP’s</title><link>http://blogs.msdn.com/gertd/archive/2009/06/10/dbschema-file-for-sql-litespeed-xp-s.aspx</link><pubDate>Wed, 10 Jun 2009 07:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9725404</guid><dc:creator>gertd</dc:creator><description>&lt;p&gt;Based on a customer request I created a .dbschema file which contains the definitions of all the extended stored procedures used by &lt;a href="http://www.quest.com/litespeed-for-sql-server/" target="_blank"&gt;SQL LiteSpeed 5.0&lt;/a&gt; that live inside the master database. Since schema import does not import the definition of extended stored procedures, the user could no resolve the reference to the extended stored procedures.&lt;/p&gt;  &lt;p&gt;The following 39 extended stored procedures are defined inside the dbschema file:&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="400"&gt;&lt;strong&gt;Extended Stored Procedure name&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="400"&gt;         &lt;p&gt;[dbo].[xp_append_file]           &lt;br /&gt;[dbo].[xp_backup_database]            &lt;br /&gt;[dbo].[xp_backup_log]            &lt;br /&gt;[dbo].[xp_delete_tsmfile]            &lt;br /&gt;[dbo].[xp_encrypt_decrypt]            &lt;br /&gt;[dbo].[xp_file_search]            &lt;br /&gt;[dbo].[xp_get_temp_filename]            &lt;br /&gt;[dbo].[xp_memory_size]            &lt;br /&gt;[dbo].[xp_objectrecovery]            &lt;br /&gt;[dbo].[xp_objectrecovery_createscript]            &lt;br /&gt;[dbo].[xp_objectrecovery_executeselect]            &lt;br /&gt;[dbo].[xp_objectrecovery_viewcontents]            &lt;br /&gt;[dbo].[xp_procedure]            &lt;br /&gt;[dbo].[xp_read_file]            &lt;br /&gt;[dbo].[xp_rebind_tsmmc]            &lt;br /&gt;[dbo].[xp_remove_file]            &lt;br /&gt;[dbo].[xp_replicate_activity_statistics]            &lt;br /&gt;[dbo].[xp_replicate_job_statistics]            &lt;br /&gt;[dbo].[xp_restore_attachedfilesonly]            &lt;br /&gt;[dbo].[xp_restore_checkpassword]            &lt;br /&gt;[dbo].[xp_restore_checksumonly]            &lt;br /&gt;[dbo].[xp_restore_database]            &lt;br /&gt;[dbo].[xp_restore_filelistonly]            &lt;br /&gt;[dbo].[xp_restore_headeronly]            &lt;br /&gt;[dbo].[xp_restore_log]            &lt;br /&gt;[dbo].[xp_restore_setinfo]            &lt;br /&gt;[dbo].[xp_restore_verifyonly]            &lt;br /&gt;[dbo].[xp_sls_bcp]            &lt;br /&gt;[dbo].[xp_slsAddRegMultiString]            &lt;br /&gt;[dbo].[xp_slsReadProgress]            &lt;br /&gt;[dbo].[xp_slsRemoveRegMultiString]            &lt;br /&gt;[dbo].[xp_slssqlmaint]            &lt;br /&gt;[dbo].[xp_sqllitespeed_debug]            &lt;br /&gt;[dbo].[xp_sqllitespeed_licenseinfo]            &lt;br /&gt;[dbo].[xp_sqllitespeed_version]            &lt;br /&gt;[dbo].[xp_view_sls_auditlog]            &lt;br /&gt;[dbo].[xp_view_tsmcontents]            &lt;br /&gt;[dbo].[xp_view_tsmfilespaces]            &lt;br /&gt;[dbo].[xp_view_tsmmc]&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;You can download the dbschema files from the following SkyDrive location:   &lt;br /&gt;&lt;a title="http://cid-526eb9977609d51e.skydrive.live.com/self.aspx/DBProj.com/DBSchema/SQLLiteSpeed/SQLLiteSpeed.dbschema.zip" href="http://cid-526eb9977609d51e.skydrive.live.com/self.aspx/DBProj.com/DBSchema/SQLLiteSpeed/SQLLiteSpeed.dbschema.zip"&gt;http://cid-526eb9977609d51e.skydrive.live.com/self.aspx/DBProj.com/DBSchema/SQLLiteSpeed/SQLLiteSpeed.dbschema.zip&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There are 3 dbschema files, one for each version:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://cid-526eb9977609d51e.skydrive.live.com/self.aspx/DBProj.com/DBSchema/SQLLiteSpeed/SQLLiteSpeed-2000.dbschema" target="_blank"&gt;SQLLiteSpeed-2000.dbschema&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://cid-526eb9977609d51e.skydrive.live.com/self.aspx/DBProj.com/DBSchema/SQLLiteSpeed/SQLLiteSpeed-2005.dbschema" target="_blank"&gt;SQLLiteSpeed-2005.dbschema&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://cid-526eb9977609d51e.skydrive.live.com/self.aspx/DBProj.com/DBSchema/SQLLiteSpeed/SQLLiteSpeed-2008.dbschema" target="_blank"&gt;SQLLiteSpeed-2008.dbschema&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I hope this helps others who need to reference SQL LiteSpeed procedures.&lt;/p&gt;  &lt;p&gt;GertD @ &lt;a href="http://www.DBProj.com"&gt;www.DBProj.com&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Declarative Database Development</title><link>http://blogs.msdn.com/gertd/archive/2009/06/05/declarative-database-development.aspx</link><pubDate>Fri, 05 Jun 2009 07:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9702216</guid><dc:creator>gertd</dc:creator><description>&lt;p&gt;&lt;/p&gt;  &lt;h1&gt;Define What You Want, Not How You Get There!&lt;/h1&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;If Not Exists…&lt;/h2&gt;  &lt;p&gt;Database development is many aspects behind in comparison to regular application development. If you look how database development is integrated with regular application development or development processes it becomes even more obvious that there is room for improvement in this area. When asked, you will find that many database developers are spending their valuable time writing, maintaining, and testing database deployment scripts. The practices may vary, some write them by hand, some use schema comparison tools to generate the script and modify that, and some went all the way to create their own tools to generate these kinds of deployment scripts.&lt;/p&gt;  &lt;p&gt;However, the outcome of these efforts is all the same, a set of SQL statements captured inside .SQL script files or embedded as SQL statements inside some application or installer program like &lt;a href="http://wix.sourceforge.net/manual-wix3/sql_xsd_index.htm"&gt;WiX&lt;/a&gt;. In general they all look like this:&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;--&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;-- [dbo].[DataLoading]&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;--&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;IF (OBJECT_ID(&lt;span class="str"&gt;'[dbo].[DataLoading]'&lt;/span&gt;, &lt;span class="str"&gt;'U'&lt;/span&gt;) IS NULL)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;BEGIN&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;CREATE TABLE [dbo].[DataLoading]&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;(&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;    [TableName]    SYSNAME NOT NULL,&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;    [MultiValue]    TINYINT NOT NULL,&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;    [RowCount]    BIGINT    NOT NULL,&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;    PRIMARY KEY CLUSTERED&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;    (&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;        [TableName], &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;        [MultiValue]&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;    )&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;END&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;GO&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Fig 1: A typical fragment of a manually written deployment script&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Most scripts are significantly more complicated, especially when you start dealing with incremental version updates. If you ever wrote or maintained one of these scripts you know this is when the problems with this approach become clear. For the simple cases it is all straightforward—check if the object exists, if not create it—this is even true when adding constraints, etc., since the object is easily identifiable. How about adding a column, changing its data type, and renaming a column name or changing the column order inside an index without changing the index name? As soon as you have multiple changes on a single aspect of an object, ordering and the ability to detect which change needs to be made gets very complicated.&lt;/p&gt;

&lt;p&gt;Some database developers therefore stamp each and every object, using an extend property or by maintaining a version table, with versioning information about the object. This works great, as long as you are the only one and/or only tool that makes the changes to the schema, since SQL Server can and will not enforce the versioning information.&lt;/p&gt;

&lt;p&gt;The fact that SQL Server does not maintain and expose enough useful information when it comes to versioning of the database schema, nor can it make any guarantees that the schema has been changed or tempered with, only compounds the problem.&lt;/p&gt;

&lt;p&gt;The next problem with this approach is that the execution time of the deployment will grow over time. What most database developers will do is maintain two scripts, a new deployment and an incremental deployment, in the same fashion as described above. When time progresses you are accumulating lots of changes, which all have to be executed in the same time order to guarantee the right results. This might also lead to having to touch or rebuild objects multiple times, because dependencies between objects cannot be honored between change scripts across time periods. In other words change script v4 to v5 needs to be independent of v7 to v8 and therefore cannot collapse operations together for efficiency sake.&lt;/p&gt;

&lt;p&gt;This brings me to the last obstacle for this approach; your script can only reflect your knowledge of the system as you understand at the time you are writing the script. What do I mean by that? Say you are distributing an application; the user has a need for some additional reporting and adds VIEWs to the system inside their own schema, providing abstraction and isolation from your schema. Great practice! They are very happy and add an index over the view, which makes the VIEW schema bound. Now it is time for you to update your schema and you happen to have a need to update one of the tables that is covered by a schema-bound view from the user. You do not know about this view, so the reality is that most deployments will fail at this time.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;The Alternative Approach&lt;/h2&gt;

&lt;p&gt;So what is the alternative you might ask? If you analyze the problems described above there are a couple of conclusions you can draw:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;SQL Server does not provide any guarantees about the schema version deployed.&lt;/li&gt;

  &lt;li&gt;You cannot rely on your knowledge about the state of the system; the system might have changed underneath you, or might be on a different version or is in some weird state.&lt;/li&gt;

  &lt;li&gt;The number of permutations to validate inside your deployment script is therefore endless and you cannot compensate for all possible cases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The root cause, however, is the fact that you are encoding state transitions inside your deployment script that are based on a state of the system at time T. When you are deploying this at time T+5 the world might look and be in fact different and all you could do is “fail” the deployment since the outcome of your deployment is now in doubt.&lt;/p&gt;

&lt;p&gt;Now what if you describe how you want your schema to look, instead of encoding inside a script how to implement it? This is what declarative database development is about. You define what you want, not how you get there or physically implement the database.&lt;/p&gt;

&lt;p&gt;Let’s dive into how the Visual Studio 2008 Team System Database Edition GDR product leverages declarative database development to produce a model-driven deployment of database schemas.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Let There Be a Model&lt;/h2&gt;

&lt;p&gt;The first thing you need is a model representation of the database schema. The model describes all the objects inside your database schema; this is the “what you want” part. In order to create and fill the model, the system needs a description of the objects. Normally this is provided through a DSL (Domain Specific Language); VSDB uses the regular T-SQL DDL language to define the shape of schema objects, so there is no need to learn a new language or representation. So the model is fed a collection of DDL statements, which are living inside .SQL files, held together by a project file (.DBPROJ), which functions as the container for the source code files.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/gertd/WindowsLiveWriter/DeclarativeDatabaseDevelopment_DFCE/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/gertd/WindowsLiveWriter/DeclarativeDatabaseDevelopment_DFCE/image_thumb.png" width="719" height="242" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Fig 2: Database projects are containers of SQL files, which are compiled in to the schema model&lt;/p&gt;

&lt;p&gt;The fact that the model is built based on a source-code representation of the database is a huge differentiator. This enables a true offline development experience and better integration with source code control systems and with aspects like build servers, etc. It also means that your model is allowed to be in an inconsistent or incomplete state; you can break dependencies inside the schema and the compiler will immediately flag those.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/gertd/WindowsLiveWriter/DeclarativeDatabaseDevelopment_DFCE/clip_image002_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://blogs.msdn.com/blogfiles/gertd/WindowsLiveWriter/DeclarativeDatabaseDevelopment_DFCE/clip_image002_thumb.jpg" width="1105" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fig 3: The Visual Studio error list indicates that your model is in an inconsistent state.&lt;/p&gt;

&lt;p&gt;The underlying engine inside VSDB will perform the following actions on top of the source code when building the model:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Parse the source code, this will enforce the syntactic validity and transform the source code into a programmatically accessible representation, which is used to store the object inside the model.&lt;/li&gt;

  &lt;li&gt;Interpretation, will wire up all the object relationships.&lt;/li&gt;

  &lt;li&gt;Validation rules, this is the stage where semantic validation is performed, for example an object that has an instead of trigger is not allowed to be part of a transactional replication publication. Two in themselves valid and correct DDL statements, but together mutually exclusive.&lt;/li&gt;

  &lt;li&gt;Optionally you can enforce more rules over the model through the use of T-SQL Static Code Analysis.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When the model is in a valid and consistent state, you can now perform a build. This will perform all the steps described above, excluding running T-SQL Static Code Analysis since this is an optional step. When no errors are detected, it will persist the resulting model to disk, as a .DBSCHEMA file. The .DBSCHEMA file is effectively an XML serialized format of the database model, which functions as your database schema “blueprint,” this is the manifest that describes what you want inside the database.&lt;/p&gt;

&lt;h2&gt;How Do I Deploy this Puppy?&lt;/h2&gt;

&lt;p&gt;Now that you have a model representation, the question is how does it help solve the deployment problem? The easiest way to explain this is to describe the deployment process using the following diagram.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/gertd/WindowsLiveWriter/DeclarativeDatabaseDevelopment_DFCE/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/gertd/WindowsLiveWriter/DeclarativeDatabaseDevelopment_DFCE/image_thumb_1.png" width="887" height="434" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Fig 4: The VSDB deployment engine in action&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;The first step is to load the source model, if this is provided in the form of a .DBSCHEMA file this is simply deserializing the model.&lt;/li&gt;

  &lt;li&gt;The second step is to produce a model representation of the target database. This is done by importing the schema the same way you created the initial project representation, except it does not persist the resulting source code representation in this case.&lt;/li&gt;

  &lt;li&gt;Now that there are two models, compare the two models, taking into account the deployment settings and additional information like the .REFACTORINGLOG file. The deployment settings determine the rules and settings used to compare and to generate the deployment script. The rafactoringlog file is providing additional information to deploy changes that cannot be determined using a difference-based deployment engine. One of the key examples is a rename column operation, which cannot be distinguished from a drop-and-add column of the same type with a different name; however, since there is state associated with the change, it is very important to preserve this information.&lt;/li&gt;

  &lt;li&gt;The result of the model comparison is a list of differences. The deployment engine will then represent each atomic change as an individual action. Then the optimizer will take the collection of actions, fold them together where possible, separate them if needed, and place them in the correct dependency order.&lt;/li&gt;

  &lt;li&gt;This information is then used to generate the deployment script, which is a regular .SQL script that can be executed normally using tools like SQLCMD.EXE or SSMS (SQL Server Management Studio).&lt;/li&gt;

  &lt;li&gt;Optionally you can tell the deployment engine to directly update the target database, but by default only the deployment script is generated, since most people want to validate that it meets the expectations before actually executing.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The end result is that you create a deployment script taking into consideration the state of the schema as it exists in time, based on the “blueprint” of the schema that you provided.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;The Icing on the Cake&lt;/h2&gt;

&lt;p&gt;Since most SQL Server deployments do not have Visual Studio installed, or you simply do not have access from your Visual Studio environment to the database that needs to get updated, there is a fully standalone command-line-based deployment engine that allows you to deploy the results of a build. This command-line engine is XCOPY deployable, so you can copy it onto a memory stick or server share and deploy your database from there.&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&amp;quot;%programfiles%\microsoft visual studio 9.0\vstsdb\deploy\vsdbcmd.exe&amp;quot; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;/a:Deploy &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;/manifest:MyDatabase.deploymanifest &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;/p:DeploymentConfigurationFile=MyDatabase.sqldeployment &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;/p:SqlCommandVariablesFile=MyDatabase.sqlcmdvars &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;/cs:&amp;quot;Data Source=MyServer\sql2008;Integrated Security=true&amp;quot;&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Fig 5: Deploying from the command line using VSDBCMD.EXE&lt;/p&gt;

&lt;p&gt;Using VSDBCMD.EXE is as easy as pointing it to the .DEPLOYMENTMANIFEST file, which is a container that holds all the build output together, but the tool allows you to override every part of the manifest.&lt;/p&gt;

&lt;p&gt;This includes which deployment settings or variable files are to be used by the deployment engine.&lt;/p&gt;

&lt;p&gt;You can also use VSDBCMD.EXE to create a model file from an existing database by using the import option like this:&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&amp;quot;%programfiles%\microsoft visual studio 9.0\vstsdb\deploy\vsdbcmd.exe&amp;quot; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;/a:Import &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;/cs:&amp;quot;Data Source=(local);Integrated Security=true;Initial Catalog=MySourceDB&amp;quot; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;/dsp:sql &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;/model:MySourceDB.dbschema&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Fig 6: Creating a model representation from a target database using VSDBCMD.EXE&lt;/p&gt;

&lt;p&gt;The resulting file can now be used as the import file for the Schema Comparison tool, which will allow you to perform the visual comparison between two database schemas presented as a .DBSCHEMA file, a Database Project, or a connection to a database. This is an ideal support tool if you need to troubleshoot the differences between two database schemas.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h2&gt;Summary&lt;/h2&gt;

&lt;p&gt;Declarative database development and Visual Studio 2008 Team System Database Edition GDR can help you streamline your processes and integration of database development tasks and ease the deployment of your database schema, through a great standalone and redistributable deployment engine.&lt;/p&gt;

&lt;p&gt;GertD @ &lt;a href="http://www.DBProj.com"&gt;www.DBProj.com&lt;/a&gt;&lt;/p&gt;</description></item><item><title>RTM of VSDB 2008 GDR R2</title><link>http://blogs.msdn.com/gertd/archive/2009/04/22/rtm-of-vsdb-2008-gdr-r2.aspx</link><pubDate>Wed, 22 Apr 2009 07:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9562506</guid><dc:creator>gertd</dc:creator><description>&lt;p&gt;The QFE rollup release for the Visual Studio Team System 2008 Database Edition GDR release is now available.&lt;/p&gt;  &lt;p&gt;You can download the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3ad767-5f69-4db9-b1c9-8f55759846ed&amp;amp;displaylang=en" target="_blank"&gt;SETUP.EXE&lt;/a&gt; from the regular location. (&lt;a title="http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3ad767-5f69-4db9-b1c9-8f55759846ed&amp;amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3ad767-5f69-4db9-b1c9-8f55759846ed"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3ad767-5f69-4db9-b1c9-8f55759846ed&lt;/a&gt;)&lt;/p&gt;  &lt;p&gt;If you have the VS2008 RTM version of the Database Edition or the RTM version of the VSDB 2008 GDR release installed, this setup will automatically upgrade your installation. If you have the RC installed of the QFE rollup, you have to uninstall first and then re-install the GDR.&lt;/p&gt;  &lt;p&gt;For more detail on what got fixed in the QFE rollup, please see my previous posting: &lt;a title="http://blogs.msdn.com/gertd/archive/2009/03/26/release-candidate-of-gdr-qfe.aspx" href="http://blogs.msdn.com/gertd/archive/2009/03/26/release-candidate-of-gdr-qfe.aspx"&gt;http://blogs.msdn.com/gertd/archive/2009/03/26/release-candidate-of-gdr-qfe.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The final version number of the is 9.1.40413.00, so you can check in your Help-&amp;gt;About&amp;#160; to see if you have the latest version installed.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/gertd/WindowsLiveWriter/RTMofVSDB2008GDRR2_7805/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/gertd/WindowsLiveWriter/RTMofVSDB2008GDRR2_7805/image_thumb.png" width="669" height="514" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; GertD @ &lt;a href="http://www.DBProj.com"&gt;www.DBProj.com&lt;/a&gt;&lt;/p&gt;</description></item><item><title>FIX: Blank Unit Test Designer Problem</title><link>http://blogs.msdn.com/gertd/archive/2009/03/11/fix-blank-unit-test-designer-problem.aspx</link><pubDate>Wed, 11 Mar 2009 07:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9470949</guid><dc:creator>gertd</dc:creator><description>&lt;p&gt;If you are running in to the following problem when creating unit tests when using database projects, there now is a fix!&lt;/p&gt;  &lt;p&gt;Consider the following scenario, you have you database project (.dbproj) open and requesting the creation of a Database Unit Test by right clicking on for example a stored procedure objects inside Schema View. This will active the Create Unit Tests wizard. However, the following problems occur in the Create Unit Tests wizard: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;There are no type lists in the Types panel. &lt;/li&gt;    &lt;li&gt;The Output project list is missing. &lt;/li&gt;    &lt;li&gt;When you click the Settings button, the wizard closes immediately. &lt;/li&gt;    &lt;li&gt;The OK button is unavailable.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This problem is in more detail described in the following KB article, &lt;a title="http://support.microsoft.com/kb/962866" href="http://support.microsoft.com/kb/962866"&gt;http://support.microsoft.com/kb/962866&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;A fix is now available at MSDN Code Gallery, see &lt;a title="http://code.msdn.microsoft.com/KB962866" href="http://code.msdn.microsoft.com/KB962866"&gt;http://code.msdn.microsoft.com/KB962866&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;-GertD&lt;/p&gt;</description></item><item><title>Oracle DSP Provider and Quest Software</title><link>http://blogs.msdn.com/camerons/archive/2009/02/25/oracle-dsp-provider-and-quest-software.aspx</link><pubDate>Wed, 25 Feb 2009 08:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9443614</guid><dc:creator>camerons</dc:creator><description>&lt;p&gt;I just wanted to make sure everyone had heard of the great news that was announced today at VSLive! in San Francisco. &lt;a href="http://www.quest.com/"&gt;Quest Software&lt;/a&gt; has announced that it will be building atop the rich extensibility infrastructure that is present in what was the VSTS Database Professionals box ( aka "Data Dude" ), now merged into the VSTS Developer box ( as of last October ), and providing a DSP provider targeting Oracle databases. This is great news, 'cause what this really means is that database developers can now use DBPro functionality against Oracle backends, in much the same way as database developers can work against SQL Server! &lt;/p&gt; &lt;p&gt;Check out some of the press coverage of the announce to learn more...&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a title="http://www.sdtimes.com/ORACLE_DATABASE_DEVELOPMENT_COMES_TO_VISUAL_STUDIO_2010/About_ORACLE_and_QUEST_and_VISUALSTUDIO/33292" href="http://www.sdtimes.com/ORACLE_DATABASE_DEVELOPMENT_COMES_TO_VISUAL_STUDIO_2010/About_ORACLE_and_QUEST_and_VISUALSTUDIO/33292"&gt;http://www.sdtimes.com/ORACLE_DATABASE_DEVELOPMENT_COMES_TO_VISUAL_STUDIO_2010/About_ORACLE_and_QUEST_and_VISUALSTUDIO/33292&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a title="http://www.centredaily.com/business/technology/story/1135766.html" href="http://www.centredaily.com/business/technology/story/1135766.html"&gt;http://www.centredaily.com/business/technology/story/1135766.html&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;This was the culmination of a lot of hard work by many people from both Microsoft and Quest. I personally am very glad and happy to see this actually come to pass!&lt;/p&gt; &lt;p&gt;WooHoo! :)&lt;/p&gt;</description></item><item><title>VSTSDB Blog Site</title><link>http://blogs.msdn.com/gertd/archive/2009/02/23/vstsdb-blog-site.aspx</link><pubDate>Mon, 23 Feb 2009 08:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9442216</guid><dc:creator>gertd</dc:creator><description>&lt;p&gt;The Visual Studio Team System Database Edition team has created a new blog site to keep you informed and update about the latest developments.&lt;/p&gt;  &lt;p&gt;Please check out: &lt;a href="http://blogs.msdn.com/vstsdb"&gt;http://blogs.msdn.com/vstsdb&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Thanks,   &lt;br /&gt;-GertD&lt;/p&gt;</description></item><item><title>DBProj.com</title><link>http://blogs.msdn.com/gertd/archive/2009/02/19/dbproj-com.aspx</link><pubDate>Thu, 19 Feb 2009 08:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9435332</guid><dc:creator>gertd</dc:creator><description>&lt;p&gt;Some of you already know or noticed through sites like &lt;a href="http://www.linkedin.com/" target="_blank"&gt;LinkedIn&lt;/a&gt; or &lt;a href="http://www.facebook.com/" target="_blank"&gt;Facebook&lt;/a&gt; that per the beginning of this month I started in a new role inside Microsoft. I moved in to an Software Architect role, working on the new Directory Services stack. Hence I needed a new place to publish my DataDude contributions to the community, this new place is &lt;a href="http://www.dbproj.com" target="_blank"&gt;DBProj.com&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The goal of the site is very simple, provide as much as possible information about the “Visual Studio Team System 2008 Database Edition GDR” product. Yes, you are reading it correctly, the site will solely focus on the “GDR” release. When a next release will become available that builds on top of the GDR architecture, Visual Studio 2010, I will expand the scope to include that as well. Since it is no longer my primary job, I need to focus on something, I hope you understand.&lt;/p&gt;  &lt;p&gt;Anyhow, from now on I will publish on the &lt;a href="http://dbproj.com/" target="_blank"&gt;DBProj.com&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;This is the end of a great 3-year journey, but that journey would not have been possible without the support of a great team of testers, program managers and developers.&lt;/p&gt;  &lt;p&gt;Thank you all! This site is a contribution to your work and dedication!&lt;/p&gt;  &lt;p&gt;Thanks,    &lt;br /&gt;-GertD forever a “DataDude”&lt;/p&gt;</description></item><item><title>Data Generator for SQL Server Sparse Columns</title><link>http://blogs.msdn.com/gertd/archive/2009/02/06/data-generator-for-sql-server-sparse-columns.aspx</link><pubDate>Fri, 06 Feb 2009 08:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9402603</guid><dc:creator>gertd</dc:creator><description>&lt;p&gt;Genevieve, tester on the “DataDude” team, has created a new Data Generator which allows you to populate a random set of sparse columns through the use of an XML column set column. She posted it on the VS Code Gallery, &lt;a title="http://code.msdn.microsoft.com/columnsetgenerator" href="http://code.msdn.microsoft.com/columnsetgenerator"&gt;http://code.msdn.microsoft.com/columnsetgenerator&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;-GertD&lt;/p&gt;  &lt;p&gt;PS: Dank je wel Genevieve!&lt;/p&gt;</description></item></channel></rss>