<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>artifactual</title>
	<atom:link href="http://blackmarketkidneys.com/artifactual/feed/" rel="self" type="application/rss+xml" />
	<link>http://blackmarketkidneys.com/artifactual</link>
	<description>another software developer blog</description>
	<pubDate>Fri, 01 May 2009 16:13:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SQL 2005 Try/Catch</title>
		<link>http://blackmarketkidneys.com/artifactual/2009/05/01/sql-2005-trycatch/</link>
		<comments>http://blackmarketkidneys.com/artifactual/2009/05/01/sql-2005-trycatch/#comments</comments>
		<pubDate>Fri, 01 May 2009 16:13:33 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
		
		<category><![CDATA[SQL Server]]></category>

		<category><![CDATA[T-SQL]]></category>

		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://blackmarketkidneys.com/artifactual/?p=36</guid>
		<description><![CDATA[How stupid do I feel for just now finding that T-SQL 2005 has try/catch?
http://www.sqlservercentral.com/articles/Testing/66553/
]]></description>
			<content:encoded><![CDATA[<p>How stupid do I feel for just now finding that T-SQL 2005 has try/catch?</p>
<p><a href="http://www.sqlservercentral.com/articles/Testing/66553/">http://www.sqlservercentral.com/articles/Testing/66553/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blackmarketkidneys.com/artifactual/2009/05/01/sql-2005-trycatch/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OneNote Test</title>
		<link>http://blackmarketkidneys.com/artifactual/2008/07/02/onenote-test/</link>
		<comments>http://blackmarketkidneys.com/artifactual/2008/07/02/onenote-test/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 23:14:00 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blackmarketkidneys.com/artifactual/2008/07/02/onenote-test/</guid>
		<description><![CDATA[Playing around with OneNote… can I blog this page?

 
 

	
Look! An image….
]]></description>
			<content:encoded><![CDATA[<p>Playing around with OneNote… can I blog this page?
</p>
<p> <br />
 </p>
<p><img src="http://blackmarketkidneys.com/artifactual/wp-content/uploads/2008/07/070208-2314-onenotetest11.png" alt=""/>
	</p>
<p>Look! An image….</p>
]]></content:encoded>
			<wfw:commentRss>http://blackmarketkidneys.com/artifactual/2008/07/02/onenote-test/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SSIS property: ProtectionLevel</title>
		<link>http://blackmarketkidneys.com/artifactual/2007/10/05/ssis-property-protectionlevel/</link>
		<comments>http://blackmarketkidneys.com/artifactual/2007/10/05/ssis-property-protectionlevel/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 16:00:53 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
		
		<category><![CDATA[How To]]></category>

		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://blackmarketkidneys.com/artifactual/2007/10/05/ssis-property-protectionlevel/</guid>
		<description><![CDATA[The values for ProtectionLevel:
0: Strip sensitive information.
1: Sensitive information is encrypted by using local user credentials.
2: Sensitive information is encrypted by using the required password.
3: The package is encrypted by using the required password.
4: The package is encrypted by using local user credentials.
5: The package uses SQL Server storage encryption.
SQL Server Books On Line: Creating [...]]]></description>
			<content:encoded><![CDATA[<p>The values for ProtectionLevel:</p>
<blockquote><p>0: Strip sensitive information.<br />
1: Sensitive information is encrypted by using local user credentials.<br />
2: Sensitive information is encrypted by using the required password.<br />
3: The package is encrypted by using the required password.<br />
4: The package is encrypted by using local user credentials.<br />
5: The package uses SQL Server storage encryption.</p></blockquote>
<p>SQL Server Books On Line: <a href="http://msdn2.microsoft.com/en-us/library/ms137952.aspx">Creating a Deployment Utility</a></p>
<p>Technet: <a href="http://technet.microsoft.com/en-us/library/ms141747.aspx">Setting the Protection Level of Packages</a></p>
<p><a href="http://support.microsoft.com/kb/906562">KB906562</a>: How to use the dtutil utility (Dtutil.exe) to set the protection level of a batch of SQL Server Integration Services (SSIS) packages in SQL Server 2005</p>
]]></content:encoded>
			<wfw:commentRss>http://blackmarketkidneys.com/artifactual/2007/10/05/ssis-property-protectionlevel/feed/</wfw:commentRss>
		</item>
		<item>
		<title>.dtsConfig Searching</title>
		<link>http://blackmarketkidneys.com/artifactual/2007/08/20/dtsconfig-searching/</link>
		<comments>http://blackmarketkidneys.com/artifactual/2007/08/20/dtsconfig-searching/#comments</comments>
		<pubDate>Tue, 21 Aug 2007 00:29:06 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
		
		<category><![CDATA[How To]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[SQL Server]]></category>

		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://blackmarketkidneys.com/artifactual/2007/08/20/dtsconfig-searching/</guid>
		<description><![CDATA[For whatever reason, the windows explorer &#8220;Search&#8230;&#8221; does not work when I&#8217;m searching the .dtsConfig files on my development laptop. It will routinely return &#8220;no results&#8221; found when I KNOW there are files containing the text I am searching for. Since I use the .dtsConfig files to contain connection strings, I typically am searching to [...]]]></description>
			<content:encoded><![CDATA[<p>For whatever reason, the windows explorer &#8220;Search&#8230;&#8221; does not work when I&#8217;m searching the .dtsConfig files on my development laptop. It will routinely return &#8220;no results&#8221; found when I KNOW there are files containing the text I am searching for. Since I use the .dtsConfig files to contain connection strings, I typically am searching to make sure I am not connecting to the test server I think I am.</p>
<p>Luckily, this led me to discover a new favorite utility in Visual Studio the rest of the world already knew about - Find and Replace. From the VS.NET menu: <strong>Edit &gt;&gt; Find and Replace &gt;&gt; Find in Files</strong> (or [Ctrl]+[Shift]+F for keyboard jockeys)</p>
<p><a href="http://blackmarketkidneys.com/artifactual/wp-content/uploads/2007/08/findmenu.PNG" title="Find and Replace from the VS.NET menu"><img src="http://blackmarketkidneys.com/artifactual/wp-content/uploads/2007/08/findmenu.PNG" alt="Find and Replace from the VS.NET menu" /></a></p>
<p>you can launch &#8220;Find and Replace&#8221;</p>
<p><a href="http://blackmarketkidneys.com/artifactual/wp-content/uploads/2007/08/findandreplace1.PNG" title="Find and Replace"><img src="http://blackmarketkidneys.com/artifactual/wp-content/uploads/2007/08/findandreplace1.PNG" alt="Find and Replace" /></a></p>
<p>which made me happy enough for accurately searching the .dtsConfig files (as opposed to Windows Explorer&#8217;s Search&#8230;) But what my new favorite VS.NET feature, <strong>Folder Sets</strong>. By clicking the browse ellipses next to the &#8220;Look in&#8221;drop down, I can set the search folders with the &#8220;Choose Search Folders&#8221; dialog:</p>
<p><a href="http://blackmarketkidneys.com/artifactual/wp-content/uploads/2007/08/folderset.PNG" title="Folder Sets Dialog"><img src="http://blackmarketkidneys.com/artifactual/wp-content/uploads/2007/08/folderset.PNG" alt="Folder Sets Dialog" /></a></p>
<p>where I can set (and save) a batch of folders I want the Find and Replace utility to search. So simple, I see myself using this a lot in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://blackmarketkidneys.com/artifactual/2007/08/20/dtsconfig-searching/feed/</wfw:commentRss>
		</item>
		<item>
		<title>IT vs. Green?</title>
		<link>http://blackmarketkidneys.com/artifactual/2007/08/20/it-vs-green/</link>
		<comments>http://blackmarketkidneys.com/artifactual/2007/08/20/it-vs-green/#comments</comments>
		<pubDate>Mon, 20 Aug 2007 20:02:27 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
		
		<category><![CDATA[Green]]></category>

		<category><![CDATA[Statistics]]></category>

		<guid isPermaLink="false">http://blackmarketkidneys.com/artifactual/2007/08/20/it-vs-green/</guid>
		<description><![CDATA[From eweek:
&#8220;The IT industry currently consumes 1.5 percent of the energy in the United States, and that is expected to grow to 3 percent by 2010, making the industry the second largest industrial consumer of power, behind heavy manufacturing.&#8221;
]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://www.eweek.com/article2/0,1895,2170891,00.asp">eweek</a>:</p>
<p>&#8220;The IT industry currently consumes 1.5 percent of the energy in the United States, and that is expected to grow to 3 percent by 2010, making the industry the second largest industrial consumer of power, behind heavy manufacturing.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://blackmarketkidneys.com/artifactual/2007/08/20/it-vs-green/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SSIS:Logging Dynamic SQL Statements</title>
		<link>http://blackmarketkidneys.com/artifactual/2007/07/30/ssislogging-dynamic-sql-statements/</link>
		<comments>http://blackmarketkidneys.com/artifactual/2007/07/30/ssislogging-dynamic-sql-statements/#comments</comments>
		<pubDate>Mon, 30 Jul 2007 22:26:26 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
		
		<category><![CDATA[How To]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[SQL Server]]></category>

		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://blackmarketkidneys.com/artifactual/2007/07/30/ssislogging-dynamic-sql-statements/</guid>
		<description><![CDATA[In this post at SSIS Junkie, I saw one complaint regarding how to evaluate dynamically generated SQL statements. There, Jamie suggests using the watch windows in the debugger. This is a great tip for development, but I also like to track SQL in the proverbial &#8220;wild&#8221;.
Here is how I log dynamically generated SQL statements, built [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://blogs.conchango.com/jamiethomson/archive/2007/07/27/SSIS_3A00_-The-backlash-continues.aspx">this post at SSIS Junkie</a>, I saw one complaint regarding how to evaluate dynamically generated SQL statements. There, Jamie suggests using the watch windows in the debugger. This is a great tip for development, but I also like to track SQL in the proverbial &#8220;wild&#8221;.</p>
<p>Here is how I log dynamically generated SQL statements, built using the Script component within SSIS. <em>This is based on an example I saw online somewhere - but I can no longer remember where to give proper credit.</em></p>
<p>Write a Script component that contains code similar to this:<br />
<code><br />
Public Sub Main()<br />
Dim DynamicSQLStatement As String<br />
Dim emptyBytes(0) As Byte<br />
Try<br />
' Build Dynamic SQL Statement<br />
DynamicSQLStatement = "SELECT MyColumn FROM MyTable"<br />
' Generate Log Statement<br />
Dts.Log("Dynamic SQL Generated: " &amp; DynamicSQLStatement, 0, emptyBytes)<br />
' Return the dyanmic SQL for user in OLE Source component<br />
Dts.Variables("DynamicSQLStatement").Value = DynamicSQLStatement<br />
Dts.TaskResult = Dts.Results.Success<br />
Catch ex As Exception<br />
Dts.TaskResult = Dts.Results.Failure<br />
End Try<br />
End Sub<br />
</code><br />
Enable the &#8220;ScriptTaskLogEntry&#8221; for this component. Note: I already have logging enable at the package level, but I override it for the script component to gain access to the &#8220;Script Task Log Entry&#8221;. <em>(click image to enlarge)</em></p>
<p><a href="http://blackmarketkidneys.com/artifactual/wp-content/uploads/2007/07/ssis-log-script-component.PNG" title="SSIS Log Script Component"><img src="http://blackmarketkidneys.com/artifactual/wp-content/uploads/2007/07/ssis-log-script-component.PNG" alt="SSIS Log Script Component" /></a></p>
<p>In this case, I have SQL Server logging configured, so the log entry appears in the table dbo.sysdtslog90.</p>
<p>This is incorporated into a larger logging &amp; auditing system (largely based on the Kimball method presented by Joy Mundy <a href="http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?culture=en-US&amp;EventID=1032297073&amp;CountryCode=US">here</a>), so that I can trace what SQL was used by a particular ETL batch.</p>
]]></content:encoded>
			<wfw:commentRss>http://blackmarketkidneys.com/artifactual/2007/07/30/ssislogging-dynamic-sql-statements/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Data Dude - Project Variables not set in SQL scripts</title>
		<link>http://blackmarketkidneys.com/artifactual/2007/07/25/data-dude-project-variables-not-set-in-sql-scripts/</link>
		<comments>http://blackmarketkidneys.com/artifactual/2007/07/25/data-dude-project-variables-not-set-in-sql-scripts/#comments</comments>
		<pubDate>Wed, 25 Jul 2007 17:19:33 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
		
		<category><![CDATA[Database]]></category>

		<category><![CDATA[Looking For Help]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[VS Team System]]></category>

		<guid isPermaLink="false">http://blackmarketkidneys.com/artifactual/2007/07/25/data-dude-project-variables-not-set-in-sql-scripts/</guid>
		<description><![CDATA[[Ed. - Question resolved. See Update at the end of the post] 
I am using Visual Studio Team Suite with the Database Professionals add on (&#8221;Data Dude&#8221;) - with SR1 installed. However, when I build the database project, I am not getting the expected results in the resulting omnibus .SQL script. As a result, I have [...]]]></description>
			<content:encoded><![CDATA[<p><em>[Ed. - Question resolved. See Update at the end of the post] </em></p>
<p>I am using Visual Studio Team Suite with the Database Professionals add on (&#8221;Data Dude&#8221;) - with SR1 installed. However, when I build the database project, I am not getting the expected results in the resulting omnibus .SQL script. As a result, I have to build the project, then manually edit the .SQL file, and deploy the script from the command line using SQLCMD.EXE &#8212; all of which is preventing me from automatically building &amp; deploying with a single-click from the VS IDE (which I want to do).</p>
<p>Here are how I&#8217;ve set up the variables in my database project (<em>click the image to enlarge</em>):</p>
<p><a href="http://blackmarketkidneys.com/artifactual/wp-content/uploads/2007/07/datadudecap01.PNG" title="Data Dude Project variables"><img src="http://blackmarketkidneys.com/artifactual/wp-content/uploads/2007/07/datadudecap01.PNG" alt="Data Dude Project variables" /></a></p>
<p>Building the project creates a script with no &#8220;setvar: &#8221; statements for the variables I&#8217;ve added to the project:</p>
<blockquote><p><code> SET  ARITHABORT, CONCAT_NULL_YIELDS_NULL, ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, QUOTED_IDENTIFIER ON</code><br />
<code> SET  NUMERIC_ROUNDABORT OFF</code><br />
<code> GO</code><br />
<code> :setvar DatabaseName "SIDW_LOCALDEV"</code><br />
<code> :setvar PrimaryFilePhysicalName "F:\SQL2005 DATA\SIDW_LOCALDEV.mdf"</code><br />
<code> :setvar PrimaryLogFilePhysicalName "F:\SQL2005 DATA\SIDW_LOCALDEV_log.ldf"</code></p></blockquote>
<p>I expected (but did not see) the following lines as well:</p>
<blockquote><p><code>:setvar SQLUserDWETL "DevDWETL"<br />
:setvar SQLUserDWAudit "DevDWAudit"<br />
:setvar SQLUserDWReader "DevDWReader"<br />
</code></p></blockquote>
<p>These values are used in other scripts, such as this line in the &#8220;Post-Deployment&#8221; script &#8220;Permissions.sql&#8221;</p>
<blockquote><p><code>GRANT SELECT ON OBJECT::[DW].[vDailyCalendar_dim] TO [$(SQLUserDWReader)]</code><br />
<code> GO</code></p></blockquote>
<p>Are my expectations out of line, or should the &#8220;Build&#8221; command for the database project output a SQL file that contains the setvar statements?</p>
<p>Note - I&#8217;ve created <a href="http://forums.microsoft.com/msdn/showpost.aspx?postid=1912756&amp;siteid=1#1912756&amp;SiteID=1">a thread</a> on microsoft&#8217;s forums to help track down a resolution. If one surfaces, I&#8217;ll be sure to note it here.</p>
<p><strong>UPDATED</strong> - Turns out my expectations were incorrect. See the <a href="http://forums.microsoft.com/msdn/showpost.aspx?postid=1912756&amp;siteid=1#1912756&amp;SiteID=1">thread</a> for the details. Basically if you deploy from the IDE, DataDude will pass the variable values to the deployment and you&#8217;re good to go. If you want to use the SQL script generated by a build, you&#8217;ll have to provide them there (basically doing what Data Dude does within the IDE). Many thanks to <a href="http://blogs.msdn.com/gertd/">Gert Drapes</a> for the prompt response.</p>
]]></content:encoded>
			<wfw:commentRss>http://blackmarketkidneys.com/artifactual/2007/07/25/data-dude-project-variables-not-set-in-sql-scripts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>DataDude SR1</title>
		<link>http://blackmarketkidneys.com/artifactual/2007/07/25/datadude-sr1/</link>
		<comments>http://blackmarketkidneys.com/artifactual/2007/07/25/datadude-sr1/#comments</comments>
		<pubDate>Wed, 25 Jul 2007 16:09:12 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
		
		<category><![CDATA[Database]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[VS Team System]]></category>

		<guid isPermaLink="false">http://blackmarketkidneys.com/artifactual/2007/07/25/datadude-sr1/</guid>
		<description><![CDATA[Data Dude SR1(EN) - (KB936612)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9810808c-9248-41a5-bdc1-d8210a06ed87&amp;displaylang=en">Data Dude SR1</a>(EN) - (<a href="http://support.microsoft.com/kb/936612/">KB936612</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://blackmarketkidneys.com/artifactual/2007/07/25/datadude-sr1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TFS - Event Subscription Tool</title>
		<link>http://blackmarketkidneys.com/artifactual/2007/07/24/tfs-event-subscription-tool/</link>
		<comments>http://blackmarketkidneys.com/artifactual/2007/07/24/tfs-event-subscription-tool/#comments</comments>
		<pubDate>Tue, 24 Jul 2007 22:25:56 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
		
		<category><![CDATA[Tools]]></category>

		<category><![CDATA[VS Team System]]></category>

		<guid isPermaLink="false">http://blackmarketkidneys.com/artifactual/2007/07/24/tfs-event-subscription-tool/</guid>
		<description><![CDATA[http://blogs.vertigosoftware.com/teamsystem/archive/2007/02/08/Team_Foundation_Server_Event_Subscription_Tool.aspx
]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.vertigosoftware.com/teamsystem/archive/2007/02/08/Team_Foundation_Server_Event_Subscription_Tool.aspx">http://blogs.vertigosoftware.com/teamsystem/archive/2007/02/08/Team_Foundation_Server_Event_Subscription_Tool.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blackmarketkidneys.com/artifactual/2007/07/24/tfs-event-subscription-tool/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Format .dtsConfig files</title>
		<link>http://blackmarketkidneys.com/artifactual/2007/07/06/format-dtsconfig-files/</link>
		<comments>http://blackmarketkidneys.com/artifactual/2007/07/06/format-dtsconfig-files/#comments</comments>
		<pubDate>Fri, 06 Jul 2007 19:05:53 +0000</pubDate>
		<dc:creator>Tito</dc:creator>
		
		<category><![CDATA[How To]]></category>

		<category><![CDATA[SSIS]]></category>

		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blackmarketkidneys.com/artifactual/2007/07/06/format-dtsconfig-files/</guid>
		<description><![CDATA[In BIDS: Ctrl-K, Ktrl-D
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=263780&#38;SiteID=1 
]]></description>
			<content:encoded><![CDATA[<p>In BIDS: Ctrl-K, Ktrl-D</p>
<p><a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=263780&amp;SiteID=1 " title="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=263780&amp;SiteID=1 " target="_blank">http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=263780&amp;SiteID=1 </a></p>
]]></content:encoded>
			<wfw:commentRss>http://blackmarketkidneys.com/artifactual/2007/07/06/format-dtsconfig-files/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

