<?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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mario Netto's Tech blog</title>
	<atom:link href="http://marionetto.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://marionetto.wordpress.com</link>
	<description>My notes from the software world</description>
	<lastBuildDate>Wed, 20 Apr 2011 02:39:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='marionetto.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Mario Netto's Tech blog</title>
		<link>http://marionetto.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://marionetto.wordpress.com/osd.xml" title="Mario Netto&#039;s Tech blog" />
	<atom:link rel='hub' href='http://marionetto.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Visual Studio 2010 calling SQL 2005 Reporting Services</title>
		<link>http://marionetto.wordpress.com/2011/04/19/visual-studio-2010-calling-sql-2005-reporting-services/</link>
		<comments>http://marionetto.wordpress.com/2011/04/19/visual-studio-2010-calling-sql-2005-reporting-services/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 02:16:00 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://marionetto.wordpress.com/?p=90</guid>
		<description><![CDATA[I have SQL 2005 reporting services that host a couple of reports. In the past I&#8217;ve been able to access these report via a web page built in Visual Studio 2005. However, a recently created web application in Visual Studio 2010 has caused me some grief. I ran into issues with reports not being displayed, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=90&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have SQL 2005 reporting services that host a couple of reports. In the past I&#8217;ve been able to access these report via a web page built in Visual Studio 2005. However, a recently created web application in Visual Studio 2010 has caused me some grief. I ran into issues with reports not being displayed, to JavaScript errors, etc.</p>
<p>Using the ReportViewer control in VS2010 allows running of remote SQL reports from report server 2008 and above <a href="http://msdn.microsoft.com/en-us/library/bb885185.aspx">http://msdn.microsoft.com/en-us/library/bb885185.aspx</a>. This is where I ran into my first issue since my remote report was in SQL 2005 Reporting Services. Anyway, here is how I went about executing a SQL 2005 Report from a web page within Visual Studio 2010. Hope this helps.</p>
<p>1. From VS2010, create a new ASP.NET web application. By default this will target .NET Framework 4.</p>
<p>2. We will work with the &quot;Default.aspx&quot; page here. Open the page&#8217;s source code and add the following code just under the &quot;page&quot; directive.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:8ce12c67-38b8-4498-a194-c72343e97a01" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;">
<li><span style="background:#ffff00;">&lt;%</span><span style="color:#0000ff;">@</span> <span style="color:#800000;">Register</span> <span style="color:#ff0000;">Assembly</span><span style="color:#0000ff;">=&quot;Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot;</span></li>
<li style="background:#f3f3f3;">    <span style="color:#ff0000;">Namespace</span><span style="color:#0000ff;">=&quot;Microsoft.Reporting.WebForms&quot;</span> <span style="color:#ff0000;">TagPrefix</span><span style="color:#0000ff;">=&quot;rsweb&quot;</span> <span style="background:#ffff00;">%&gt;</span></li>
</ol></div>
</p></div>
</p></div>
<p>3. Add the following code where you want the report displayed. I have a report named &quot;MyReport&quot; under a folder &quot;Reports&quot;.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:3336d52c-42be-4d69-86e6-b9f16a1f415d" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;">
<li><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">rsweb</span><span style="color:#0000ff;">:</span><span style="color:#800000;">ReportViewer</span> <span style="color:#ff0000;">ID</span><span style="color:#0000ff;">=&quot;ReportViewer1&quot;</span> <span style="color:#ff0000;">runat</span><span style="color:#0000ff;">=&quot;server&quot;</span> <span style="color:#ff0000;">Font-Names</span><span style="color:#0000ff;">=&quot;Verdana&quot;</span> <span style="color:#ff0000;">Font-Size</span><span style="color:#0000ff;">=&quot;8pt&quot;</span></li>
<li style="background:#f3f3f3;">    <span style="color:#ff0000;">Height</span><span style="color:#0000ff;">=&quot;400px&quot;</span> <span style="color:#ff0000;">ProcessingMode</span><span style="color:#0000ff;">=&quot;Remote&quot;</span> <span style="color:#ff0000;">Width</span><span style="color:#0000ff;">=&quot;400px&quot;&gt;</span></li>
<li>    <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">ServerReport</span> <span style="color:#ff0000;">ReportPath</span><span style="color:#0000ff;">=&quot;/Reports/MyReport&quot;</span> <span style="color:#ff0000;">ReportServerUrl</span><span style="color:#0000ff;">=&quot;http://myserver/ReportServer$SQL2005&quot;</span> <span style="color:#0000ff;">/&gt;</span></li>
<li style="background:#f3f3f3;"><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">rsweb</span><span style="color:#0000ff;">:</span><span style="color:#800000;">ReportViewer</span><span style="color:#0000ff;">&gt;</span></li>
</ol></div>
</p></div>
</p></div>
<p>4. In the project references, add the reference to &quot;Microsoft.ReportViewer.WebForms 8.0.0.0 v2.0.5.727&quot;.</p>
<p>5. In Web.Config, add the following within the &quot;System.Web&quot; section.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bc7158e4-10f2-4a76-a077-decf0f3466c2" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet</div>
<div style="background:#ddd;max-height:300px;overflow:auto;">
<ol style="background:#ffffff;margin:0 0 0 2em;padding:0 0 0 5px;">
<li><span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">httpHandlers</span><span style="color:#0000ff;">&gt;</span></li>
<li style="background:#f3f3f3;">  <span style="color:#0000ff;">&lt;</span><span style="color:#a31515;">add</span><span style="color:#0000ff;"> </span><span style="color:#ff0000;">verb</span><span style="color:#0000ff;">=</span>&quot;<span style="color:#0000ff;">*</span>&quot;<span style="color:#0000ff;"> </span><span style="color:#ff0000;">path</span><span style="color:#0000ff;">=</span>&quot;<span style="color:#0000ff;">Reserved.ReportViewerWebControl.axd</span>&quot;<span style="color:#0000ff;"> </span><span style="color:#ff0000;">type</span><span style="color:#0000ff;"> = </span>&quot;<span style="color:#0000ff;">Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</span>&quot;<span style="color:#0000ff;"> /&gt;</span></li>
<li><span style="color:#0000ff;">&lt;/</span><span style="color:#a31515;">httpHandlers</span><span style="color:#0000ff;">&gt;</span></li>
</ol></div>
</p></div>
</p></div>
<p>6. Run your web page in the browser and hope you see the report as I do. </p>
<p>Good luck!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marionetto.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marionetto.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marionetto.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marionetto.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marionetto.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marionetto.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marionetto.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marionetto.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marionetto.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marionetto.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marionetto.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marionetto.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marionetto.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marionetto.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=90&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marionetto.wordpress.com/2011/04/19/visual-studio-2010-calling-sql-2005-reporting-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3358012ff76265cd37d45666c2a33d08?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mario</media:title>
		</media:content>
	</item>
		<item>
		<title>Copy over directory structure without files</title>
		<link>http://marionetto.wordpress.com/2009/02/19/copy-over-directory-structure-without-files/</link>
		<comments>http://marionetto.wordpress.com/2009/02/19/copy-over-directory-structure-without-files/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 15:51:43 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[DOS]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://marionetto.wordpress.com/?p=80</guid>
		<description><![CDATA[XCOPY is a powerful command with multiple options. Use XCOPY to copy over a directory and it&#8217;s sub-folders without the files. View XCOPY options XCOPY /? The following XCOPY copies over just the directory structure without the files in the folder. C:\Temp&#62;XCOPY c:\Temp\ZipTest C:\Temp\NewZipTest /T /E<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=80&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>XCOPY is a powerful command with multiple options. Use XCOPY to copy over a directory and it&#8217;s sub-folders without the files.</p>
<p>View XCOPY options</p>
<p>XCOPY /?</p>
<p>The following XCOPY copies over just the directory structure without the files in the folder.</p>
<p>C:\Temp&gt;XCOPY c:\Temp\ZipTest C:\Temp\NewZipTest /T /E</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marionetto.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marionetto.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marionetto.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marionetto.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marionetto.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marionetto.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marionetto.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marionetto.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marionetto.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marionetto.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marionetto.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marionetto.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marionetto.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marionetto.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=80&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marionetto.wordpress.com/2009/02/19/copy-over-directory-structure-without-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3358012ff76265cd37d45666c2a33d08?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mario</media:title>
		</media:content>
	</item>
		<item>
		<title>Embarcadero ER/Studio &#8211; Updating the Physical model with database changes</title>
		<link>http://marionetto.wordpress.com/2009/01/06/embarcadero-erstudio-updating-the-physical-model-with-database-changes/</link>
		<comments>http://marionetto.wordpress.com/2009/01/06/embarcadero-erstudio-updating-the-physical-model-with-database-changes/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 16:43:22 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[Embarcadero ER/Studio]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://marionetto.wordpress.com/?p=77</guid>
		<description><![CDATA[If you&#8217;ve reverse-engineered an existing database and then made updates to the physical database here is how you can refresh the model. Select the Main Model under the Physical option on the Data Model pane. Right-click on the model diagram and choose the Compare and Merge utility option. Choose the Compare against a live database [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=77&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve reverse-engineered an existing database and then made updates to the physical database here is how you can refresh the model.</p>
<ol>
<li>Select the Main Model under the Physical option on the Data Model pane.</li>
<li>Right-click on the model diagram and choose the Compare and Merge utility option.</li>
<li>Choose the Compare against a live database option.</li>
<li>Choose the following prompts according to your needs. At the end you will see the differences between the physical model and the database and have the options to import or ignore the objects.</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marionetto.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marionetto.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marionetto.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marionetto.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marionetto.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marionetto.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marionetto.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marionetto.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marionetto.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marionetto.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marionetto.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marionetto.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marionetto.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marionetto.wordpress.com/77/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=77&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marionetto.wordpress.com/2009/01/06/embarcadero-erstudio-updating-the-physical-model-with-database-changes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3358012ff76265cd37d45666c2a33d08?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mario</media:title>
		</media:content>
	</item>
		<item>
		<title>Single row, multiple columns to variables in SSIS</title>
		<link>http://marionetto.wordpress.com/2009/01/02/single-row-multiple-columns-to-variables-in-ssis/</link>
		<comments>http://marionetto.wordpress.com/2009/01/02/single-row-multiple-columns-to-variables-in-ssis/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 16:53:47 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://marionetto.wordpress.com/?p=75</guid>
		<description><![CDATA[The SQL Execute task in SSIS allows you to execute a SQL that would return a single row with multiple columns and then map these columns to variables within the package. To do this, In the General section set the Resultset property to &#8220;Single row&#8221;. Set the SQL statement. In the Result Set section, set [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=75&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The SQL Execute task in SSIS allows you to execute a SQL that would return a single row with multiple columns and then map these columns to variables within the package. To do this,</p>
<ol>
<li>In the General section set the Resultset property to &#8220;Single row&#8221;.</li>
<li>Set the SQL statement.</li>
<li>In the Result Set section, set the Result Name to 0 &#8211; n and the corresponding variables to be mapped. Ensure that the column order is right. I believe you can also use the column name but haven&#8217;t tried that.</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marionetto.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marionetto.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marionetto.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marionetto.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marionetto.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marionetto.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marionetto.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marionetto.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marionetto.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marionetto.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marionetto.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marionetto.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marionetto.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marionetto.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=75&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marionetto.wordpress.com/2009/01/02/single-row-multiple-columns-to-variables-in-ssis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3358012ff76265cd37d45666c2a33d08?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mario</media:title>
		</media:content>
	</item>
		<item>
		<title>Execute remote batch file from SQL job task</title>
		<link>http://marionetto.wordpress.com/2008/12/10/execute-remote-batch-file-from-sql-job-task/</link>
		<comments>http://marionetto.wordpress.com/2008/12/10/execute-remote-batch-file-from-sql-job-task/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 20:41:19 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[Windows Scripting]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://marionetto.wordpress.com/?p=61</guid>
		<description><![CDATA[So I was asked if I could execute a batch file after an ETL was complete. The batch file to be executed resided on a remote server. The process currently involves a scheduled SQL job that first executes a SSIS package and then a stored procedure. Here are the steps I performed to be able [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=61&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I was asked if I could execute a batch file after an ETL was complete. The batch file to be executed resided on a remote server. The process currently involves a scheduled SQL job that first executes a SSIS package and then a stored procedure. Here are the steps I performed to be able to achieve this.</p>
<ol>
<li>On the remote server perform the steps as detailed in this Microsoft article <a href="http://msdn.microsoft.com/en-us/library/h976cd1t(VS.85).aspx" target="_blank">Setting up Remote WSH</a>.</li>
<li>Create a BatToCall.bat batch file that will reside on the remote server. This is the batch file that we are going to execute remotely.</li>
<li>Create a ExecuteRemotely.wsf script file. This script file will reside locally where the task is being executed but when called will perform the stated operations remotely.</li>
<li>Create a Caller.wsf script file that will be called from the SQL job. This script file in turn will call the ExecuteRemotely.wsf script file.</li>
<li>Create a SQL job with a step of type &#8220;Operating system (CmdExec)&#8221;. In the command, type &#8220;CScript Caller.wsf&#8221;. (The CScript command can be run from the command-line as well.)</li>
<li>Execute the SQL job with appropriate permissions in place should execute the remote batch file.</li>
</ol>
<p>Here is sample code for the above mentioned files.</p>
<p><strong>BatToCall.bat</strong></p>
<p><pre class="brush: vb;">

echo | time &gt; C:\ExecutedHere.txt</pre></p>
<p><strong>Caller.wsf </strong></p>
<p><pre class="brush: vb;">
&lt;package&gt;
&lt;job&gt;
&lt;script language=&quot;VBScript&quot;&gt;
set oController = CreateObject(&quot;WSHController&quot;)
set oProcess = oController.CreateScript(&quot;C:\ExecuteRemotely.wsf&quot;, &quot;\\RemoteServerName&quot;)
WScript.ConnectObject oProcess, &quot;remote_&quot;

oProcess.Execute
While oProcess.Status &lt;&gt; 2
   WScript.Sleep 50
WEnd
WScript.Echo &quot;Done&quot;

Sub remote_Error
    Dim theError
    Set theError = oProcess.Error
    WScript.Echo &quot;Error &quot; &amp; theError.Number &amp; &quot; - Line: &quot; &amp; theError.Line &amp; &quot;, Char: &quot; &amp; theError.Character &amp; vbCrLf &amp; &quot;Description: &quot; &amp; theError.Description
    WScript.Quit -1
End Sub

&lt;/script&gt;
&lt;/job&gt;
&lt;/package&gt;
</pre></p>
<p><strong>ExecuteRemotely.wsf</strong></p>
<p><pre class="brush: vb;">
&lt;package&gt;
&lt;job&gt;
&lt;script language=&quot;VBScript&quot;&gt;
Dim WShell
set WShell = CreateObject(&quot;WScript.Shell&quot;)
WShell.Run &quot;C:\BatToCall.bat&quot;
Set WShell = nothing
&lt;/script&gt;
&lt;/job&gt;
&lt;/package&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marionetto.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marionetto.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marionetto.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marionetto.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marionetto.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marionetto.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marionetto.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marionetto.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marionetto.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marionetto.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marionetto.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marionetto.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marionetto.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marionetto.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=61&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marionetto.wordpress.com/2008/12/10/execute-remote-batch-file-from-sql-job-task/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3358012ff76265cd37d45666c2a33d08?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mario</media:title>
		</media:content>
	</item>
		<item>
		<title>Inserting space between OneNote notes</title>
		<link>http://marionetto.wordpress.com/2008/12/05/inserting-space-between-onenote-notes/</link>
		<comments>http://marionetto.wordpress.com/2008/12/05/inserting-space-between-onenote-notes/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 20:56:15 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[OneNote 2007]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://marionetto.wordpress.com/?p=30</guid>
		<description><![CDATA[When I needed space at the top of a OneNote page that already had a bunch of notes I used to go through the pain of moving each note around to create more space. However, today I found this cool menu option under the &#8220;Insert&#8221; menu option called &#8220;Extra Writing space&#8221;. Use that to insert [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=30&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When I needed space at the top of a OneNote page that already had a bunch of notes I used to go through the pain of moving each note around to create more space. However, today I found this cool menu option under the &#8220;Insert&#8221; menu option called &#8220;Extra Writing space&#8221;. Use that to insert or reduce space between your notes.</p>
<p>Choose the menu option and move your mouse over your page. You will see either a horizontal or a vertical line appear depending on the location of the mouse cursor over the page. Left-click the mouse button, hold and drag appropriately to add or reduce space on the page. If you perform this operation in the middle of a note I noticed it splits the note into two.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marionetto.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marionetto.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marionetto.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marionetto.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marionetto.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marionetto.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marionetto.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marionetto.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marionetto.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marionetto.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marionetto.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marionetto.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marionetto.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marionetto.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=30&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marionetto.wordpress.com/2008/12/05/inserting-space-between-onenote-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3358012ff76265cd37d45666c2a33d08?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mario</media:title>
		</media:content>
	</item>
		<item>
		<title>Unable to execute SSIS packages containing script tasks developed in 32 bit and deployed in 64 bit environments</title>
		<link>http://marionetto.wordpress.com/2008/12/04/unable-to-execute-ssis-packages-containing-script-tasks-developed-in-32-bit-and-deployed-in-64-bit-environments/</link>
		<comments>http://marionetto.wordpress.com/2008/12/04/unable-to-execute-ssis-packages-containing-script-tasks-developed-in-32-bit-and-deployed-in-64-bit-environments/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 21:05:48 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://marionetto.wordpress.com/?p=27</guid>
		<description><![CDATA[I started to run into this error in the last month or so. I&#8217;ve been developing SSIS 2005 packages on my desktop which is an XP Professional and deploying them to Windows Server 2003 R2 Enterprise x64 edition. All was well until recently, according to Microsoft one of the updates broke compatibility on a dll [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=27&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I started to run into this error in the last month or so. I&#8217;ve been developing SSIS 2005 packages on my desktop which is an XP Professional and deploying them to Windows Server 2003 R2 Enterprise x64 edition. All was well until recently, according to Microsoft one of the updates broke compatibility on a dll and caused this issue (More details here in the <a title="KB 931846" href="http://support.microsoft.com/kb/931846">Microsoft KB 931846</a>). There were a few suggestions such as open the packages on the target server and make an update and save them to force recompile. This is not fun when you have multiple packages and in some instances did not do the trick.</p>
<p>My solution which has worked consistently so far is to restart the Integration Services after you deploy the  updated packages on the target server.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marionetto.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marionetto.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marionetto.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marionetto.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marionetto.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marionetto.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marionetto.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marionetto.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marionetto.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marionetto.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marionetto.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marionetto.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marionetto.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marionetto.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=27&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marionetto.wordpress.com/2008/12/04/unable-to-execute-ssis-packages-containing-script-tasks-developed-in-32-bit-and-deployed-in-64-bit-environments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3358012ff76265cd37d45666c2a33d08?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mario</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamic SQL in SSIS Data Flow task</title>
		<link>http://marionetto.wordpress.com/2008/11/20/dynamic-sql-in-ssis-data-flow-task/</link>
		<comments>http://marionetto.wordpress.com/2008/11/20/dynamic-sql-in-ssis-data-flow-task/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 15:56:32 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://marionetto.wordpress.com/?p=18</guid>
		<description><![CDATA[The Data Flow Source in the Data Flow tab extracts the metadata from the source to populate the column information. In the case of a stored procedure that uses dynamic SQL within, this can pose a problem in getting the metadata. Depending on the situation here is one way to get around the issue. Below [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=18&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The Data Flow Source in the Data Flow tab extracts the metadata from the source to populate the column information. In the case of a stored procedure that uses dynamic SQL within, this can pose a problem in getting the metadata. Depending on the situation here is one way to get around the issue. Below is sample stored procedure that works with the pubs database. Comment the mentioned block in the stored procedure to see the difference in the SSIS package.</p>
<p>With the block commented, the Data Flow Source does not have any columns to extract and map. With the dummy block in place the Data Flow Source extract the required metadata to display columns. Note that the code block will not execute at runtime but it allows you to call a stored procedure with dynamic SQL in it from the Data Flow source in a SSIS package.</p>
<p><pre class="brush: sql;">

    CREATE PROCEDURE [dbo].[GetAuthorsByState]
        -- Add the parameters for the stored procedure here
        @States varchar(10)
    AS
    BEGIN
        -- SET NOCOUNT ON added to prevent extra result sets from
        -- interfering with SELECT statements.
        SET NOCOUNT ON;

        DECLARE @strSQL nvarchar(1000)

        -- Start of the block to enable the Data Flow source to work
        -- Comment this block to see the effect on the Data Flow source in the SSIS package
        IF 1 =2
        BEGIN
            SELECT [au_id]
                ,[au_lname]
                ,[au_fname]
                ,[phone]
                ,[address]
                ,[city]
                ,[state]
                ,[zip]
                ,[contract]
                ,[DateAdded]
            FROM [dbo].[tblAuthors]
        END
        -- End of the block to enable the Data Flow source to work

        SET @strSQL = '
            SELECT [au_id]
                  ,[au_lname]
                  ,[au_fname]
                  ,[phone]
                  ,[address]
                  ,[city]
                  ,[state]
                  ,[zip]
                  ,[contract]
                  ,[DateAdded]
              FROM [dbo].[tblAuthors]
            where state = ''' + @States + ''''

        EXEC dbo.sp_executesql @strSQL

    END

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marionetto.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marionetto.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marionetto.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marionetto.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marionetto.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marionetto.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marionetto.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marionetto.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marionetto.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marionetto.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marionetto.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marionetto.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marionetto.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marionetto.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=18&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marionetto.wordpress.com/2008/11/20/dynamic-sql-in-ssis-data-flow-task/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3358012ff76265cd37d45666c2a33d08?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mario</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL CONVERT function and SQL dates</title>
		<link>http://marionetto.wordpress.com/2008/11/12/sql-convert-function-and-sql-dates/</link>
		<comments>http://marionetto.wordpress.com/2008/11/12/sql-convert-function-and-sql-dates/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 15:32:29 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[SQL Dates]]></category>
		<category><![CDATA[SQL Functions]]></category>

		<guid isPermaLink="false">http://marionetto.wordpress.com/?p=13</guid>
		<description><![CDATA[I recently had a colleague stop by asking how he could eliminate the time portion of a date when he extracted the data from a SQL table to MS-Excel. He was having trouble grouping dates in Excel because the data contained the time part as well. My first thought was using DATEPART but my wonderful [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=13&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently had a colleague stop by asking how he could eliminate the time portion of a date when he extracted the data from a SQL table to MS-Excel. He was having trouble grouping dates in Excel because the data contained the time part as well. My first thought was using <em>DATEPART</em> but my wonderful DBA team member Mary T. suggested using the <em>CONVERT</em> function with the style 101. Worked out perfectly. Here is a sample code displaying the results. There are other styles as well with the <em>CONVERT</em> function.</p>
<p><pre class="brush: sql;">SELECT 
	[OrderDate], 
	CONVERT(varchar(10), [OrderDate], 101) AS JustOrderDate 
FROM [Northwind].[dbo].[Orders]</pre></p>
<p><span style="text-decoration:underline;">Results:</span></p>
<p>OrderDate                                  JustOrderDate<br />
1996-07-04 00:00:00.000        07/04/1996<br />
1996-07-05 00:00:00.000        07/05/1996</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marionetto.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marionetto.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marionetto.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marionetto.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marionetto.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marionetto.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marionetto.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marionetto.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marionetto.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marionetto.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marionetto.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marionetto.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marionetto.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marionetto.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=13&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marionetto.wordpress.com/2008/11/12/sql-convert-function-and-sql-dates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3358012ff76265cd37d45666c2a33d08?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mario</media:title>
		</media:content>
	</item>
		<item>
		<title>SSIS packages, configuration settings and multiple servers</title>
		<link>http://marionetto.wordpress.com/2008/11/04/ssis-packages-configuration-settings-and-multiple-servers/</link>
		<comments>http://marionetto.wordpress.com/2008/11/04/ssis-packages-configuration-settings-and-multiple-servers/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 19:36:52 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://marionetto.wordpress.com/?p=5</guid>
		<description><![CDATA[When I started building SSIS packages I frequently ran into the issue of having to maintain configuration files across different environments. The way I handled it was to use SQL server as the storage place for my package configuration. With that comes the need to be able to point to the appropriate SQL server and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=5&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When I started building SSIS packages I frequently ran into the issue of having to maintain configuration files across different environments. The way I handled it was to use SQL server as the storage place for my package configuration. With that comes the need to be able to point to the appropriate SQL server and database depending on the environment or server. This is where the environment variable comes in handy. With that being said here are the steps to create a package and associated elements to accomplish a flexible configuration setup across servers.</p>
<ol style="margin-top:0;font-size:11pt;margin-bottom:0;margin-left:.375in;direction:ltr;font-family:Calibri;unicode-bidi:embed;" type="1">
<li><span style="font-size:11pt;font-family:Calibri;">Setup the configuration database. The configuration table can reside in an existing database or in a new one. For this exercise let&#8217;s create a new database called &#8220;ConfigDB&#8221;.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Create an environment variable &#8220;SSIS_CONFIG_DB&#8221; and set the value to the ConfigDB database. For example, Data Source=MySQLServer;Initial Catalog=ConfigDB;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False; </span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Set the connection string to the ConfigDB from the environment variable.</span>
<ol style="margin-top:0;font-size:11pt;margin-bottom:0;margin-left:.375in;direction:ltr;font-family:Calibri;unicode-bidi:embed;" type="a">
<li><span style="font-size:11pt;font-family:Calibri;">Create a new package.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Create a new variable called &#8220;EnvName&#8221; as a string. You can set the value to &#8220;Development&#8221;.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Create a new OLE DB connection and set the connection to the ConfigDB database.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Open the Package Configurations window.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Check the Enable package configurations. </span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Click the &#8220;Add…&#8221; button to start the Package Configuration Wizard.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Choose &#8220;Environment variable&#8221; and then select the &#8220;SSIS_CONFIG_DB&#8221; variable from the dropdown.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">For the target property, select the ConnectionString for the above created connection manager and then click Next.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Assign a name for the configuration and finish.</span></li>
</ol>
</li>
</ol>
<ol style="margin-top:0;font-size:11pt;margin-bottom:0;margin-left:.375in;direction:ltr;font-family:Calibri;unicode-bidi:embed;" type="1">
<li><span style="font-size:11pt;font-family:Calibri;">Generate and save configuration settings.</span>
<ol style="margin-top:0;font-size:11pt;margin-bottom:0;margin-left:.375in;direction:ltr;font-family:Calibri;unicode-bidi:embed;" type="a">
<li><span style="font-size:11pt;font-family:Calibri;">Open the Package Configurations window.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Click the &#8220;Add…&#8221; button to start the Package Configuration Wizard.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Choose &#8220;SQL Server&#8221; in the Configuration Type.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Select the database connection to the ConfigDB and choose the default configuration table name &#8220;SSIS Configurations&#8221;.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Enter &#8220;MySQLConfig&#8221; in the Configuration Filter. This could be any meaningful name.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Click the Next button.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">In the objects locate the variable &#8220;EnvName&#8221; and check the Value option.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Click Next, and then give a name to the configuration. For example, &#8220;Init_Settings&#8221;.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Click Finish to generate the configuration settings and then close.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">To verify that the settings have been created, look at the table rows for &#8220;SSIS Configurations&#8221; in the ConfigDB database. There should be a row with the ConfigurationFilter &#8220;MySQLConfig&#8221;.</span></li>
</ol>
</li>
</ol>
<ol style="margin-top:0;font-size:11pt;margin-bottom:0;margin-left:.375in;direction:ltr;font-family:Calibri;unicode-bidi:embed;" type="1">
<li><span style="font-size:11pt;font-family:Calibri;">To verify the working of this setup create a Script task to display the value of the variable EnvName. Make changes to the variable in the ConfigDB database and will see it reflected in the package execution.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Moving to another server. To have this package run in another server with different EnvName values follows the steps below.</span>
<ol style="margin-top:0;font-size:11pt;margin-bottom:0;margin-left:.375in;direction:ltr;font-family:Calibri;unicode-bidi:embed;" type="a">
<li><span style="font-size:11pt;font-family:Calibri;">Generate the SQL script for database and table from the original ConfigDB and recreate it on the new server.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Copy<span>  </span>the row from the original configuration table &#8220;SSIS Configurations&#8221; and paste it in the new table and modify the ConfiguredValue for the variable EnvName.</span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Setup the environment variable &#8220;SSIS_CONFIG_DB&#8221; with the value set to the connection string to the new configuration database. For example,<span>  </span>Data Source=MyNewSQLServer;Initial Catalog=ConfigDB;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False; </span></li>
<li><span style="font-size:11pt;font-family:Calibri;">Copy the SSIS package to the new server and run it. You should see the value from the new server displayed.</span></li>
</ol>
</li>
</ol>
<p style="font-size:11pt;font-family:Calibri;margin:0 0 0 .75in;"> </p>
<p style="font-size:11pt;font-family:Calibri;margin:0 0 0 .75in;"> </p>
<p style="font-size:11pt;font-family:Calibri;margin:0 0 0 .375in;">I&#8217;ve used this method to move my packages from development to QA to production with minimum to no changes to configuration settings. I also use this to turn on and off logging modes in the different environment to debug packages.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marionetto.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marionetto.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marionetto.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marionetto.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marionetto.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marionetto.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marionetto.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marionetto.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marionetto.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marionetto.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marionetto.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marionetto.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marionetto.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marionetto.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marionetto.wordpress.com&amp;blog=4557669&amp;post=5&amp;subd=marionetto&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marionetto.wordpress.com/2008/11/04/ssis-packages-configuration-settings-and-multiple-servers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3358012ff76265cd37d45666c2a33d08?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mario</media:title>
		</media:content>
	</item>
	</channel>
</rss>
