Nate Locklin ◦ Database Analyst, PPG Industries ◦ nate@locklin.org Steve Tirone ◦ Data Warehouse Analyst, Amerinet ◦ stephen.tirone@gmail.com Survey: ◦ ◦ ◦ ◦ What is SSIS? Use it occasionally Use it every day I wrote the book on advanced SSIS Given that we didn’t know, we wanted to present something generally useful, hence ◦ “Three best practices to keep in mind when developing and deploying SSIS packages” Open BIDS (Business Intelligence Development Studio) Available in VS2005, VS2008, but not VS2010 (yet) Incidentally, the Import/Export wizard in Management Studio runs SSIS under the hood Several tabs at the top ◦ ◦ ◦ ◦ Control Flow: your top level workflow workspace Data Flow: details of data transfer operations Event Handlers: where you can handle raised events Package Explorer: like a site map of your package Start by dragging Tasks to your Control tab Most commonly used tasks are probably: ◦ Data Flow ◦ Execute SQL Let’s import the DJIA stock prices ◦ downloaded from Yahoo Finance into an Excel spreadsheet Two often used log providers ◦ Text Files ◦ SQL Server (sysssislog in 2008, sysdtslog90 in 2005) – created when first used Many events possible to log ◦ OnError and OnTaskFail events most common ◦ Can reduce detail to Computer, Source, and Message ◦ Here you will find all the error messages: http://msdn.microsoft.com/enus/library/ms345164.aspx Properties of objects can be changed at runtime No need to change the package itself to promote from test to production ◦ Connection string is all that’s needed to change Several formats: ◦ XML configuration file most commonly used Checkpoints let a package start where it left off previously, such as when an error occurs in the middle of your package ◦ Lets you fix the error, then restart the package, without it re-running the parts already done Set the following properties of the Package ◦ CheckpointFileName = <some name> ◦ CheckpointUsage = IfExists ◦ SaveCheckpoints = True Set the following properties on all the tasks: ◦ FailPackageOnFailure = True Most importantly: ◦ “A package can be restarted only at the control flow level. You cannot restart a package in the middle of a data flow.” Also: ◦ “When a package is restarted the Foreach Loop containers and its child containers are run again. If a child container in the loop runs successfully, it is not recorded in the checkpoint file, instead it is rerun.” RetainSameConnection ◦ Using lots of connections? Use this, please! ◦ Can be found as a property of the Connection Mgr Packet size ◦ Consider increasing (32,767) for larger data Row Per Batch Size ◦ Sometimes speed is enhanced when setting the “Rows per batch” to something other than blank, like 1000, 5000 or 10,000 (particularly when run through BIDS over the network) Property of the Connection Manager On All page of the Connection Manager Package protection level Default is Encrypt with User Key, but you want Encrypt with Password (all or sensitive) Know your environment (64 bit vs 32 bit) ◦ Might get [Connection manager "Excel Connection Manager 1"] Error: SSIS Error Code DTS_E_OLEDB_EXCEL_NOT_SUPPORTED: The Excel Connection Manager is not supported in the 64-bit version of SSIS, as no OLE DB provider is available. ◦ Or Class not registered The 64 bit issue may be addressed by telling Integration Services to use 32 bit runtime In the SQL Agent job step: Property of the PROJECT: Great flexibility in error handling if you “program” the OnError handler Implement Logging Use Configuration Files for flexibility Checkpoints can be useful Know your environment Keep small design considerations in mind Nate Locklin ◦ Database Analyst, PPG Industries ◦ nate@locklin.org Steve Tirone ◦ Data Warehouse Analyst, Amerinet ◦ stephen.tirone@gmail.com Slides are at http://tinyurl.com/SSISBestPractices Future BI Topics? ◦ Integration Services (SSIS) ◦ Reporting Services (SSRS) ◦ Analysis Services (SSAS) SQL Saturday? ◦ BI Edition? ◦ Volunteers to help coordinate? Email Gina or Steve