<?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>Reed Me : DBPro</title><link>http://blogs.msdn.com/reedme/archive/tags/DBPro/default.aspx</link><description>Tags: DBPro</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Degenerate dimensions in VSTS DB edition GDR R2 (a.k.a. TSD03136)</title><link>http://blogs.msdn.com/reedme/archive/2009/08/07/degenerate-dimensions-in-vsts-db-edition-gdr-r2-a-k-a-tsd03136.aspx</link><pubDate>Fri, 07 Aug 2009 19:54:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9860390</guid><dc:creator>reedme</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/reedme/comments/9860390.aspx</comments><wfw:commentRss>http://blogs.msdn.com/reedme/commentrss.aspx?PostID=9860390</wfw:commentRss><wfw:comment>http://blogs.msdn.com/reedme/rsscomments.aspx?PostID=9860390</wfw:comment><description>&lt;p&gt;This is a common pattern in many BI projects that I’ve been involved with in the past four or five years for deriving degenerate dimensions without expending the effort to build and maintain star schema or snowflake tables in a data mart or data warehouse. (I’m not passing judgment, just making an observation. I’m ambivalent about them.)&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;CREATE VIEW &lt;/font&gt;[dbo].[SomeNewDegenerateDimension]          &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;AS           &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SELECT DISTINCT&lt;/font&gt;([OneColumnOrAnother])          &lt;br /&gt;&lt;font color="#0000ff"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; FROM &lt;/font&gt;[dbo].[SomeFactTableOrViewOrAnother]&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;GO&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I know that they didn’t work in Data Dude before, but I had hopes that GDR R2 would’ve fixed it. GDR R2 is still fun to say. Yeah, it’s been that kind of week. In the immortal words of the Dread Pirate Wesley, “Get used to disappointment.”&lt;/p&gt;  &lt;p&gt;Fortunately, it’s an easy fix. Unless you’ve got ~750 of them to fix in a large project that you’re trying to import into source control for change management and team development purposes... Just copy-n-paste the column name after an AS at the end of the SELECT clause.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;CREATE VIEW &lt;/font&gt;[dbo].[SomeNewDegenerateDimension]          &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;AS           &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SELECT DISTINCT&lt;/font&gt;([OneColumnOrAnother])&lt;font color="#0000ff"&gt; AS&lt;/font&gt; [OneColumnOrAnother]          &lt;br /&gt;&lt;font color="#0000ff"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; FROM &lt;/font&gt;[dbo].[SomeFactTableOrViewOrAnother]&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;GO&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In other news, I forgot today was the department summer party. Everybody else is @ the beach. I’m jousting with Visual Studio. In the immortal words of Dilbert, &lt;a href="http://unitedmedia.a.mms.mavenapps.net/mms/rt/1/site/unitedmedia-dilbert-pub01-live/current/launch.html?maven_playerId=dilbertanimationplayer&amp;amp;maven_referralPlaylistId=8410622f0921e1b7d612ed1c32062d7488716c2d&amp;amp;maven_referralObject=3648738" target="_blank"&gt;“Yay, life!”&lt;/a&gt;&lt;/p&gt;  &lt;p&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/reedme/WindowsLiveWriter/DegeneratedimensionsinVSTSDBeditionGDRR2_8685/image_3.png" width="244" height="184" /&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9860390" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/reedme/archive/tags/Data+Dude/default.aspx">Data Dude</category><category domain="http://blogs.msdn.com/reedme/archive/tags/Visual+Studio+Team+Edition+for+Database+Professionals/default.aspx">Visual Studio Team Edition for Database Professionals</category><category domain="http://blogs.msdn.com/reedme/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/reedme/archive/tags/DBPro/default.aspx">DBPro</category><category domain="http://blogs.msdn.com/reedme/archive/tags/annoyances/default.aspx">annoyances</category><category domain="http://blogs.msdn.com/reedme/archive/tags/bleep/default.aspx">bleep</category><category domain="http://blogs.msdn.com/reedme/archive/tags/Note2Self/default.aspx">Note2Self</category><category domain="http://blogs.msdn.com/reedme/archive/tags/party/default.aspx">party</category></item><item><title>erR? TSD03006. Doh!</title><link>http://blogs.msdn.com/reedme/archive/2009/08/06/err-tsd03006-doh.aspx</link><pubDate>Fri, 07 Aug 2009 02:17:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9859672</guid><dc:creator>reedme</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/reedme/comments/9859672.aspx</comments><wfw:commentRss>http://blogs.msdn.com/reedme/commentrss.aspx?PostID=9859672</wfw:commentRss><wfw:comment>http://blogs.msdn.com/reedme/rsscomments.aspx?PostID=9859672</wfw:comment><description>&lt;p&gt;I’m often skeptical when I read things like this that make absolute statements:&lt;/p&gt;  &lt;blockquote&gt;&lt;em&gt;To resolve this problem, upgrade to Microsoft Visual Studio Team System 2008 Database Edition GDR R2.&lt;/em&gt;&lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://support.microsoft.com/kb/970567/" target="_blank"&gt;FIX: When you access a table source in a referenced project by using an alias in VSTS 2008 Database Edition GDR, if you refer to the table source by using a three-part or four-part name, you receive TSD03006 errors or TSD04151 warnings&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In my particular case for a new project where I have imported schemas created by Someone Else™ who overzealously fully qualified all the object names in every view definition and stored procedure in eight out of 12 databases in the solution (even when the views reference objects in the same database)... it’s NOT true.&lt;/p&gt;  &lt;p&gt;Grrr.&lt;/p&gt;  &lt;p&gt;Visual Studio beats me because she loves me. &lt;strong&gt;*pout*&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Not sure how I missed GDR R2. That’s fun to say. GDR R2. Like magma. &lt;a href="http://www.lfgcomic.com/page/274" target="_blank"&gt;Magma is a funny word.&lt;/a&gt; GDR R2. Or maybe I left a note2self somewhere that I forgot to read. Huh.&lt;/p&gt;  &lt;p&gt;Anyway, I got around to downloading it:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&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&amp;amp;displaylang=en" target="_blank"&gt;Download Details: Microsoft® Visual Studio Team System 2008 Database Edition GDR R2&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;But it didn’t magically fix all the errors that GDR reported for tri-part names for me. The following valid object definitions are reported as build errors:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;View definitions that contain a three part name that includes the database containing the object. &lt;em&gt;The &lt;strong&gt;Add Database Reference&lt;/strong&gt; interface will not allow me to add a self-reference, so the fix seems to be to remove the database name. Editing ~300 object script files.&lt;/em&gt; &lt;/li&gt;    &lt;li&gt;View definitions that contain a three part name in which the referenced database (which has a valid database reference in the project) name is “quoted” in square brackets. &lt;em&gt;Removing the brackets allows Data Dude to resolve the reference correctly. Yay! Only ~200 object script files to edit (which incidentally were EXPORTED BY DATA DUDE in the first place).&lt;/em&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;[Edit]&lt;/strong&gt; Database reference names are case-sensitive and must match the referenced database project name exactly, even in case-insensitive database projects. &lt;em&gt;Yeah, yeah. Make them match in case and everything’s fine.&lt;/em&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;It’s apparently too much to expect full parity with the database engine parser or that there’s a way to flag specific errors generated from otherwise valid T-SQL to be ignored without a blanket ignore for an entire error code @ the project level... because some day somebody else might actually produce a bug in that class that I want the build to catch. (Nah, I’d never do that myself. &lt;strong&gt;*wink*&lt;/strong&gt;)&lt;/p&gt;  &lt;p&gt;The oversight of quoted identifiers for the database reference name is [censored], but, yes, I agree that self-references are silly in views for the database name (I can imagine several scenarios about how they happened, though), but I’ve 774 more errors in this solution to clean up before I can check in all the schemas that I just imported into Data Dude.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;#@%&amp;amp;!!!&lt;/strong&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9859672" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/reedme/archive/tags/Data+Dude/default.aspx">Data Dude</category><category domain="http://blogs.msdn.com/reedme/archive/tags/Visual+Studio+Team+Edition+for+Database+Professionals/default.aspx">Visual Studio Team Edition for Database Professionals</category><category domain="http://blogs.msdn.com/reedme/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/reedme/archive/tags/DBPro/default.aspx">DBPro</category><category domain="http://blogs.msdn.com/reedme/archive/tags/annoyances/default.aspx">annoyances</category><category domain="http://blogs.msdn.com/reedme/archive/tags/bleep/default.aspx">bleep</category><category domain="http://blogs.msdn.com/reedme/archive/tags/Note2Self/default.aspx">Note2Self</category></item><item><title>Developers MERGE thyselves?</title><link>http://blogs.msdn.com/reedme/archive/2008/10/31/developers-merge-thyselves.aspx</link><pubDate>Sat, 01 Nov 2008 02:05:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9027449</guid><dc:creator>reedme</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/reedme/comments/9027449.aspx</comments><wfw:commentRss>http://blogs.msdn.com/reedme/commentrss.aspx?PostID=9027449</wfw:commentRss><wfw:comment>http://blogs.msdn.com/reedme/rsscomments.aspx?PostID=9027449</wfw:comment><description>&lt;p&gt;I was reading this CIO.com article a while back and wondering if “database developers” and “regular developers” agree.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;As Microsoft sees it, the roles of the database-centric developer and &amp;quot;regular&amp;quot; developer are less distinct than they once were, so the company is merging its VSTS database and development products. As of October 1, those who belong to the Microsoft Developer Network (MSDN) and currently own Visual Studio Team System 2008 Development Edition or Visual Studio Team System 2008 Database Edition will receive for free the Visual Studio Team System 2008 Development Edition, Visual Studio Team System 2008 Database Edition, Visual Studio 2005 Team System for Software Developers and Visual Studio 2005 Team System for Database Professionals. &lt;/em&gt;&lt;a href="http://www.cio.com/article/print/451622" target="_blank"&gt;(CIO.com)&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Is it really that simple? Or will it be in the future? Are all (or most) “regular” developers also database developers? And vice versa? Hmmm.&lt;/p&gt;  &lt;p&gt;The whole imaginary syntax probably looks something like this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;MERGE &lt;/font&gt;Developers.All_Developers &lt;font color="#0000ff"&gt;AS&lt;/font&gt; target         &lt;br /&gt;&lt;font color="#0000ff"&gt;USING          &lt;br /&gt;&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160; (         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;SELECT&lt;/font&gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; COALESCE(dbds.DeveloperId, rds.DeveloperId) &lt;font color="#0000ff"&gt;AS&lt;/font&gt; DeveloperId         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ,COALESCE(dbds.FullName, rds.FullName) &lt;font color="#0000ff"&gt;AS&lt;/font&gt; FullName         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ,COALESCE(dbds.IsActive, rds.IsActive) &lt;font color="#0000ff"&gt;AS&lt;/font&gt; IsActive         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;FROM&lt;/font&gt; Developers.Database_Developers &lt;font color="#0000ff"&gt;AS&lt;/font&gt; dbds         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;FULL OUTER JOIN&lt;/font&gt; Developers.Regular_Developers &lt;font color="#0000ff"&gt;AS&lt;/font&gt; rds         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#0000ff"&gt;ON&lt;/font&gt; dbds.DeveloperID = rds.DeveloperID         &lt;br /&gt;&lt;font color="#0000ff"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; GROUP BY COALESCE&lt;/font&gt;(dbds.DeveloperId, rds.DeveloperId)         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ) &lt;font color="#0000ff"&gt;AS&lt;/font&gt; source (DeveloperId, FullName, IsActive)         &lt;br /&gt;&lt;font color="#0000ff"&gt;ON&lt;/font&gt; (target.DeveloperId = source.DeveloperId)         &lt;br /&gt;&lt;font color="#0000ff"&gt;WHEN MATCHED          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; THEN UPDATE SET           &lt;br /&gt;&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; target.IsActive = source.IsActive         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ,target.FullName = target.FullName         &lt;br /&gt;&lt;font color="#0000ff"&gt;WHEN NOT MATCHED          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; THEN INSERT &lt;/font&gt;(DeveloperId,FullName,IsActive) &lt;font color="#0000ff"&gt;VALUES          &lt;br /&gt;&lt;/font&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font face="Courier New"&gt;(source.DeveloperId,source.FullName,source.IsActive)        &lt;br /&gt;;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Seems complicated to me… for imaginary syntax of imaginary data constructs. Feel free to nitpick imaginary flaws in it.&lt;/p&gt;  &lt;p&gt;Of course, YMMV.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9027449" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/reedme/archive/tags/Data+Dude/default.aspx">Data Dude</category><category domain="http://blogs.msdn.com/reedme/archive/tags/Visual+Studio+Team+Edition+for+Database+Professionals/default.aspx">Visual Studio Team Edition for Database Professionals</category><category domain="http://blogs.msdn.com/reedme/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/reedme/archive/tags/DBPro/default.aspx">DBPro</category><category domain="http://blogs.msdn.com/reedme/archive/tags/development/default.aspx">development</category><category domain="http://blogs.msdn.com/reedme/archive/tags/developers/default.aspx">developers</category></item><item><title>Testing the SQL Database</title><link>http://blogs.msdn.com/reedme/archive/2008/08/25/testing-the-sql-database.aspx</link><pubDate>Tue, 26 Aug 2008 02:25:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8895464</guid><dc:creator>reedme</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/reedme/comments/8895464.aspx</comments><wfw:commentRss>http://blogs.msdn.com/reedme/commentrss.aspx?PostID=8895464</wfw:commentRss><wfw:comment>http://blogs.msdn.com/reedme/rsscomments.aspx?PostID=8895464</wfw:comment><description>&lt;p&gt;Being a big fan of test-driven development of any kind, database or otherwise, I was honored to sit on a panel with some other much smarter people than I at TechEd*2008 entitled "Testing the SQL Database." Not only did I get to opine a bit, but I also got to learn some, too, which happens whenever you get to sit and listen to smart people like Gert, John, Adam and Jamie.
&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;a href="http://mfile.akamai.com/14853/wmv/microsofttec.download.akamai.com/14853/TechEdOnline/Videos/08_NA_Dev_TEOPanel_25_low.asx"&gt;Stream for Low Bandwidth Users&lt;/a&gt; | &lt;a href="http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_Dev_TEOPanel_25_low.wmv"&gt;Small WMV&lt;/a&gt; | &lt;a href="http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_Dev_TEOPanel_25_high.wmv"&gt;High Quality WMV&lt;/a&gt; | &lt;a href="http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_Dev_TEOPanel_25_high.mp4"&gt;High Quality MP4&lt;/a&gt; | &lt;a href="http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_Dev_TEOPanel_25_audio.MP3"&gt;MP3 Audio&lt;/a&gt;
	&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;I do have one observation: I'm not really that fat in person… It's the camera! Heh.
