Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

SSIS Best Practices

PACKAGES
    Packages are the standard unit of executable and deployable SSIS code.  And are usually developed by a single
person.  Package versioning information, under package properties, should be filled-in with major & minor build info and
comments.  Complex systems have many packages and utilize a parent-child pattern.  Each package runs in its own
CPU process space.  Child packages run in the process of its parent and are synchronous.  Child packages can be set
to run “out of process”.  Instead of running under the parent’s process, the child packages will take up additional
memory and resources and run in their own process.  If packages set a Breakpoint for OnPostExecute, this enables
viewing of Watch Windows to see the value of variables.  Additional breakpoints can be set, to step through a package. 
Packages should set the property ProtectionLevel to DontSaveSensitive, to minimize deployment security issues and
to force the use of configuration files for storing usernames and passwords.  Packages are uniquely identified by a
GUID.  If you copy an existing package, rename the package and Generate New ID to prevent any conflicts.  In the
package properties, click on the ID dropdownlist, and select Generate New ID.  When creating new tasks and
components, you should always rename the object and give it a description to aid debugging. 

DATA FLOW TASK


    Data Flow Task is the primary SSIS object and is also known as the Pipeline.  It moves data from a source adapter to
a destination adapter.  The default adapter type is OLEDB.  The adapter can be a table, a sql command, a sql
command via variable, or a variable.  The transformation of data from source to destination is the Data Flow Path.  To
view the contents of the data flow path, use Data Viewers.  To output data into a variable, use a Recordset Destination
Adapter.  Objects within the Data Flow Task are categorized as Components.  (Objects in the Control Flow are
categorized as Tasks).

CONNECTION MANAGERS
    Connection managers map adapters to physical data sources via connection strings.  If the connection string of a
connection manager is dynamically set at runtime, tasks that depend on the connection manager should set their
DelayValidation property to TRUE.  Otherwise, the tasks will fail validation prematurely.  During design time, the
designer apparently always attempts to validate datasources.  Setting DelayValidation to TRUE doesn’t appear to have
any effect.

CONFIGURATIONS
Configurations override object properties and variables at runtime.  When storing Connection Manager properties in a
configuration, only the ConnectionString property is necessary as it is an amalgamation of all the other properties.  Note
that SSIS will refuse to store passwords in a configuration.  After creating a configuration, manually edit it and enter the
passwords.

VARIABLES
    Variables are the principal means to glue SSIS tasks together.  Variables can hold scalar values or a resultset.  The
For Each ADO Enumerator can loop over a resultset variable.  Variables can be manipulated via the Script task, as was
common practice for DTS.  With SSIS, variables should be manipulated using property expressions.  Variables can be
derived from other variables.  Under properties, for a given variable, set EvaluateAsExpression to true and enter the
expression.  Variables have scope and namespaces.  To view namespaces, select choose variable columns option in
the variables window.  Within a package, child objects inherit variables from their parent objects.  A variable with a
package scope is visible, within a package, to all objects.  In parent-child package architecture, child packages
automatically inherit variables from the parent package.  Parents call the child using the execute package task.  In
parent-child package architecture, child packages should explicitly declare these variables by using the Parent Variable
configuration.  This allows the child package to be executed on its own, for development and de-bugging purposes.

FOR EACH ENUMERATOR


    Two commonly used enumerators are the File and the ADO enumerators.  The File enumerator loop over files.   The
ADO enumerator loop over a resultset or a variable that contains a resultset.  

SSIS LOG TABLE


Use SSIS Logging to a table.  Capture the events: onerror, onpipelinerowssent, onpostexecute, onpreexecute,
ontaskfailed, onwarning.  Use the following Microsoft provided script to query the table.

Gayatri Tandle Page 1

You might also like