<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>LUTI @ Microsoft : SSIS</title><link>http://blogs.msdn.com/luti/archive/tags/SSIS/default.aspx</link><description>Tags: SSIS</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Pacotes DTS + SQL Server 2008 + arquitetura de 64 bits</title><link>http://blogs.msdn.com/luti/archive/2009/02/18/pacotes-dts-sql-server-2008-arquitetura-de-64-bits.aspx</link><pubDate>Wed, 18 Feb 2009 19:06:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9431654</guid><dc:creator>Luciano Caixeta Moreira</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/luti/comments/9431654.aspx</comments><wfw:commentRss>http://blogs.msdn.com/luti/commentrss.aspx?PostID=9431654</wfw:commentRss><description>&lt;p&gt;Hoje conversei com um dos nossos clientes que me perguntou se exisita alguma maneira de executar pacotes DTS no SQL Server 2008 rodando em uma plataforma de 64 bits. Em primeiro lugar, eu nem sabia se existia um problema, pois na minha cabeça bastaria pegar e executar o DTEXEC como um processo em modo 32 bits mesmo.    &lt;br /&gt;Mas para garantir que eu não estava falando besteira, pesquisei mais sobre o assunto e achei o que queria na documentação oficial do SQL Server:&lt;/p&gt;  &lt;p&gt;- BOL: &lt;a title="http://msdn.microsoft.com/en-us/library/bb500440.aspx" href="http://msdn.microsoft.com/en-us/library/bb500440.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb500440.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;O BOL diz claramente que “&lt;em&gt;There is no 64-bit design-time or run-time support for DTS packages. On a 64-bit computer, DTS packages, and Integration Services packages that run DTS packages, can run only in 32-bit mode. To run DTS packages in 32-bit mode, you have to install and use the 32-bit version of the &lt;strong&gt;dtexec&lt;/strong&gt; utility (dtexec.exe). To install the 32-bit version of the &lt;strong&gt;dtexec&lt;/strong&gt; utility, select Client Tools or Business Intelligence Development Studio during setup&lt;/em&gt;”.&lt;/p&gt;  &lt;p&gt;Porém não temos muito mais informação além disso, o que acaba deixando o profissional sem maior embasamento. Como essa história de 32/64 gera muita confusão, pois quando falamos no BIDS (Business Intelligence Development Studio) ele requer o uso de providers 32-bit em design time e somente em run-time pode usar providers de 64 bits. Então achei melhor continuar procurando mais um pouco e encontrei uma thread na nossa lista interna que apontava para esse blog aqui: &lt;a title="http://dougbert.com/blogs/dougbert/archive/2008/06/10/64-bit-considerations-for-sql-server-integration-services-final.aspx" href="http://dougbert.com/blogs/dougbert/archive/2008/06/10/64-bit-considerations-for-sql-server-integration-services-final.aspx"&gt;http://dougbert.com/blogs/dougbert/archive/2008/06/10/64-bit-considerations-for-sql-server-integration-services-final.aspx&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Conteúdo excelente e leitura obrigatória para quem quer saber maiores detalhes sobre o assunto. Façam bom uso!&lt;/p&gt;  &lt;p&gt;[]s    &lt;br /&gt;Luciano Caixeta Moreira     &lt;br /&gt;&lt;a href="mailto:luciano.moreira@microsoft.com"&gt;luciano.moreira@microsoft.com&lt;/a&gt;     &lt;br /&gt;===============================================     &lt;br /&gt;This post is provided &amp;quot;AS IS&amp;quot; and confers no right     &lt;br /&gt;===============================================&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9431654" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/luti/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.msdn.com/luti/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>SSIS by example #1 - Processing files in folder</title><link>http://blogs.msdn.com/luti/archive/2008/07/11/ssis-by-example-1-processing-files-in-folder.aspx</link><pubDate>Fri, 11 Jul 2008 15:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8721122</guid><dc:creator>Luciano Caixeta Moreira</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/luti/comments/8721122.aspx</comments><wfw:commentRss>http://blogs.msdn.com/luti/commentrss.aspx?PostID=8721122</wfw:commentRss><description>
&lt;SCRIPT language=javascript type=text/javascript&gt;

 
function showDiv(post, lingua) { 
  if (document.getElementById) { // DOM3 = IE5, NS6 
    document.getElementById(post + lingua).style.display = 'block';  
      document.getElementById(post + ((lingua == 'P')? 'E' : 'P')).style.display = 'none'; 
    //alert(post + ((lingua == 'P')? 'E' : 'P'));
  } 
} &lt;/SCRIPT&gt;
&lt;A href="javascript:showDiv('Post000X_', 'P')"&gt;(Português)&lt;/A&gt; - &lt;A href="javascript:showDiv('Post000X_', 'E')"&gt;(English)&lt;/A&gt; 
&lt;DIV id=Post000X_E style="DISPLAY: block"&gt;
&lt;P&gt;Scenario: a customer wants to create a SSIS package to import all the files in a folder to a SQL Server database, but only the files that haven't been processed yet. The files that were imported are registered in a table with date and time of the processing and the number of rows inserted in the destination table.&lt;/P&gt;
&lt;P&gt;I'm using SQL Server 2008 RC0 and VS2008 SP1 Beta1 (in my last post I explain how I managed to install BIDS). The .sql file and the solution are attached to this post.&amp;nbsp; The steps to accomplish this are: &lt;/P&gt;
&lt;P&gt;&lt;BR&gt;1 - Create table SimpleData and FileControl table in any database (I used SSIS DB) - Figure 1. &lt;BR&gt;2 - Create a new Integration Services solution using BIDS. &lt;BR&gt;3 - Add a data flow task to the control flow, name it "Import file" and edit it. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A - Add a flat file source, name it "Text file" and edit it's properties. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B - Create a new connection manager, name it "TextFile_Connection" and define the filename as "SimpleData.txt" (browse until the directory that contains the files - c:\temp\SSIS in my case). See Figure 2. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C - In the advanced tab, edit the columns properties: Column1 = (name: IDData, type: four byte signed integer DT_I4), Column2 =&amp;nbsp; (name: Name, type: string DT_STR, outputColumnWidth: 200), Column3 =&amp;nbsp; (name: Age, type: single-byte signed integer DT_I1). &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; D -&amp;nbsp; The preview should display correctly all three columns with one record. Finish editing this source. &lt;BR&gt;5 - Add an OleDb Destination and link the source to the destination using the green arrow. Name it "SSIS_SimpleData" and edit it. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A - Create a new data connection pointing to your server and database, using the credentials you desire. Test the connection. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B - Select [dbo].[SimpleData] as the destination table. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C - In the mappings, delete the arrow that connects IDData (I want the destination IDENTITY to work). Since the column names generated by the file source are the same as the destination columns, the mappings are automatically done for you. &lt;BR&gt;6 - Run your package, check the result and truncate the table to clean our test. Now let's get to more complicated stuff. &lt;BR&gt;7 - Add three variables at the package level: (FilePath - type: String), (Records - type: Int32), (Processed - type: Int32). See figure 3. &lt;BR&gt;8 - Add a for each loop container, name it "Loop thru files" and edit it. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A - Select the "Foreach File Enumerator", point to the directory where the files reside and define the files as "*.txt". See figure 4. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B - In the variable mappings tabs, add "User::FilePath" mapped to index 0 (yes, zero). Save and close.&amp;nbsp; &lt;BR&gt;9 - Add the "Import file" task to the loop container (if you drag it around, both should move together). &lt;BR&gt;10 - Add two "Execute SQL Task" to the loop container, name it "Check processed" and "Register Processed". Link the green arrows in the following order: Check -&amp;gt; Import -&amp;gt; Register, as in figure 5. &lt;BR&gt;11 - Edit "Check processed" task. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A - Use the same connection string defined in step 5A (DEStudio_vm.SSIS.sa in my case). &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B - Define the result set as "Single row". &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C - Define the SQL Statement as "SELECT COUNT(*) AS Processed FROM FileControl WHERE ImportedFilename = ?". &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; D - Add one parameter mapping: (User::FilePath - Input - VARCHAR - 0 (yes, Parameter name is zero) - 200).&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; E - Add one Result Set: (Result Name = Processed, Variable Name = User::Processed). Save and close.&amp;nbsp;&amp;nbsp; &lt;BR&gt;12 - Edit the green arrow connecting Check and Import tasks. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A - Select evaluation operation as "Expression and Constraint". &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B - Define expression as "@Processed == 0", as in figure 6. Close and save. &lt;BR&gt;13 - In the connection manager window, click in the connection "TextFile_Connection" and edit it's properties (F4). &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A - Edit the connection expressions, adding: (ConnectionString - @[User::FilePath]). &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B - Clear the connection string property (that was pointing to SimpleData.txt file). &lt;BR&gt;14 - Disable the Register task and run the package. At this time, all four files should be imported. Truncate the SimpleData table to clean up our test. &lt;BR&gt;15 - Edit the Import File task. See figure 7 for guidance. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A - Add a Multicast transformation between the source and the destination (redo the mappings). &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B - Add a Row Count transformation to another connection of the multicast, edit properties and map VariableName to User::Records. Stop editing the data flow task. &lt;BR&gt;16 - Edit the "Register processing" task. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A - Use the same connection string defined in step 5A (DEStudio_vm.SSIS.sa in my case). &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B - Define the SQL Statement as "INSERT INTO FileControl (ImportedFileName, RecordsImported) VALUES (?, ?)". &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C - Add two parameter mapping: (User::FilePath - Input - VARCHAR - 0 (yes, parameter name is zero) - 200) and (User::Records - Input - LONG - 1 - -1). Close and save. &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;At this point your package is done! &lt;BR&gt;To make sure our tests get more interesting, move files SimpleData_3.txt and SimpleData_4.txt to another directory and execute the following steps:&lt;/P&gt;
&lt;P&gt;1 - Run the package (it should import both files correctly) &lt;BR&gt;2 - Check if the SimpleData table has three records and that the imported files are registered in the FileControl table. &lt;BR&gt;3 - Move the files 3 and 4 back to the original directory and rerun the package. &lt;BR&gt;4 - Check if the SimpleData table has eight records and all four files are registered in the FileControl table. &lt;BR&gt;5 - Rerun the package. At this time neither import file and register processing should be executed.&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;This example resolves the scenario mentioned at the beginning of the post. You can play around with a similar solution, but instead of controlling the files using a table, you can move processed files to another directory.&lt;/P&gt;&lt;/DIV&gt;
&lt;DIV id=Post000X_P style="DISPLAY: none"&gt;
&lt;P&gt;Em breve eu vou traduzir o artigo, quem quiser colaborar e me ajudar na tradução... :-)&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;Figures&lt;/P&gt;
&lt;P&gt;(1) &lt;A&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=201 alt=image src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb.png" width=371 border=0 mce_src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb.png"&gt;&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (2) &lt;A href="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_4.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=198 alt=image src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb_1.png" width=389 border=0 mce_src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;(3) &lt;A href="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_6.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=179 alt=image src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb_2.png" width=377 border=0 mce_src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb_2.png"&gt;&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (4) &lt;A href="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_8.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=266 alt=image src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb_3.png" width=390 border=0 mce_src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;(5) &lt;A href="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_10.png" mce_href="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_10.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=299 alt=image src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb_4.png" width=242 border=0 mce_src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb_4.png"&gt;&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (6)&amp;nbsp; &lt;A href="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_14.png" mce_href="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_14.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=280 alt=image src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb_6.png" width=525 border=0 mce_src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb_6.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;(7) &lt;A href="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_16.png" mce_href="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_16.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=204 alt=image src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb_7.png" width=293 border=0 mce_src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb_7.png"&gt;&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (8) &lt;A href="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_20.png" mce_href="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_20.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=72 alt=image src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb_9.png" width=486 border=0 mce_src="http://blogs.msdn.com/blogfiles/luti/WindowsLiveWriter/SSISbyexample1Processingfilesinfolder_6BDD/image_thumb_9.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;BR&gt;[]s &lt;BR&gt;Luciano Caixeta Moreira &lt;BR&gt;&lt;A href="mailto:luciano.moreira@microsoft.com" mce_href="mailto:luciano.moreira@microsoft.com"&gt;luciano.moreira@microsoft.com&lt;/A&gt; &lt;BR&gt;=============================================== &lt;BR&gt;This post is provided "AS IS" and confers no right &lt;BR&gt;===============================================&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8721122" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/luti/attachment/8721122.ashx" length="23922" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/luti/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.msdn.com/luti/archive/tags/SSIS/default.aspx">SSIS</category></item></channel></rss>