&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;See the &lt;a href="http://msdn.microsoft.com/en-us/events/teched/cc676818.aspx"&gt;TechEd 2008 Video Library&lt;/a&gt; for more cool stuff.
&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8895464" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/reedme/archive/tags/Visual+Studio+Team+Edition+for+Database+Professionals/default.aspx">Visual Studio Team Edition for Database Professionals</category><category domain="http://blogs.msdn.com/reedme/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.msdn.com/reedme/archive/tags/DBPro/default.aspx">DBPro</category><category domain="http://blogs.msdn.com/reedme/archive/tags/webcast/default.aspx">webcast</category><category domain="http://blogs.msdn.com/reedme/archive/tags/development/default.aspx">development</category><category domain="http://blogs.msdn.com/reedme/archive/tags/agile/default.aspx">agile</category></item><item><title>DataDude Annoyance #13: Project variables omitted from output script.</title><link>http://blogs.msdn.com/reedme/archive/2007/12/06/datadude-annoyance-13-project-variables-omitted-from-output-script.aspx</link><pubDate>Fri, 07 Dec 2007 05:26:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6687799</guid><dc:creator>reedme</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/reedme/comments/6687799.aspx</comments><wfw:commentRss>http://blogs.msdn.com/reedme/commentrss.aspx?PostID=6687799</wfw:commentRss><wfw:comment>http://blogs.msdn.com/reedme/rsscomments.aspx?PostID=6687799</wfw:comment><description>&lt;p&gt;If you're using any software product for a non-trivial purpose, you'll find that it has flaws that will (upon occasion) drive you up a wall. It doesn't make any difference what it is or who produced it. I've even heard Mac users, upon occasion, complain about bugs in their toys.&lt;/p&gt;  &lt;p&gt;But sometimes these little annoyances make you ask questions like, &amp;quot;Who the &amp;amp;@#$ tested this thing?!&amp;quot; I've had more than my share of those this week. Don't get me started about WiX and the Windows Installer. Grrr.&lt;/p&gt;  &lt;p&gt;Fortunately, I can do something relatively simple about this one with Visual Studio for Database Professionals SR1 (a.k.a. DataDude or DBPro).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&amp;quot;Feature&amp;quot;:&lt;/strong&gt; DataDude projects allow you to specify project-level variables in the project properties on the Variables &amp;quot;tab&amp;quot; (or &amp;quot;sheet&amp;quot; depending on who you ask what it's called) BUT those variables are not written into the project build output (a T-SQL script) as :setvar statements.&lt;/p&gt;  &lt;p&gt;In case you wonder why this matters, it really sucks when you're including DDL produced by a DBPro project into an MSI to be deployed as part of a deployed &amp;quot;product&amp;quot; (like an ETL Framework, for example). If those variables are omitted, the DDL script bombs. Not good.&lt;/p&gt;  &lt;p&gt;In this case (unlike my WiX blues), I'm not the only one who has &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2302658&amp;amp;SiteID=1"&gt;complained&lt;/a&gt;. It's already logged as &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=306660"&gt;feedback&lt;/a&gt; @ connect.microsoft.com. If you think that it should be addressed, give it some love. Heh. Yes, people @ Microsoft actually look at stuff like that once in a while.&lt;/p&gt;  &lt;p&gt;In the meantime... Enjoy my fix.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&amp;quot;Fix&amp;quot;:&lt;/strong&gt; Use the post-build event to write your own defined variables into the output script. Add a Post-Build.vbs script to your DataDude project that defines the additional variables and writes them into the output script.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/reedme/WindowsLiveWriter/DataDudeAnnoyanceProjectvariablesomitte_1177A/image_4.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="197" alt="image" src="http://blogs.msdn.com/blogfiles/reedme/WindowsLiveWriter/DataDudeAnnoyanceProjectvariablesomitte_1177A/image_thumb_1.png" width="345" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Here's some VBScript to do it. (If I were really motivated, I'd read those variables from the project properties through VSTS automation or cheat and read the XML... but my wife is pestering me to go pack up the office to get ready for the move to Redmond.)&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;Dim&lt;/span&gt; fso, ts, line, x, y, script, variables, filepath&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="kwrd"&gt;Const&lt;/span&gt; ForReading = 1, ForWriting = 2, ForAppending = 8&lt;/pre&gt;

  &lt;pre class="alt"&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="rem"&gt;' NOTE: This name must match the DataDude &amp;quot;Build Output File Name&amp;quot; &lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="rem"&gt;' in project properties.&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;filepath = &lt;span class="str"&gt;&amp;quot;ETL Repository.sql&amp;quot;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="rem"&gt;' Append your additional variables here, one per line. &lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="rem"&gt;' Include blank lines as desired for spacing.&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;variables = Array( _&lt;/pre&gt;

  &lt;pre class="alt"&gt;     &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt; _&lt;/pre&gt;

  &lt;pre&gt;    ,&lt;span class="str"&gt;&amp;quot;-- Additional variables added by Post-Build.vbs&amp;quot;&lt;/span&gt; _&lt;/pre&gt;

  &lt;pre class="alt"&gt;    ,&lt;span class="str"&gt;&amp;quot;:setvar DatabaseMasterKeyPassword &amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot;Change this password, please.&amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt; _&lt;/pre&gt;

  &lt;pre&gt;    ,&lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt; _&lt;/pre&gt;

  &lt;pre class="alt"&gt;    ,&lt;span class="str"&gt;&amp;quot;--&amp;gt;&amp;gt; Backup your Service Master Key!!!&amp;quot;&lt;/span&gt; _&lt;/pre&gt;

  &lt;pre&gt;    ,&lt;span class="str"&gt;&amp;quot;--&amp;gt;&amp;gt; Backup your Database Master Key!!!&amp;quot;&lt;/span&gt; _&lt;/pre&gt;

  &lt;pre class="alt"&gt;    ,&lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt; _&lt;/pre&gt;

  &lt;pre&gt;    ,&lt;span class="str"&gt;&amp;quot;--&amp;gt;&amp;gt; Be sure to test carefully!&amp;quot;&lt;/span&gt; _&lt;/pre&gt;

  &lt;pre class="alt"&gt;    ,&lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt; _&lt;/pre&gt;

  &lt;pre&gt;    )&lt;/pre&gt;

  &lt;pre class="alt"&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="kwrd"&gt;Set&lt;/span&gt; fso = CreateObject(&lt;span class="str"&gt;&amp;quot;Scripting.FileSystemObject&amp;quot;&lt;/span&gt;)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;Set&lt;/span&gt; ts = fso.OpenTextFile(filepath, ForReading)&lt;/pre&gt;

  &lt;pre&gt;x = 0&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;Do&lt;/span&gt; &lt;span class="kwrd"&gt;Until&lt;/span&gt; ts.AtEndOfStream&lt;/pre&gt;

  &lt;pre&gt;    line = ts.ReadLine&lt;/pre&gt;

  &lt;pre class="alt"&gt;    x = x + 1&lt;/pre&gt;

  &lt;pre&gt;    &lt;span class="kwrd"&gt;If&lt;/span&gt; x = 7 &lt;span class="kwrd"&gt;Then&lt;/span&gt; &lt;span class="rem"&gt;' Right after the last existing :setvar.&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;        &lt;span class="rem"&gt;' Append variable definitions.&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;        &lt;span class="kwrd"&gt;For&lt;/span&gt; &lt;span class="kwrd"&gt;Each&lt;/span&gt; line &lt;span class="kwrd"&gt;In&lt;/span&gt; variables&lt;/pre&gt;

  &lt;pre class="alt"&gt;            script = script &amp;amp; line &amp;amp; vbCrLf&lt;/pre&gt;

  &lt;pre&gt;        &lt;span class="kwrd"&gt;Next&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;If&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;    script = script &amp;amp; line &amp;amp; vbCrLf&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;Loop&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;ts.Close&lt;/pre&gt;

  &lt;pre class="alt"&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="kwrd"&gt;Set&lt;/span&gt; ts = fso.OpenTextFile(filepath, ForWriting)&lt;/pre&gt;

  &lt;pre class="alt"&gt;ts.Write(script)&lt;/pre&gt;

  &lt;pre&gt;ts.Close&lt;/pre&gt;

  &lt;pre class="alt"&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="kwrd"&gt;Set&lt;/span&gt; ts = &lt;span class="kwrd"&gt;Nothing&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;Set&lt;/span&gt; fso = &lt;span class="kwrd"&gt;Nothing&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;For the record, I &lt;strong&gt;*hate*&lt;/strong&gt; VBScript, but sometimes it's the duct tape that binds the solution together... since my JScript syntax wasn't working (and it wasn't worth 5 minutes to figure it out, so I gave up and rolled back to VBScript)... and I was entirely too lazy to figure out how to make a PowerShell script work as a post-build event. Heh.&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;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6687799" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/reedme/archive/tags/database/default.aspx">database</category><category domain="http://blogs.msdn.com/reedme/archive/tags/Data+Dude/default.aspx">Data Dude</category><category domain="http://blogs.msdn.com/reedme/archive/tags/Visual+Studio+Team+Edition+for+Database+Professionals/default.aspx">Visual Studio Team Edition for Database Professionals</category><category domain="http://blogs.msdn.com/reedme/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/reedme/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.msdn.com/reedme/archive/tags/samples/default.aspx">samples</category><category domain="http://blogs.msdn.com/reedme/archive/tags/DBPro/default.aspx">DBPro</category></item></channel></rss>