Package Connection

Overview

Package Connection Manager is SSIS Connection Manager for establishing connections to SSIS packages. It allows access to current or another package at runtime. This is important extension of the SSIS framework, which makes components like Data Flow Source possible. The configuration dialog allows connection setup to the current package or another package. Use the API to build components based on the Package Connection Manager.

Setup

Use the Package Connection Manager dialog to specify properties for connecting to SSIS package. Please check the options below, when setting connection to a package other than the current.

Package Options

Decryption Password

Specify the password to use to decrypt package.

Package location

Specify the type of package storage location. This property has the options listed in the following table.

Value Description
SQL Server Package is stored in SQL Server.

Selecting this value displays the dynamic option Server, Authentication type, Package path.

File System Package is stored on a file share.

Selecting this value displays the dynamic options Package path.

SSIS Package Store Package is stored in SSIS Package Store.

Selecting this value displays the dynamic options Server, Package path.

Server

Specify server name or select a server from the list.

Authentication type

Specify authentication type. This property has the options listed in the following table.

Value Description
Windows Authentication User is authenticated using standard Windows Authentication.
SQL Server Authentication User is authenticated with SQL Server Authentication.

Selecting this value displays the dynamic options User name, Password.

User name

Specify user name to access the SQL server.

Password

Specify password to access the SQL server.

Package path

Type the package path, or click the browse button (…) and locate the package.

How to script and modify the variables of Package connection?

To iterate and modify the variables used by a package, follow these steps:

  1. Create a script task.
  2. Reference CozyRoc.SSISPlus library.
  3. In the script get reference to a package connection manager.
  4. Get connection manager InnerObject property and cast it to PackageConnectionManager.
  5. Get Variables property, which is generic Dictionary type. It contains variable name to variable value pairs. Modify this collection, to setup package connection variables.

 

Check the sample script below demonstrating how to access package connection variables.

Imports System.Collections.Generic
Imports CozyRoc.SqlServer.SSIS
...
Dim manager As ConnectionManager = Dts.Connections("YourPackageConnection")
Dim packageCM As PackageConnectionManager = CType(manager.InnerObject, PackageConnectionManager)
Dim packageVars As Dictionary(Of String, String) = packageCM.Variables