When you create a new package, no connections are defined. You can create a connection by rightclicking
in the Connections area and choosing the appropriate data connection type. Once the
connection is created, you can rename it to fit your naming conventions or to better describe what
is contained in the connection. Nearly any task or transformation that uses data or references a
file will require a Connection Manager. Figure 2-22 shows a few connections: two to relational
databases (AdventureWorksDW and Stage), an SMTP reference, and a directory.
Figure 2-22
Figure 2-23
Notice the two Connection Managers that refer to the AdventureWorksDW database and the
staging database. The one with a database icon is a local Connection Manager that can be seen only
inside the current package. The Connection Manager with (project) in front is a project connection
that can be seen in any package. Any local Connection Manager can be converted to a project
connection by right-clicking it and selecting Convert to Project Connection. Note that we have used
a naming convention so the designer can easily recognize what type of connection it is.
Variables
Variables are a powerful piece of the SSIS architecture; they enable you to dynamically control the
package at runtime, much like you do in any .NET language. There are two types of variables:
system and user. System variables are those built into SSIS, such as a package name or the package’s
start time; user variables are created by the SSIS developer. Variables can also have varying
scope, with the default scope being the entire package. They can also be set to be in the scope of a
container, a task, or an event handler inside the package.
One of the optional design-time windows can display a list of variables. To access the Variables
window, right-click in the design pane and select Variables, or select Variables from the SSIS menu.
The Variables window (shown in Figure 2-23) will appear in the bottom of SSDT by default. Also by
default, you will see only the user variables; to see the system variables as well, click Grid Options
and then select the Show System Variables icon in the top of the window. To add a new variable,
click the Add Variable icon in the Variables window and type the variable name.