<?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/"
	>

<channel>
	<title>David Zhang&#039;s BI Blog</title>
	<atom:link href="http://www.sagebasis.com/BIBlog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.sagebasis.com/BIBlog</link>
	<description>Problems and solutions identified in my BI practise</description>
	<lastBuildDate>Wed, 07 Jul 2010 03:43:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to calculate time difference between two dates</title>
		<link>http://www.sagebasis.com/BIBlog/?p=76</link>
		<comments>http://www.sagebasis.com/BIBlog/?p=76#comments</comments>
		<pubDate>Tue, 29 Jun 2010 21:31:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Qlikview]]></category>

		<guid isPermaLink="false">http://www.sagebasis.com/BIBlog/?p=76</guid>
		<description><![CDATA[That is what i find out ,
if you extract time  ( say, start, end)  stored as float from sql server 2000  database ,
date(end)-date(start)   returns  the time difference measured by number of days in float format   (say.  0.0625  = 90m)
(date(end)-date(start)) * 24  returns the hour difference in float format
(date(end)-date(start))*24*60 returns the minute difference in float format
]]></description>
			<content:encoded><![CDATA[<p>That is what i find out ,</p>
<p>if you extract time  ( say, start, end)  stored as float from sql server 2000  database ,</p>
<p>date(end)-date(start)   returns  the time difference measured by number of days in float format   (say.  0.0625  = 90m)</p>
<p>(date(end)-date(start)) * 24  returns the hour difference in float format</p>
<p>(date(end)-date(start))*24*60 returns the minute difference in float format</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sagebasis.com/BIBlog/?feed=rss2&amp;p=76</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Qlikvew and SQl Server use different float  for time (or datetime)</title>
		<link>http://www.sagebasis.com/BIBlog/?p=23</link>
		<comments>http://www.sagebasis.com/BIBlog/?p=23#comments</comments>
		<pubDate>Tue, 29 Jun 2010 19:26:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sagebasis.com/BIBlog/?p=23</guid>
		<description><![CDATA[Both Qlikvew and SQl Server can store datetime ( datetime of sql server queals to timestamp of Qlikview) in float format. when change the datatype from float to datetime , there will be 2 days&#8217; difference .
for example , in sql server , select CAST ( 40358 as datetime)   returns 2010-07-01 00:00:000,
but in Qlikvew,   expression [...]]]></description>
			<content:encoded><![CDATA[<p>Both Qlikvew and SQl Server can store datetime ( datetime of sql server queals to timestamp of Qlikview) in float format. when change the datatype from float to datetime , there will be 2 days&#8217; difference .</p>
<p>for example , in sql server , select CAST ( 40358 as datetime)   returns 2010-07-01 00:00:000,</p>
<p>but in Qlikvew,   expression timestamp( 40358)  = 2010-06-29 12:00:000 am.</p>
<p>Qlikview  gets he same result as what Excel gets</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sagebasis.com/BIBlog/?feed=rss2&amp;p=23</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to access .mdb file of Microsoft Access database from Qlikview</title>
		<link>http://www.sagebasis.com/BIBlog/?p=57</link>
		<comments>http://www.sagebasis.com/BIBlog/?p=57#comments</comments>
		<pubDate>Mon, 21 Jun 2010 18:10:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Qlikview]]></category>

		<guid isPermaLink="false">http://www.sagebasis.com/BIBlog/?p=57</guid>
		<description><![CDATA[Scenario:   we are using Qlikview version 9 and we need to extract data from a .mdb file of MS 2003 database which is protected by a database level password. 
 
Problem:  if we are using 64bit Qlikview, you may not be able to  find any   64-bit compatible ODBC driver for Microsoft Access  in Qlikeview&#8217;s &#8216;Data Link [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Scenario:   </strong>we are using Qlikview version 9 and we need to extract data from a .mdb file of MS 2003 database which is protected by a database level password.<strong> </strong></p>
<p><strong> </strong></p>
<p><strong>Problem:  </strong>if we are using 64bit Qlikview<strong>, you may not be able to  find any  </strong> 64-bit compatible ODBC driver for Microsoft Access  in Qlikeview&#8217;s &#8216;Data Link Properties&#8217; window. There is  a <a href="http://www.microsoft.com/downloads/details.aspx?familyid=C06B8369-60DD-4B64-A44B-84B371EDE16D&amp;displaylang=en">Microsoft Access Database Engine 2010 Redistributable</a>, but it is for  reading  data from and writing  data to Office 2010 system files such as Microsoft Access 2010 (mdb and accdb) files and Microsoft Excel 2010 (xls, xlsx, and xlsb) files. Further more,.Alought QlikView works with both 32-bit and 64-bit ODBC drivers. the 32-bit version of QlikView will only work with the 32-bit ODBC</p>
<p>drivers and 64-bit QlikView will only work with the 64-bit ODBC drivers. Therefore we have to use the 32-bit version of QlikView now.</p>
<p><strong> </strong></p>
<p><strong>Solution: </strong></p>
<p> </p>
<p> To check what 32-bit ODBC drivers you have installed, Run C:\Windows\SysWOW64\odbcad32.exe</p>
<p> </p>
<p>If you don&#8217;t have Microsoft SQL ODBC Driver  and Microsoft Jet ODBC Driver,</p>
<p>download it from <a href="http://www.microsoft.com/downloads/details.aspx?familyid=6ccd8427-1017-4f33-a062-d165078e32b1&amp;displaylang=en">here</a>.</p>
<p><strong> </strong></p>
<p><strong> If the  .mdb file has a database level password , then you have to use </strong>Microsoft Jet ODBC Driver. Following the following steps</p>
<p> </p>
<ol>
<li><strong>Start  </strong>32 bit Qlikview,  and go to  Edit Script, on the <em>data </em>tap of  <em>Edit Script</em> Window, make sure  OLDB in the database section is checked , then Click Connect, The &#8216;Data Link Properties&#8217; window will open.</li>
<li>On the provider tap, choose Microsoft Jet ODBC Driver.</li>
<li>On the Connection tap, select or enter a database name and path</li>
<li>On the All tap,  input the database password</li>
<li>Click button to till Create Select Statement windows open.</li>
</ol>
<p> <a rel="attachment wp-att-59" href="http://www.sagebasis.com/BIBlog/?attachment_id=59"><img class="alignnone size-full wp-image-59" title="Qlik1" src="http://www.sagebasis.com/BIBlog/wp-content/uploads/2010/06/Qlik11.PNG" alt="Qlik1" width="367" height="463" /></a></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong><strong>reference links</strong></p>
<ol>
<li><strong><a href="http://social.msdn.microsoft.com/forums/en-US/netfx64bit/thread/dfbd0406-bc69-436e-998b-7fc454012f91/">http://social.msdn.microsoft.com/forums/en-US/netfx64bit/thread/dfbd0406-bc69-436e-998b-7fc454012f91/</a></strong></li>
</ol>
<p><strong><a href="http://msdn.microsoft.com/en-us/library/cc280478.aspx">http://msdn.microsoft.com/en-us/library/cc280478.aspx</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sagebasis.com/BIBlog/?feed=rss2&amp;p=57</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using excel connection manager in 64bit SSIS</title>
		<link>http://www.sagebasis.com/BIBlog/?p=55</link>
		<comments>http://www.sagebasis.com/BIBlog/?p=55#comments</comments>
		<pubDate>Sat, 23 Jan 2010 23:40:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://www.sagebasis.com/BIBlog/?p=55</guid>
		<description><![CDATA[You can use an Excel connection in 64bit environment. Go to the package configuration properties.
Debugging -&#62; Debugging Options -&#62; Run64BtRuntime -&#62; change to False In addition if you use SQL Agent go to the job step properties and then check the 32 bit runtime.
]]></description>
			<content:encoded><![CDATA[<p>You can use an Excel connection in 64bit environment. Go to the package configuration properties.</p>
<p>Debugging -&gt; Debugging Options -&gt; Run64BtRuntime -&gt; change to False In addition if you use SQL Agent go to the job step properties and then check the 32 bit runtime.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sagebasis.com/BIBlog/?feed=rss2&amp;p=55</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cannot Preview Data when using Excel source adapter in SSIS 2008</title>
		<link>http://www.sagebasis.com/BIBlog/?p=49</link>
		<comments>http://www.sagebasis.com/BIBlog/?p=49#comments</comments>
		<pubDate>Sat, 23 Jan 2010 22:59:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://www.sagebasis.com/BIBlog/?p=49</guid>
		<description><![CDATA[Problem:
I created a package that extract data from an Excel file into table in a database with BIDS 2008. When I am trying to preview the the data from Excel Source in Data Flow Task, I get the following error:
===================================
There was an error displaying the preview. (Microsoft Visual Studio)
===================================
Index and length must refer to a [...]]]></description>
			<content:encoded><![CDATA[<p>Problem:</p>
<p>I created a package that extract data from an Excel file into table in a database with BIDS 2008. When I am trying to preview the the data from Excel Source in Data Flow Task, I get the following error:</p>
<p><strong><span style="font-size: xx-small;">===================================</span></strong></p>
<p>There was an error displaying the preview. (Microsoft Visual Studio)</p>
<p>===================================</p>
<p>Index and length must refer to a location within the string.<br />
Parameter name: length (mscorlib)</p>
<p>Why:</p>
<p>Space in Excel worksheet name</p>
<p>Solution: </p>
<p>deleting Spaces in Excel worksheet name</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sagebasis.com/BIBlog/?feed=rss2&amp;p=49</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Microsoft-Press-Inside-Microsoft-Sql-Server-2005-T-Sql-Querying</title>
		<link>http://www.sagebasis.com/BIBlog/?p=46</link>
		<comments>http://www.sagebasis.com/BIBlog/?p=46#comments</comments>
		<pubDate>Tue, 12 Jan 2010 18:17:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sagebasis.com/BIBlog/?p=46</guid>
		<description><![CDATA[http://www.esnips.com/doc/3bb26a48-0608-4ae9-ac85-efe1d8d545cf/Microsoft-Press-Inside-Microsoft-Sql-Server-2005-T-Sql-Querying-Apr-2006
]]></description>
			<content:encoded><![CDATA[<p>http://www.esnips.com/doc/3bb26a48-0608-4ae9-ac85-efe1d8d545cf/Microsoft-Press-Inside-Microsoft-Sql-Server-2005-T-Sql-Querying-Apr-2006</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sagebasis.com/BIBlog/?feed=rss2&amp;p=46</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>using variables as xml file path and xml schema path in XML Source Adapter</title>
		<link>http://www.sagebasis.com/BIBlog/?p=43</link>
		<comments>http://www.sagebasis.com/BIBlog/?p=43#comments</comments>
		<pubDate>Tue, 12 Jan 2010 16:54:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SSIS]]></category>
		<category><![CDATA[varible]]></category>
		<category><![CDATA[xml schema]]></category>
		<category><![CDATA[xml task]]></category>

		<guid isPermaLink="false">http://www.sagebasis.com/BIBlog/?p=43</guid>
		<description><![CDATA[
Creat two variables with string data type  in the package,set the default values as xml file path and xml schema path
In  CONTROL FLOW tab, select the data flow step that contains the XML Source step (Do not go into the dataflow, it must be done in control flow).
Bring up its properties (right-click &#62; Properties)
Click the [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Creat two variables with string data type  in the package,set the default values as xml file path and xml schema path</li>
<li>In  CONTROL FLOW tab, select the data flow step that contains the XML Source step (Do not go into the dataflow, it must be done in control flow).</li>
<li>Bring up its properties (right-click &gt; Properties)</li>
<li>Click the elipsis button next to EXPRESSIONS</li>
<li>Select the [XML Source].[XMLSchemaDefinition] property then hit the elipsis button to the right of the Expression textbox.</li>
<li>Drag and Drop your variable that holds your XSD path into the expression box, you should be able to evaluate expression here.</li>
<li>Do similar to XML source file</li>
<li>Click OK</li>
<li>Click OK again</li>
<li>Done</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.sagebasis.com/BIBlog/?feed=rss2&amp;p=43</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add surrogate keys to dimension table</title>
		<link>http://www.sagebasis.com/BIBlog/?p=32</link>
		<comments>http://www.sagebasis.com/BIBlog/?p=32#comments</comments>
		<pubDate>Wed, 25 Nov 2009 15:16:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://www.sagebasis.com/BIBlog/?p=32</guid>
		<description><![CDATA[Surrogate Int keys   are used as identifiers for dimensional members and enable us to manage slowly changing dimensions.
SSIS does not contain a built in component for generating surrogate keys but there is still a mechanism for doing it – the Script Component. The Script Component allows us to modify the data in a data flow [...]]]></description>
			<content:encoded><![CDATA[<p>Surrogate Int keys   are used as identifiers for dimensional members and enable us to manage slowly changing dimensions.</p>
<p>SSIS does not contain a built in component for generating surrogate keys but there is still a mechanism for doing it – the<strong> Script Component.</strong> The Script Component allows us to modify the data in a data flow path using managed code and we can use it to generate surrogate keys.</p>
<h3>1. Creating the transformation</h3>
<p>When you drag a script component from the toolbox to the design surface you will be prompted as to whether the component is to be a source adapter, a destination adapter or a transformation. Select Transformation.</p>
<p><img src="http://www.sqlis.com/images/37/image001.jpg" alt="Select Script Component Type" width="524" height="380" /></p>
<h3>2. Configuring the transformation metadata</h3>
<p>Your script component should contain 1 input and 1 output. This is to be a synchronous transformation so the <strong>SynchronousInputID</strong> property of the output must be the same as the <strong>ID</strong> property of the input. The output should have 1 column which in this instance I have called <strong>SK</strong>.</p>
<p>In the case of a synchronous transformation no output buffer is required; the input buffer is used by the output. Therefore, any columns that we create on our output actually appear as if they are part of the input buffer as we will see later in the script</p>
<p>A good rule of thumb for synchronous script transformations is that you should only add columns to the output which do not already exist in your input because the input columns will flow through the script transformation in any event</p>
<p><img src="http://www.sqlis.com/images/37/image002.jpg" alt="Inputs and Outputs" width="576" height="566" /></p>
<p>Note in the screenshot above the <strong>SynchronousInputID</strong> property of the output is set to the ID of the Input thus indicating that this is a synchronous transformation.</p>
<h3>3. Building the script</h3>
<p>We are going to use managed code to populate <strong>SK</strong> with an integer that acts as a surrogate key.</p>
<p>The code looks like this:</p>
<p>mports System<br />
Imports System.Data<br />
Imports System.Math<br />
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper<br />
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper</p>
<p>&lt;Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute&gt; _<br />
&lt;CLSCompliant(False)&gt; _<br />
Public Class ScriptMain<br />
Inherits UserComponent<br />
Dim counter As Integer</p>
<p>Public Sub New()<br />
counter = 0<br />
End Sub<br />
Public Overrides Sub PreExecute()<br />
MyBase.PreExecute()<br />
End Sub</p>
<p>Public Overrides Sub PostExecute()<br />
MyBase.PostExecute()<br />
End Sub</p>
<p>Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)<br />
&#8216;<br />
&#8216; Add your code here<br />
&#8216;<br />
counter += 1<br />
Row.SK = counter</p>
<p>End Sub</p>
<p>End Class</p>
<p><img src="file:///C:/DOCUME%7E1/rowpet02/LOCALS%7E1/Temp/moz-screenshot.jpg" alt="" /></p>
<p>There are four things to note about what is going on here:</p>
<ul>
<li>We have declared a variable called <em>counter</em> that will contain a value to be outputted as the surrogate key.</li>
<li>We have initialized <em>counter</em> within the <em>New()</em> method which gets called just once on each execution</li>
<li>We increment <em>counter</em> within the <em>Input_ProcessInputRow()</em> method which gets called for each row in the input buffer</li>
<li>We are outputting the contents of the input buffer to the component output along with our surrogate key value from <em>counter</em></li>
</ul>
<p><img src="file:///C:/DOCUME%7E1/rowpet02/LOCALS%7E1/Temp/moz-screenshot-1.jpg" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sagebasis.com/BIBlog/?feed=rss2&amp;p=32</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to migrate sharepoint site collections</title>
		<link>http://www.sagebasis.com/BIBlog/?p=28</link>
		<comments>http://www.sagebasis.com/BIBlog/?p=28#comments</comments>
		<pubDate>Sun, 22 Nov 2009 04:48:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://www.sagebasis.com/BIBlog/?p=28</guid>
		<description><![CDATA[When use sharepoint desinger to  back up , restore  or migrate sharepoint site collections,  contents may be lost . The following is a good solution.
 &#8221;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe&#8221; -o export -url http://mydomain1/sites/mysite1  -filename C:\mypath\all.dat -overwrite -includeusersecurity -versions 4
 &#8221;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe&#8221;  -o deletesite -url http://mydomain2/sites/mysite2
&#8220;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe&#8221; -o createsite [...]]]></description>
			<content:encoded><![CDATA[<p>When use sharepoint desinger to  back up , restore  or migrate sharepoint site collections,  contents may be lost . The following is a good solution.</p>
<p> &#8221;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe&#8221; -o export -url <a href="http://mydomain1/sites/mysite1">http://mydomain1/sites/mysite1</a>  -filename C:\mypath\all.dat -overwrite -includeusersecurity -versions 4</p>
<p> &#8221;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe&#8221;  -o deletesite -url <a href="http://mydomain2/sites/mysite2">http://mydomain2/sites/mysite2</a></p>
<p>&#8220;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe&#8221; -o createsite -url <a href="http://mydomain2/sites/mysite2">http://mydomain2/sites/mysite2</a>   -ownerlogin administrator -owneremail <a href="mailto:yongru.zhang@utoronto.ca">yongru.zhang@utoronto.ca</a></p>
<p>&#8220;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe&#8221; -o import -url <a href="http://mydomain2/sites/mysite2">http://mydomain2/sites/mysite2</a>  -filename C:\david\sharepoint\all.dat -includeusersecurity</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sagebasis.com/BIBlog/?feed=rss2&amp;p=28</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Use Configuration Files for Package Deployment</title>
		<link>http://www.sagebasis.com/BIBlog/?p=20</link>
		<comments>http://www.sagebasis.com/BIBlog/?p=20#comments</comments>
		<pubDate>Mon, 16 Nov 2009 02:40:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL_Server/SSIS/SSAS/SSRS]]></category>

		<guid isPermaLink="false">http://www.sagebasis.com/BIBlog/?p=20</guid>
		<description><![CDATA[The following is a step by step demo, which i delivered to teach other ETL people in my company, 
Create a ETL package, which move data in one table (Service_Provider_Master) to another table (temp_Sevice_Proivider_Master) in the local database
 
Step.1 , On Local Server (WKYYZ23-ARMS20),  Create a new  ETL project, save the solution in C:\David\David_Deploy_Example ,  rename the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The following is a step by step demo, which i delivered to teach other ETL people in my company, </strong></p>
<p><strong>Create a ETL package, which move data in one table (Service_Provider_Master) to another table (temp_Sevice_Proivider_Master) in the local database</strong></p>
<p><strong> </strong></p>
<p>Step.1 , On Local Server (WKYYZ23-ARMS20),  Create a new  ETL project, save the solution in C:\David\David_Deploy_Example ,  rename the default  package as table_to_table_data_move.dtsx.</p>
<p> </p>
<p>Step.2 Create a new connection manager (WKYYZ23-ARMS20.airportBIDM_ODS) to connect to database airportBIDM_ODS</p>
<p> </p>
<p>Step.3 Create a dataflow task which move data in one table (Service_Provider_Master) to another table (temp_Sevice_Proivider_Master) in  the  local database (airportBIDM_ODS_15jun09-Full) .</p>
<p> </p>
<p><strong>Create the configuration file for the package which you want to deploy to another server.</strong></p>
<p>Step.4   In the “Control Flow” tab, right click on the design surface and select “Package Configurations…” from the pop-up menu.</p>
<p>Step.5  . Tick the check box “Enable package configurations”</p>
<p>Step 6. Click the “Add…” button, to open the “Package Configuration Wizard”</p>
<p>Step 7 . In the “Configuration Type” combo box select “XML Configuration File”</p>
<p>Step 8 . Click “Browse…” to select a location for the XML configuration file</p>
<p>Step 9. Specify a file name in the “Select Configuration File Location” dialog box and click Save. Here I selected C:\David\David_Deploy_Example\table_table_data_move_config.dtsConfig</p>
<p>Step 10 . Click “Next” in the package configuration wizard</p>
<p>Step 11 . In the “Objects” tree structure, expend folder “connection managers”…… “WKYYZ23-ARMS20” ……properties, tick the objects “connection string”  for which you want to generate the configuration file, and click “Next”,</p>
<p>Step 12 . Provide a name for this configuration,       table_to_table_data_move_config_file and click “Finish”</p>
<p>Step 13 In Windows explore, go to C:\David\David_Deploy_Example and open file “table_table_data_move_config.dtsConfig” with any XML editorL:</p>
<p> </p>
<p>&lt;?xml version=&#8221;1.0&#8243;?&gt;</p>
<p>&lt;DTSConfiguration&gt;</p>
<p>       &lt;DTSConfigurationHeading&gt;</p>
<p>              &lt;DTSConfigurationFileInfo GeneratedBy=&#8221;WKYYZ23-ARMS20\Arms&#8221; GeneratedFromPackageName=&#8221;table_to_table_data_move&#8221; GeneratedFromPackageID=&#8221;{1EB78EDA-E5D7-4843-90CE-4203730E9288}&#8221; GeneratedDate=&#8221;11/5/2009 1:40:22 PM&#8221;/&gt;</p>
<p>       &lt;/DTSConfigurationHeading&gt;</p>
<p>       &lt;Configuration ConfiguredType=&#8221;Property&#8221; Path=&#8221;\Package.Connections[WKYYZ23-ARMS20.airportBIDM_ODS].Properties[ConnectionString]&#8221; ValueType=&#8221;String&#8221;&gt;</p>
<p>              &lt;ConfiguredValue&gt;Data Source=WKYYZ23-ARMS20;Initial Catalog=airportBIDM_ODS_15jun09-Full;Provider=SQLNCLI10.1;Integrated Security=SSPI;Application-table_to_table_data_move-{77EF74ED-52CF-4B5A-B785-5453E3462CE9}WKYYZ23-ARMS20.airportBIDM_ODS_15jun09-Full;Auto Translate=False;&lt;/ConfiguredValue&gt;</p>
<p>       &lt;/Configuration&gt;</p>
<pre>&lt;/DTSConfiguration&gt;</pre>
<pre> </pre>
<pre> </pre>
<p>Step 14  Copy the parckage and configuration file to antoehr machine (AC-6F689A61BAA3) on which SQL Server 2008 is installed and the database we want to use  is airportBIDM_ODS_backup</p>
<p> </p>
<p>Step 15, On the target machina   Open the configuration file and change the ConfiguredValue as following<br />
&lt;ConfiguredValue&gt;Data Source= <strong>AC-6F689A61BAA3</strong>;Initial Catalog= <strong>airportBIDM_ODS_backup</strong>;Provider=SQLNCLI10.1;Integrated Security=SSPI;Application-table_to_table_data_move-{77EF74ED-52CF-4B5A-B785-5453E3462CE9}WKYYZ23-ARMS20.airportBIDM_ODS_15jun09-Full;Auto Translate=False;&lt;/ConfiguredValue</p>
<p><strong>Appendix<br />
</strong><br />
<strong>Guidelines on using XML configuration files in SSIS</strong>:</p>
<p><span style="text-decoration: underline;">Connection and XML configuration file naming conventions</span>: When creating a new OLE DB database connection, use the following naming convention for your connections:</p>
<p>SERVERNAMEdatabasename</p>
<p><strong>Note</strong>: You will have to rename your connection in the connection manager, after the connection is created.</p>
<p>For example, a connection to a server named LDNSrv1 and MyDB1 database should look like:</p>
<p>LDNSRV1mydb1</p>
<p>Notice that the server name is in CAPS and the database name is in lower case. However, this is just a guideline, and feel free to go with the naming convention that you are comfortable with.</p>
<p>Remember to follow the same casing standard everywhere, as SSIS connection names are case sensitive.</p>
<p>Use the same naming convention for the XML configuration files. Make sure your XML configuration files have the .dtsConfig extension. By default SSIS looks for this extension. But any other file extension will work too.</p>
<p>For example, the XML configuration file for Nyk1 server and Stocks database should be named:</p>
<p>NYK1stocks.dtsConfig</p>
<p><strong><span style="text-decoration: underline;">Managing XML configuration files</span>: Store all the XML configuration files in a standard location on all servers. For example, at F:\UDL folder</strong>Create a separate XML configuration file for each server and database combination. This approach is better than storing multiple server configurations in a single XML file. The reason being, if you need to edit connectivity information for a single server, you will directly edit the XML file for that server only. This reduces the chances of accidentally changing information for other servers.</p>
<p> </p>
<p>If you are connecting to more than one server in your SSIS package, add the relevant XML configuration file for each server and database combination. You can add multiple configuration files from the “Package Configurations” screen, as shown in the below image:</p>
<p>For example, if your package is connecting to Srv1.db1 and Srv2.db2, then you would add the following XML configuration files to your package:</p>
<p>SRV1db1.dtsConfig<br />
SRV2db2.dtsConfig</p>
<p>Always reuse existing XML configuration files, if one exists for your server and database combination. This is the sole reason behind configuration files, as you will have to update connectivity information in only one place. If there isn’t a configuration file already created for your server and database combination, create a new configuration file using the below templates and follow the described naming convention.</p>
<p><strong>For Windows authenticated connection to SQL Server:</strong></p>
<pre> </pre>
<pre>&lt;DTSConfiguration&gt;</pre>
<pre>               &lt;Configuration ConfiguredType="Property" Path="\Package.Connections[SERVERNAMEdbname].Properties[ConnectionString]" ValueType="String"&gt;</pre>
<pre>                              &lt;ConfiguredValue&gt;Data Source=[SRVNAME];Initial Catalog=[DBNAME];Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;&lt;/ConfiguredValue&gt;</pre>
<pre>               &lt;/Configuration&gt;</pre>
<pre>&lt;/DTSConfiguration&gt;</pre>
<pre> </pre>
<p><strong>For SQL Server authenticated connection to SQL Server:</strong></p>
<pre> </pre>
<pre>&lt;DTSConfiguration&gt;</pre>
<pre>               &lt;Configuration ConfiguredType="Property" Path="\Package.Connections[SERVERNAMEdbname].Properties[ConnectionString]" ValueType="String"&gt;</pre>
<pre>                              &lt;ConfiguredValue&gt;</pre>
<pre>                                              Data Source=[SRVNAME];Initial Catalog=[DBNAME];User ID=[LOGIN];password=[PWD];Provider=SQLNCLI.1;Persist Security Info=True;Auto Translate=False</pre>
<pre>                               &lt;/ConfiguredValue&gt;</pre>
<pre>               &lt;/Configuration&gt;</pre>
<pre>&lt;/DTSConfiguration&gt;</pre>
<pre> </pre>
<p><strong>Note</strong>: In the above templates, square brackets [] are not required except around the name of the connection. Do not surround server name, database name, user name and password with square brackets</p>
<p><span style="text-decoration: underline;">Populating global variables using XML configuration files</span>: When dealing with Active directory shares or file paths (for connections to source and target text files or data files), do not hardcode the domain names or machine names. Instead, use variables. These variables can be populated from the XML configuration files. Once a variable is created in the SSIS package, its value can be populated from the XML configuration file. For example, here’s what you need in the configuration file, to populate the variable called Domain with a value of &#8220;NykLive&#8221;:</p>
<pre> </pre>
<pre>&lt;DTSConfiguration&gt;</pre>
<pre>               &lt;Configuration ConfiguredType="Property" Path="\Package.Variables[User::Domain].Properties[Value]" ValueType="String"&gt;</pre>
<pre>                               &lt;ConfiguredValue&gt;NykLive&lt;/ConfiguredValue&gt;</pre>
<pre>               &lt;/Configuration&gt;</pre>
<pre>&lt;/DTSConfiguration&gt;</pre>
<p><strong>Note</strong>: Variable names are case sensitive too. So make sure you follow the same case when referring to the variables in the configuration files, script tasks etc.</p>
<p> </p>
<p> </p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sagebasis.com/BIBlog/?feed=rss2&amp;p=20</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
