Atc TutorialSSIS4
Atc TutorialSSIS4
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SQL Server Integration Services is a platform for building enterprise-level data integration and data
transformations solutions. Use Integration Services to solve complex business problems by copying or
downloading files, loading data warehouses, cleansing and mining data, and managing SQL Server objects and
data.
Integration Services can extract and transform data from a wide variety of sources such as XML data files, flat files,
and relational data sources, and then load the data into one or more destinations.
Integration Services includes a rich set of built-in tasks and transformations, graphical tools for building packages,
and the Integration Services Catalog database, where you store, run, and manage packages.
You can use the graphical Integration Services tools to create solutions without writing a single line of code. You
can also program the extensive Integration Services object model to create packages programmatically and code
custom tasks and other package objects.
Resources
Get help in the SSIS forum
Get help on Stack Overflow
Follow the SSIS team blog
Report issues & request features
Get the docs on your PC
What's New in Integration Services in SQL Server
2016
11/5/2020 • 16 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This topic describes the features that have been added or updated in SQL Server 2016 Integration Services. It also
includes features added or updated in the Azure Feature Pack for Integration Services (SSIS) during the SQL Server
2016 time frame.
Manageability
Better deployment
SSISDB Upgrade Wizard
Run the SSISDB Upgrade Wizard to upgrade the SSIS Catalog database, SSISDB, when the database is older than
the current version of the SQL Server instance. This occurs when one of the following conditions is true.
You restored the database from an older version of SQL Server.
You did not remove the database from an Always On Availability Group before upgrading the SQL Server
instance. This prevents the automatic upgrade of the database. For more info, see Upgrading SSISDB in an
availability group.
For more info, see SSIS Catalog (SSISDB).
Support for Always On in the SSIS Catalog
The Always On Availability Groups feature is a high-availability and disaster-recovery solution that provides an
enterprise-level alternative to database mirroring. An availability group supports a failover environment for a
discrete set of user databases known as availability databases that fail over together. For more information, see
Always On Availability Groups.
In SQL Server 2016, SSIS introduces new capabilities that let you easily deploy to a centralized SSIS Catalog (i.e.
SSISDB user database). In order to provide high availability for the SSISDB database and its contents - projects,
packages, execution logs, and so on - you can add the SSISDB database to an Always On Availability Group, just
like any other user database. When a failover occurs, one of the secondary nodes automatically becomes the new
primary node.
For a detailed overview and step-by-step instructions for enabling Always On for SSISDB, see SSIS Catalog.
Incremental package deployment
The Incremental Package Deployment feature lets you deploy one or more packages to an existing or new project
without deploying the whole project. You can incrementally deploy packages by using the following tools.
Deployment Wizard
SQL Server Management Studio (which uses the Deployment Wizard)
SQL Server Data Tools (Visual Studio) (which also uses the Deployment Wizard)
Stored procedures
The Management Object Model (MOM) API
For more info, see Deploy Integration Services (SSIS) Projects and Packages.
Support for Always Encrypted in the SSIS Catalog
SSIS already supports the Always Encrypted feature in SQL Server. For more info, see the following blog posts.
SSIS with Always Encrypted
Lookup transformation with Always Encrypted
Better debugging
New ssis_logreader database-level role in the SSIS catalog
In previous versions of the SSIS catalog, only users in the ssis_admin role can access the views that contain
logging output. There is now a new ssis_logreader database-level role that you can use to grant permissions to
access the views that contain logging output to users who aren't administrators.
There is also a new ssis_monitor role. This role supports Always On and is for internal use only by the SSIS
catalog.
New RuntimeLineage logging level in the SSIS catalog
The new RuntimeLineage logging level in the SSIS catalog collects the data required to track lineage information
in the data flow. You can parse this lineage information to map the lineage relationship between tasks. ISVs and
developers can build custom lineage mapping tools with this information.
New custom logging level in the SSIS catalog
Previous versions of the SSIS catalog let you choose from four built-in logging levels when you run a package:
None, Basic, Performance, or Verbose . SQL Server 2016 adds the RuntimeLineage logging level. In addition,
you can now create and save multiple customized logging levels in the SSIS catalog, and pick the logging level to
use every time you run a package. For each customized logging level, select only the statistics and events you want
to capture. Optionally include the event context to see variable values, connection strings, and task properties. For
more info, see Enable Logging for Package Execution on the SSIS Server.
Column names for errors in the data flow
When you redirect rows in the data flow that contain errors to an error output, the output contains a numeric
identifier for the column in which the error occurred, but does not display the name of the column. There are now
several ways to find or display the name of the column in which the error occurred.
When you configure logging, select the DiagnosticEx event for logging. This event writes a data flow
column map to the log. You can then look up the column name in this column map by using the column
identifier captured by an error output. For more info, see Error Handling in Data.
In the Advanced Editor, you can see the column name for the upstream column when you view the
properties of an input or output column of a data flow component.
To see the names of the columns in which the error occurred, attach a Data Viewer to an error output. The
Data Viewer now displays both the description of the error and the name of the column in which the error
occurred.
In the Script Component or a custom data flow component, call the new GetIdentificationStringByID method
of the IDTSComponentMetadata100 interface.
For more info about this improvement, see the following blog post by SSIS developer Bo Fan: Error Column
Improvements for SSIS Data Flow.
NOTE
(This support has been expanded in subsequent releases. For more info, see Expanded support for error column names and
New IDTSComponentMetaData130 interface in the API.)
NOTE
(In RC0, this method has been moved to the new IDTSComponentMetaData130 interface. For more info, see New
IDTSComponentMetaData130 interface in the API.)
Connectivity
Expanded connectivity on premises
Support for OData v4 data sources
The OData Source and the OData Connection Manager now support the OData v3 and v4 protocols.
For OData V3 protocol, the component supports the ATOM and JSON data formats .
For OData V4 protocol, the component supports the JSON data format .
For more info, see OData Source.
Explicit support for Excel 2013 data sources
The Excel Connection Manager, the Excel Source and the Excel Destination, and the SQL Server Import and Export
Wizard now provide explicit support for Excel 2013 data sources.
Support for the Hadoop file system (HDFS)
Support for HDFS contains connection managers to connect to Hadoop clusters and tasks to do common HDFS
operations. For more info, see Hadoop and HDFS Support in Integration Services (SSIS).
Expanded support for Hadoop and HDFS
The Hadoop Connection Manager now supports both Basic and Kerberos authentication. For more info, see
Hadoop Connection Manager.
The HDFS File Source and the HDFS File Destination how support both Text and Avro format. For more info,
see HDFS File Source and HDFS File Destination.
The Hadoop File System task now supports the CopyWithinHadoop option in addition to the CopyToHadoop
and the CopyFromHadoop options. For more info, see Hadoop File System Task.
HDFS File Destination now supports ORC file format
The HDFS File Destination now supports the ORC file format in addition to Text and Avro. (The HDFS File Source
supports only Text and Avro.) For more info about this component, see HDFS File Destination.
ODBC components updated for SQL Server 2016
The ODBC Source and Destination components have been updated to provide full compatibility with SQL Server
2016. There is no new functionality and there are no changes in behavior.
Explicit support for Excel 2016 data sources
The Excel Connection Manager, the Excel Source, and the Excel Destination now provide explicit support for Excel
2016 data sources.
Connector for SAP BW for SQL Server 2016 released
The Microsoft® Connector for SAP BW for Microsoft SQL Server® 2016 has been released as part of the SQL
Server 2016 Feature Pack. To download components of the Feature Pack, see Microsoft® SQL Server® 2016
Feature Pack.
Connectors v4.0 for Oracle and Teradata released
The Microsoft Connectors v4.0 for Oracle and Teradata have been released. To download the connectors, see
Microsoft Connectors v4.0 for Oracle and Teradata.
Connectors for Analytics Platform System (PDW) Appliance Update 5 released
The destination adapters for loading data into PDW with AU5 have been released. To download the adapters, see
Analytics Platform System Appliance Update 5 Documentation and Client Tools.
Expanded connectivity to the cloud
Azure Feature Pack for SSIS released for SQL Server 2016
The Azure Feature Pack for Integration Services has been released for SQL Server 2016. The feature pack contains
connection managers to connect to Azure data sources and tasks to do common Azure operations. For more info,
see Azure Feature Pack for Integration Services (SSIS).
Support for Microsoft Dynamics online resources released in Service Pack 1
With SQL Server 2016 Service Pack 1 installed, the OData Source and OData Connection Manager now support
connecting to the OData feeds of Microsoft Dynamics AX Online and Microsoft Dynamics CRM Online.
Support for Azure Data Lake Store released
The latest version of the Azure Feature Pack includes a connection manager, source, and destination to move data
to and from Azure Data Lake Store. For more info, see Azure Feature Pack for Integration Services (SSIS)
Support for Azure Synapse Analytics released
The latest version of the Azure Feature Pack includes the Azure SQL DW Upload task for populating Azure Synapse
Analytics with data. For more info, see Azure Feature Pack for Integration Services (SSIS)
IMPORTANT
If you develop custom extensions for SSIS, see Support multi-targeting in your custom components and Getting your SSIS
custom extensions to be supported by the multi-version support of SSDT 2015 for SQL Server 2016.
Get help
UserVoice: Have suggestions for improving SQL Server?
Microsoft Q & A (SQL Server)
DBA Stack Exchange (tag sql-server): Ask SQL Server questions
Stack Overflow (tag sql-server): Answers to SQL development questions
Reddit: General discussion about SQL Server
Microsoft SQL Server License Terms and Information
Support options for business users
Contact Microsoft
Additional SQL Server help and feedback
See Also
What's New in SQL Server 2016
Editions and Supported Features for SQL Server 2016
What's New in Integration Services in SQL Server
2017
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This topic describes the features that have been added or updated in SQL Server 2017 (14.x) Integration Services.
NOTE
SQL Server 2017 also includes the features of SQL Server 2016 and the features added in SQL Server 2016 updates. For info
about the new SSIS features in SQL Server 2016, see What's New in Integration Services in SQL Server 2016.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This topic provides details about the features of SQL Server Integration Services (SSIS) supported by the different
editions of SQL Server.
For features supported by Evaluation and Developer editions, see features listed for Enterprise Edition in the
following tables.
For the latest release notes and what's new information, see the following articles:
SQL Server 2016 release notes
What's New in Integration Services in SQL Server 2016
What's New in Integration Services in SQL Server 2017
Tr y SQL Ser ver 2016!
The SQL Server Evaluation edition is available for a 180-day trial period.
1 If you run packages that require Enterprise-only features in Scale Out, the Scale Out Workers must also run on
1 DTSWizard.exe is not provided with SQL on Linux. However, dtexec on Linux can be used to execute a package
created by DTSWizard on Windows.
Integration Services
EXP RESS W IT H
A DVA N C ED
F EAT URE EN T ERP RISE STA N DA RD W EB SERVIC ES EXP RESS
High- Yes
performance
Oracle source
and destination
by Attunity
High- Yes
performance
Teradata source
and destination
by Attunity
EXP RESS W IT H
A DVA N C ED
F EAT URE EN T ERP RISE STA N DA RD W EB SERVIC ES EXP RESS
Dimension Yes
processing
destination
Partition Yes
processing
destination
1 The Change Data Capture components by Attunity require Enterprise edition. The Change Data Capture Service
and the Change Data Capture Designer, however, do not require Enterprise edition. You can use the Designer and
the Service on a computer where SSIS is not installed.
Integration Services Developer Documentation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services includes a completely rewritten object model, which has been enhanced with many features
that make extending and programming packages easier, more flexible, and more powerful. Developers can extend
and program almost every aspect of Integration Services packages.
As an Integration Services developer, there are two fundamental approaches that you can take to Integration
Services programming:
You can extend packages by writing components that become available within SSIS Designer to provide
custom functionality in a package.
You can create, configure, and run packages programmatically from your own applications.
If you find that the built-in components in Integration Services do not meet your requirements, you can extend the
power of Integration Services by coding your own extensions. In this approach, you have two discrete options:
For ad hoc use in a single package, you can create a custom task by writing code in the Script task, or a
custom data flow component by writing code in the Script component, which you can configure as a source,
transformation, or destination. These powerful wrappers write the infrastructure code for you and let you
focus exclusively on developing your custom functionality; however, they are not easily reusable elsewhere.
For use in multiple packages, you can create custom Integration Services extensions such as connection
managers, tasks, enumerators, log providers, and data flow components. The managed Integration Services
object model contains base classes that provide a starting point and make developing custom extensions
easier than ever.
If you want to create packages dynamically, or to manage and run Integration Services packages outside the
development environment, you can manipulate packages programmatically. You can load, modify, and run existing
packages, or you can create and run entirely new packages programmatically. In this approach, you have a
continuous range of options:
Load and run an existing package without modification.
Load an existing package, reconfigure it (for example, specify a different data source), and run it.
Create a new package, add and configure components, making changes object by object and property by
property, save it, and then run it.
These approaches to Integration Services programming are described in this section and demonstrated with
examples.
In This Section
Integration Services Programming Overview
Describes the roles of control flow and data flow in Integration Services development.
Understanding Synchronous and Asynchronous Transformations
Describes the important distinction between synchronous and asynchronous outputs and the components that use
them in the data flow.
Working with Connection Managers Programmatically
Lists the connection managers that you can use from managed code, and the values that the connection managers
return when the code calls the AcquireConnection method.
Extending Packages with Scripting
Describes how to extend the control flow by using the Script task, or the data flow by using the Script component.
Extending Packages with Custom Objects
Describes how to create and program custom tasks, data flow components, and other package objects for use in
multiple packages.
Building Packages Programmatically
Describes how to create, configure, and save Integration Services packages programmatically.
Running and Managing Packages Programmatically
Describes how to enumerate, run, and manage Integration Services packages programmatically.
Reference
Integration Services Error and Message Reference
Lists the predefined Integration Services error codes, together with their symbolic names and descriptions.
Related Sections
Troubleshooting Tools for Package Development
Describes the features and tools that Integration Services provides for troubleshooting packages during
development.
External Resources
CodePlex samples, Integration Services Product Samples, on www.codeplex.com/MSFTISProdSamples
See Also
SQL Server Integration Services
Integration Services Backward Compatibility
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This topic describes changes between versions of SQL Server Integration Services. It covers features that are no
longer available or are scheduled to be removed in a future release. It also describes changes to the product that
are known to break, or to change the behavior of, an existing application that includes Integration Services
functionality.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This quickstart how to use SQL Server Management Studio (SSMS) to connect to the SSIS Catalog database, and
then run the Integration Services Deployment Wizard to deploy an SSIS project to the SSIS Catalog.
SQL Server Management Studio is an integrated environment for managing any SQL infrastructure, from SQL
Server to SQL Database. For more info about SSMS, see SQL Server Management Studio (SSMS).
Prerequisites
Before you start, make sure you have the latest version of SQL Server Management Studio. To download SSMS,
see Download SQL Server Management Studio (SSMS).
The validation described in this article for deployment to Azure SQL Database requires SQL Server Data Tools
(SSDT) version 17.4 or later. To get the latest version of SSDT, see Download SQL Server Data Tools (SSDT).
An Azure SQL Database server listens on port 1433. If you're trying to connect to an Azure SQL Database server
from within a corporate firewall, this port must be open in the corporate firewall for you to connect successfully.
Supported platforms
You can use the information in this quickstart to deploy an SSIS project to the following platforms:
SQL Server on Windows.
Azure SQL Database. For more info about deploying and running packages in Azure, see Lift and shift SQL
Server Integration Services workloads to the cloud.
You cannot use the information in this quickstart to deploy an SSIS package to SQL Server on Linux. For more info
about running packages on Linux, see Extract, transform, and load data on Linux with SSIS.
SET T IN G SUGGEST ED VA L UE M O RE IN F O
Ser ver name The fully qualified server name If you're connecting to an Azure SQL
Database server, the name is in this
format:
<server_name>.database.windows.net
.
Login The server admin account This account is the account that you
specified when you created the
server.
Password The password for your server admin This password is the password that
account you specified when you created the
server.
Next steps
Consider other ways to deploy a package.
Deploy an SSIS package with Transact-SQL (SSMS)
Deploy an SSIS package with Transact-SQL (VS Code)
Deploy an SSIS package from the command prompt
Deploy an SSIS package with PowerShell
Deploy an SSIS package with C#
Run a deployed package. To run a package, you can choose from several tools and languages. For more info,
see the following articles:
Run an SSIS package with SSMS
Run an SSIS package with Transact-SQL (SSMS)
Run an SSIS package with Transact-SQL (VS Code)
Run an SSIS package from the command prompt
Run an SSIS package with PowerShell
Run an SSIS package with C#
Deploy an SSIS project from SSMS with Transact-SQL
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This quickstart demonstrates how to use SQL Server Management Studio (SSMS) to connect to the SSIS Catalog
database, and then use Transact-SQL statements to deploy an SSIS project to the SSIS Catalog.
SQL Server Management Studio is an integrated environment for managing any SQL infrastructure, from SQL
Server to SQL Database. For more info about SSMS, see SQL Server Management Studio (SSMS).
Prerequisites
Before you start, make sure you have the latest version of SQL Server Management Studio. To download SSMS,
see Download SQL Server Management Studio (SSMS).
Supported platforms
You can use the information in this quickstart to deploy an SSIS project to the following platforms:
SQL Server on Windows.
You cannot use the information in this quickstart to deploy an SSIS package to Azure SQL Database. The
catalog.deploy_project stored procedure expects path to the .ispac file in the local (on premises) file system.
For more info about deploying and running packages in Azure, see Lift and shift SQL Server Integration Services
workloads to the cloud.
You cannot use the information in this quickstart to deploy an SSIS package to SQL Server on Linux. For more info
about running packages on Linux, see Extract, transform, and load data on Linux with SSIS.
SET T IN G SUGGEST ED VA L UE M O RE IN F O
Login The server admin account This account is the account that you
specified when you created the
server.
Password The password for your server admin This password is the password that
account you specified when you created the
server.
Next steps
Consider other ways to deploy a package.
Deploy an SSIS package with SSMS
Deploy an SSIS package with Transact-SQL (VS Code)
Deploy an SSIS package from the command prompt
Deploy an SSIS package with PowerShell
Deploy an SSIS package with C#
Run a deployed package. To run a package, you can choose from several tools and languages. For more info,
see the following articles:
Run an SSIS package with SSMS
Run an SSIS package with Transact-SQL (SSMS)
Run an SSIS package with Transact-SQL (VS Code)
Run an SSIS package from the command prompt
Run an SSIS package with PowerShell
Run an SSIS package with C#
Deploy an SSIS project from Visual Studio Code with
Transact-SQL
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This quickstart demonstrates how to use Visual Studio Code to connect to the SSIS Catalog database, and then use
Transact-SQL statements to deploy an SSIS project to the SSIS Catalog.
Visual Studio Code is a code editor for Windows, macOS, and Linux that supports extensions, including the mssql
extension for connecting to Microsoft SQL Server, Azure SQL Database, or Azure Synapse Analytics. For more info
about VS Code, see Visual Studio Code.
Prerequisites
Before you start, make sure you have installed the latest version of Visual Studio Code and loaded the mssql
extension. To download these tools, see the following pages:
Download Visual Studio Code
mssql extension
Supported platforms
You can use the information in this quickstart to deploy an SSIS project to the following platforms:
SQL Server on Windows.
You cannot use the information in this quickstart to deploy an SSIS package to Azure SQL Database. The
catalog.deploy_project stored procedure expects path to the .ispac file in the local (on premises) file system.
For more info about deploying and running packages in Azure, see Lift and shift SQL Server Integration Services
workloads to the cloud.
You cannot use the information in this quickstart to deploy an SSIS package to SQL Server on Linux. For more info
about running packages on Linux, see Extract, transform, and load data on Linux with SSIS.
SET T IN G SUGGEST ED VA L UE M O RE IN F O
User name The server admin account This account is the account that you
specified when you created the
server.
Password (SQL Login) The password for your server admin This password is the password that
account you specified when you created the
server.
Enter a name for this profile A profile name, such as A saved profile name speeds your
mySSISSer ver connection on subsequent logins.
5. Press the ESC key to close the info message that informs you that the profile is created and connected.
6. Verify your connection in the status bar.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This quickstart demonstrates how to deploy an SSIS project from the command prompt by running the
Integration Services Deployment Wizard, ISDeploymentWizard.exe .
For more info about the Integration Services Deployment Wizard, see Integration Services Deployment Wizard.
Prerequisites
The validation described in this article for deployment to Azure SQL Database requires SQL Server Data Tools
(SSDT) version 17.4 or later. To get the latest version of SSDT, see Download SQL Server Data Tools (SSDT).
An Azure SQL Database server listens on port 1433. If you're trying to connect to an Azure SQL Database server
from within a corporate firewall, this port must be open in the corporate firewall for you to connect successfully.
Supported platforms
You can use the information in this quickstart to deploy an SSIS project to the following platforms:
SQL Server on Windows.
Azure SQL Database. For more info about deploying and running packages in Azure, see Lift and shift SQL
Server Integration Services workloads to the cloud.
You cannot use the information in this quickstart to deploy an SSIS package to SQL Server on Linux. For more info
about running packages on Linux, see Extract, transform, and load data on Linux with SSIS.
Next steps
Consider other ways to deploy a package.
Deploy an SSIS package with SSMS
Deploy an SSIS package with Transact-SQL (SSMS)
Deploy an SSIS package with Transact-SQL (VS Code)
Deploy an SSIS package with PowerShell
Deploy an SSIS package with C#
Run a deployed package. To run a package, you can choose from several tools and languages. For more info,
see the following articles:
Run an SSIS package with SSMS
Run an SSIS package with SSMS
Run an SSIS package with Transact-SQL (SSMS)
Run an SSIS package with Transact-SQL (VS Code)
Run an SSIS package from the command prompt
Run an SSIS package with PowerShell
Run an SSIS package with C#
Deploy an SSIS project with PowerShell
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This quickstart demonstrates how to use a PowerShell script to connect to a database server and deploy an SSIS
project to the SSIS Catalog.
Prerequisites
An Azure SQL Database server listens on port 1433. If you're trying to connect to an Azure SQL Database server
from within a corporate firewall, this port must be open in the corporate firewall for you to connect successfully.
Supported platforms
You can use the information in this quickstart to deploy an SSIS project to the following platforms:
SQL Server on Windows.
Azure SQL Database. For more info about deploying and running packages in Azure, see Lift and shift SQL
Server Integration Services workloads to the cloud.
You cannot use the information in this quickstart to deploy an SSIS package to SQL Server on Linux. For more info
about running packages on Linux, see Extract, transform, and load data on Linux with SSIS.
# Variables
$TargetInstanceName = "localhost\default"
$TargetFolderName = "Project1Folder"
$ProjectFilePath = "C:\Projects\Integration Services Project1\Integration Services
Project1\bin\Development\Integration Services Project1.ispac"
$ProjectName = "Integration Services Project1"
PowerShell script
Provide appropriate values for the variables at the top of the following script, and then run the script to deploy the
SSIS project.
NOTE
The following example uses Windows Authentication to deploy to a SQL Server on premises. To use SQL Server
authentication, replace the Integrated Security=SSPI; argument with User ID=<user name>;Password=<password>; . If
you're connecting to an Azure SQL Database server, you can't use Windows authentication.
# Variables
$SSISNamespace = "Microsoft.SqlServer.Management.IntegrationServices"
$TargetServerName = "localhost"
$TargetFolderName = "Project1Folder"
$ProjectFilePath = "C:\Projects\Integration Services Project1\Integration Services
Project1\bin\Development\Integration Services Project1.ispac"
$ProjectName = "Integration Services Project1"
Write-Host "Done."
Next steps
Consider other ways to deploy a package.
Deploy an SSIS package with SSMS
Deploy an SSIS package with Transact-SQL (SSMS)
Deploy an SSIS package with Transact-SQL (VS Code)
Deploy an SSIS package from the command prompt
Deploy an SSIS package with C#
Run a deployed package. To run a package, you can choose from several tools and languages. For more info,
see the following articles:
Run an SSIS package with SSMS
Run an SSIS package with Transact-SQL (SSMS)
Run an SSIS package with Transact-SQL (VS Code)
Run an SSIS package from the command prompt
Run an SSIS package with PowerShell
Run an SSIS package with C#
Deploy an SSIS project with C# code in a .NET app
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This quickstart demonstrates how to write C# code to connect to a database server and deploy an SSIS project.
To create a C# app, you can use Visual Studio, Visual Studio Code, or another tool of your choice.
Prerequisites
Before you start, make sure you have Visual Studio or Visual Studio Code installed. Download the free Community
edition of Visual Studio, or the free Visual Studio Code, from Visual Studio Downloads.
An Azure SQL Database server listens on port 1433. If you're trying to connect to an Azure SQL Database server
from within a corporate firewall, this port must be open in the corporate firewall for you to connect successfully.
Supported platforms
You can use the information in this quickstart to deploy an SSIS project to the following platforms:
SQL Server on Windows.
Azure SQL Database. For more info about deploying and running packages in Azure, see Lift and shift SQL
Server Integration Services workloads to the cloud.
You cannot use the information in this quickstart to deploy an SSIS package to SQL Server on Linux. For more info
about running packages on Linux, see Extract, transform, and load data on Linux with SSIS.
Add references
1. In Solution Explorer, right-click the References folder and select Add Reference . The Reference Manager
dialog box opens.
2. In the Reference Manager dialog box, expand Assemblies and select Extensions .
3. Select the following two references to add:
Microsoft.SqlServer.Management.Sdk.Sfc
Microsoft.SqlServer.Smo
4. Click the Browse button to add a reference to Microsoft.SqlSer ver.Management.IntegrationSer vices .
(This assembly is installed only in the global assembly cache (GAC).) The Select the files to reference dialog
box opens.
5. In the Select the files to reference dialog box, navigate to the GAC folder that contains the assembly.
Typically this folder is
C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Management.IntegrationServices\14.0.0.0__89845dcd8080cc91 .
6. Select the assembly (that is, the .dll file) in the folder and click Add .
7. Click OK to close the Reference Manager dialog box and add the three references. To make sure the
references are there, check the References list in Solution Explorer.
NOTE
The following example uses Windows Authentication. To use SQL Server authentication, replace the
Integrated Security=SSPI; argument with User ID=<user name>;Password=<password>; . If you're connecting to an
Azure SQL Database server, you can't use Windows authentication.
using Microsoft.SqlServer.Management.IntegrationServices;
using System;
using System.Data.SqlClient;
using System.IO;
namespace deploy_ssis_project
{
class Program
{
static void Main(string[] args)
{
// Variables
string targetServerName = "localhost";
string targetFolderName = "Project1Folder";
string projectName = "Integration Services Project1";
string projectFilePath = @"C:\Projects\Integration Services Project1\Integration Services
Project1\bin\Development\Integration Services Project1.ispac";
Console.WriteLine("Done.");
}
}
}
Next steps
Consider other ways to deploy a package.
Deploy an SSIS package with SSMS
Deploy an SSIS package with Transact-SQL (SSMS)
Deploy an SSIS package with Transact-SQL (VS Code)
Deploy an SSIS package from the command prompt
Deploy an SSIS package with PowerShell
Run a deployed package. To run a package, you can choose from several tools and languages. For more info,
see the following articles:
Run an SSIS package with SSMS
Run an SSIS package with Transact-SQL (SSMS)
Run an SSIS package with Transact-SQL (VS Code)
Run an SSIS package from the command prompt
Run an SSIS package with PowerShell
Run an SSIS package with C#
Run an SSIS package with SQL Server Management
Studio (SSMS)
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This quickstart demonstrates how to use SQL Server Management Studio (SSMS) to connect to the SSIS Catalog
database, and then run an SSIS package stored in the SSIS Catalog from Object Explorer in SSMS.
SQL Server Management Studio is an integrated environment for managing any SQL infrastructure, from SQL
Server to SQL Database. For more info about SSMS, see SQL Server Management Studio (SSMS).
Prerequisites
Before you start, make sure you have the latest version of SQL Server Management Studio (SSMS). To download
SSMS, see Download SQL Server Management Studio (SSMS).
An Azure SQL Database server listens on port 1433. If you're trying to connect to an Azure SQL Database server
from within a corporate firewall, this port must be open in the corporate firewall for you to connect successfully.
Supported platforms
You can use the information in this quickstart to run an SSIS package on the following platforms:
SQL Server on Windows.
Azure SQL Database. For more info about deploying and running packages in Azure, see Lift and shift
SQL Server Integration Services workloads to the cloud.
You cannot use the information in this quickstart to run an SSIS package on Linux. For more info about running
packages on Linux, see Extract, transform, and load data on Linux with SSIS.
SET T IN G SUGGEST ED VA L UE M O RE IN F O
Ser ver name The fully qualified server name If you're connecting to an Azure SQL
Database server, the name is in this
format:
<server_name>.database.windows.net
.
Login The server admin account This account is the account that you
specified when you created the
server.
Password The password for your server admin This password is the password that
account you specified when you created the
server.
Run a package
1. In Object Explorer, select the package that you want to run.
2. Right-click and select Execute . The Execute Package dialog box opens.
3. Configure the package execution by using the settings on the Parameters , Connection Managers , and
Advanced tabs in the Execute Package dialog box.
4. Click OK to run the package.
Next steps
Consider other ways to run a package.
Run an SSIS package with Transact-SQL (SSMS)
Run an SSIS package with Transact-SQL (VS Code)
Run an SSIS package from the command prompt
Run an SSIS package with PowerShell
Run an SSIS package with C#
Run an SSIS package from SSMS with Transact-SQL
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This quickstart demonstrates how to use SQL Server Management Studio (SSMS) to connect to the SSIS Catalog
database, and then use Transact-SQL statements to run an SSIS package stored in the SSIS Catalog.
SQL Server Management Studio is an integrated environment for managing any SQL infrastructure, from SQL
Server to SQL Database. For more info about SSMS, see SQL Server Management Studio (SSMS).
Prerequisites
Before you start, make sure you have the latest version of SQL Server Management Studio (SSMS). To download
SSMS, see Download SQL Server Management Studio (SSMS).
An Azure SQL Database server listens on port 1433. If you're trying to connect to an Azure SQL Database server
from within a corporate firewall, this port must be open in the corporate firewall for you to connect successfully.
Supported platforms
You can use the information in this quickstart to run an SSIS package on the following platforms:
SQL Server on Windows.
Azure SQL Database. For more info about deploying and running packages in Azure, see Lift and shift SQL
Server Integration Services workloads to the cloud.
You cannot use the information in this quickstart to run an SSIS package on Linux. For more info about running
packages on Linux, see Extract, transform, and load data on Linux with SSIS.
Ser ver name The fully qualified server name If you're connecting to an Azure SQL
Database server, the name is in this
format:
<server_name>.database.windows.net
.
Login The server admin account This account is the account that you
specified when you created the
server.
Password The password for your server admin This password is the password that
account you specified when you created the
server.
Run a package
Run the following Transact-SQL code to run an SSIS package.
1. In SSMS, open a new query window and paste the following code. (This code is the code generated by the
Script option in the Execute Package dialog box in SSMS.)
2. Update the parameter values in the catalog.create_execution stored procedure for your system.
3. Make sure that SSISDB is the current database.
4. Run the script.
5. In Object Explorer, refresh the contents of SSISDB if necessary and check for the project that you
deployed.
Declare @execution_id bigint
EXEC [SSISDB].[catalog].[create_execution] @package_name=N'Package.dtsx',
@execution_id=@execution_id OUTPUT,
@folder_name=N'Deployed Projects',
@project_name=N'Integration Services Project1',
@use32bitruntime=False,
@reference_id=Null
Select @execution_id
DECLARE @var0 smallint = 1
EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id,
@object_type=50,
@parameter_name=N'LOGGING_LEVEL',
@parameter_value=@var0
EXEC [SSISDB].[catalog].[start_execution] @execution_id
GO
Next steps
Consider other ways to run a package.
Run an SSIS package with SSMS
Run an SSIS package with Transact-SQL (VS Code)
Run an SSIS package from the command prompt
Run an SSIS package with PowerShell
Run an SSIS package with C#
Run an SSIS package from Visual Studio Code with
Transact-SQL
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This quickstart demonstrates how to use Visual Studio Code to connect to the SSIS Catalog database, and then
use Transact-SQL statements to run an SSIS package stored in the SSIS Catalog.
Visual Studio Code is a code editor for Windows, macOS, and Linux that supports extensions, including the
mssql extension for connecting to Microsoft SQL Server, Azure SQL Database, or Azure Synapse Analytics. For
more info about VS Code, see Visual Studio Code.
Prerequisites
Before you start, make sure you have installed the latest version of Visual Studio Code and loaded the mssql
extension. To download these tools, see the following pages:
Download Visual Studio Code
mssql extension
Supported platforms
You can use the information in this quickstart to run an SSIS package on the following platforms:
SQL Server on Windows.
Azure SQL Database. For more info about deploying and running packages in Azure, see Lift and shift SQL
Server Integration Services workloads to the cloud.
You cannot use the information in this quickstart to run an SSIS package on Linux. For more info about running
packages on Linux, see Extract, transform, and load data on Linux with SSIS.
IMPORTANT
Before continuing, make sure that you have your server, database, and login information ready. If you change your focus
from Visual Studio Code after you begin entering the connection profile information, you have to restart creating the
connection profile.
SET T IN G SUGGEST ED VA L UE M O RE IN F O
Ser ver name The fully qualified server name If you're connecting to an Azure SQL
Database server, the name is in this
format:
<server_name>.database.windows.net
.
User name The server admin account This account is the account that you
specified when you created the
server.
Password (SQL Login) The password for your server admin This password is the password that
account you specified when you created the
server.
Enter a name for this profile A profile name, such as A saved profile name speeds your
mySSISSer ver connection on subsequent logins.
5. Press the ESC key to close the info message that informs you that the profile is created and connected.
6. Verify your connection in the status bar.
Next steps
Consider other ways to run a package.
Run an SSIS package with SSMS
Run an SSIS package with Transact-SQL (SSMS)
Run an SSIS package from the command prompt
Run an SSIS package with PowerShell
Run an SSIS package with C#
Run an SSIS package from the command prompt
with DTExec.exe
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This quickstart demonstrates how to run an SSIS package from the command prompt by running DTExec.exe
with the appropriate parameters.
NOTE
The method described in this article has not been tested with packages deployed to an Azure SQL Database server.
Supported platforms
You can use the information in this quickstart to run an SSIS package on the following platforms:
SQL Server on Windows.
The method described in this article has not been tested with packages deployed to an Azure SQL Database
server. For more info about deploying and running packages in Azure, see Lift and shift SQL Server Integration
Services workloads to the cloud.
You cannot use the information in this quickstart to run an SSIS package on Linux. For more info about running
packages on Linux, see Extract, transform, and load data on Linux with SSIS.
With the parameter values used in the following example, the program runs the package in the specified folder
path on the SSIS server - that is, the server that hosts the SSIS Catalog database (SSISDB). The /Server
parameter provides the server name. The program connects as the current user with Windows Integrated
Authentication. To use SQL Authentication, specify the /User and Password parameters with appropriate values.
1. Open a Command Prompt window.
2. Run DTExec.exe and provide values at least for the ISServer and the Server parameters, as shown in
the following example:
Next steps
Consider other ways to run a package.
Run an SSIS package with SSMS
Run an SSIS package with Transact-SQL (SSMS)
Run an SSIS package with Transact-SQL (VS Code)
Run an SSIS package with PowerShell
Run an SSIS package with C#
Run an SSIS package with PowerShell
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This quickstart demonstrates how to use a PowerShell script to connect to a database server and run an SSIS
package.
Prerequisites
An Azure SQL Database server listens on port 1433. If you're trying to connect to an Azure SQL Database server
from within a corporate firewall, this port must be open in the corporate firewall for you to connect successfully.
Supported platforms
You can use the information in this quickstart to run an SSIS package on the following platforms:
SQL Server on Windows.
SSIS integration runtime (IR) in Azure Data Factory (ADF), where SSIS catalog (SSISDB) is hosted by Azure
SQL Managed Instance (MI). For more info about deploying and running packages in Azure, see Lift and
shift SQL Server Integration Services workloads to the cloud.
You cannot use the information in this quickstart to run an SSIS package on Linux. For more info about running
packages on Linux, see Extract, transform, and load data on Linux with SSIS.
PowerShell script
Provide appropriate values for the variables at the top of the following script, and then run the script to run the
SSIS package.
NOTE
The following example uses Windows Authentication. To use SQL Server authentication, replace the
Integrated Security=SSPI; argument with User ID=<user name>;Password=<password>; . If you're connecting to an
Azure SQL Database server, you can't use Windows authentication.
# Variables
$SSISNamespace = "Microsoft.SqlServer.Management.IntegrationServices"
$TargetServerName = "localhost"
$TargetFolderName = "Project1Folder"
$ProjectName = "Integration Services Project1"
$PackageName = "Package.dtsx"
Write-Host "Done."
Next steps
Consider other ways to run a package.
Run an SSIS package with SSMS
Run an SSIS package with Transact-SQL (SSMS)
Run an SSIS package with Transact-SQL (VS Code)
Run an SSIS package from the command prompt
Run an SSIS package with C#
Run an SSIS package with C# code in a .NET app
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This quickstart demonstrates how to write C# code to connect to a database server and run an SSIS package.
You can use Visual Studio, Visual Studio Code, or another tool of your choice to create a C# app.
Prerequisites
Before you start, make sure you have Visual Studio or Visual Studio Code installed. Download the free
Community edition of Visual Studio, or the free Visual Studio Code, from Visual Studio Downloads.
An Azure SQL Database server listens on port 1433. If you're trying to connect to an Azure SQL Database server
from within a corporate firewall, this port must be open in the corporate firewall for you to connect successfully.
Add references
1. In Solution Explorer, right-click the References folder and select Add Reference . The Reference Manager
dialog box opens.
2. In the Reference Manager dialog box, expand Assemblies and select Extensions .
3. Select the following two references to add:
Microsoft.SqlServer.Management.Sdk.Sfc
Microsoft.SqlServer.Smo
4. Click the Browse button to add a reference to Microsoft.SqlSer ver.Management.IntegrationSer vices .
(This assembly is installed only in the global assembly cache (GAC).) The Select the files to reference
dialog box opens.
5. In the Select the files to reference dialog box, navigate to the GAC folder that contains the assembly.
Typically this folder is
C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Management.IntegrationServices\14.0.0.0__89845dcd8080cc91
.
6. Select the assembly (that is, the .dll file) in the folder and click Add .
7. Click OK to close the Reference Manager dialog box and add the three references. To make sure the
references are there, check the References list in Solution Explorer.
NOTE
The following example uses Windows Authentication. To use SQL Server authentication, replace the
Integrated Security=SSPI; argument with User ID=<user name>;Password=<password>; . If you're connecting to an
Azure SQL Database server, you can't use Windows authentication.
using Microsoft.SqlServer.Management.IntegrationServices;
using System.Data.SqlClient;
namespace run_ssis_package
{
class Program
{
static void Main(string[] args)
{
// Variables
string targetServerName = "localhost";
string folderName = "Project1Folder";
string projectName = "Integration Services Project1";
string packageName = "Package.dtsx";
}
}
}
Next steps
Consider other ways to run a package.
Run an SSIS package with SSMS
Run an SSIS package with Transact-SQL (SSMS)
Run an SSIS package with Transact-SQL (VS Code)
Run an SSIS package from the command prompt
Run an SSIS package with PowerShell
Lift and shift SQL Server Integration Services
workloads to the cloud
11/2/2020 • 7 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can now move your SQL Server Integration Services (SSIS) projects, packages, and workloads to the Azure
cloud. Deploy, run, and manage SSIS projects and packages in the SSIS Catalog (SSISDB) on Azure SQL
Database or SQL Managed Instance with familiar tools such as SQL Server Management Studio (SSMS).
Benefits
Moving your on-premises SSIS workloads to Azure has the following potential benefits:
Reduce operational costs and reduce the burden of managing infrastructure that you have when you run
SSIS on-premises or on Azure virtual machines.
Increase high availability with the ability to specify multiple nodes per cluster, as well as the high
availability features of Azure and of Azure SQL Database.
Increase scalability with the ability to specify multiple cores per node (scale up) and multiple nodes per
cluster (scale out).
LO C AT IO N STO RA GE RUN T IM E SC A L A B IL IT Y
On premises SQL Server SSIS runtime hosted by SSIS Scale Out (in SQL
SQL Server Server 2017 and later)
On Azure SQL Database or SQL Azure-SSIS Integration Scaling options for the
Managed Instance Runtime, a component of Azure-SSIS Integration
Azure Data Factory Runtime
NOTE
The Azure-SSIS Integration Runtime is not yet available in all Azure regions. For info about the supported regions, see
Products available by region - Microsoft Azure.
Scale up and out . When you provision the Azure-SSIS IR, you can scale up and scale out by specifying values
for the following options:
The node size (including the number of cores) and the number of nodes in the cluster.
The existing instance of Azure SQL Database to host the SSIS Catalog Database (SSISDB), and the service
tier for the database.
The maximum parallel executions per node.
Improve performance . For more info, see Configure the Azure-SSIS Integration Runtime for high
performance.
Reduce costs . To reduce costs, run the Azure-SSIS IR only when you need it. For more info, see How to
schedule starting and stopping of an Azure SSIS integration runtime.
Design packages
You continue to design and build packages on-premises in SSDT, or in Visual Studio with SSDT installed.
Connect to data sources
To connect to on-premises data sources from the cloud with Windows authentication , see Connect to data
sources and file shares with Windows Authentication from SSIS packages in Azure.
To connect to files and file shares, see Open and save files on premises and in Azure with SSIS packages
deployed in Azure.
Available SSIS components
When you provision an instance of SQL Database to host SSISDB, the Azure Feature Pack for SSIS and the
Access Redistributable are also installed. These components provide connectivity to various Azure data
sources and to Excel and Access files, in addition to the data sources supported by the built-in components.
You can also install additional components - for example, you can install a driver that's not installed by default.
For more info, see Customize setup for the Azure-SSIS integration runtime.
If you have an Enterprise Edition license, additional components are available. For more info, see Provision
Enterprise Edition for the Azure-SSIS Integration Runtime.
If you're an ISV, you can update the installation of your licensed components to make them available on Azure.
For more info, see Install paid or licensed custom components for the Azure-SSIS integration runtime.
Transaction support
With SQL Server on premises and on Azure virtual machines, you can use Microsoft Distributed Transaction
Coordinator (MSDTC) transactions. To configure MSDTC on each node of the Azure-SSIS IR, use the custom
setup capability. For more info, see Custom setup for the Azure-SSIS integration runtime.
With Azure SQL Database, you can only use elastic transactions. For more info, see Distributed transactions
across cloud databases.
Monitor packages
To monitor running packages, use the following reporting options in SSMS.
Right-click SSISDB , and then select Active Operations to open the Active Operations dialog box.
Select a package in Object Explorer, right-click and select Repor ts , then Standard Repor ts , then All
Executions .
To monitor the Azure-SSIS Integration Runtime, see Monitor the Azure-SSIS integration runtime.
Schedule packages
To schedule the execution of packages deployed in Azure, you can use a variety of tools. For more info, see
Schedule the execution of SQL Server Integration Services (SSIS) packages deployed in Azure.
Next steps
To get started with SSIS workloads on Azure, see the following articles:
Tutorial: Deploy and run a SQL Server Integration Services (SSIS) package in Azure
Provision the Azure-SSIS Integration Runtime in Azure Data Factory
Tutorial: Deploy and run a SQL Server Integration
Services (SSIS) package in Azure
11/2/2020 • 7 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This tutorial shows you how to deploy a SQL Server Integration Services (SSIS) project to the SSIS Catalog in
Azure SQL Database, run a package in the Azure-SSIS Integration Runtime, and monitor the running package.
Prerequisites
Before you start, make sure you have version 17.2 or later of SQL Server Management Studio. To download the
latest version of SSMS, see Download SQL Server Management Studio (SSMS).
Also make sure that you have set up the SSISDB database in Azure and provisioned the Azure-SSIS Integration
Runtime. For info about how to provision SSIS on Azure, see Deploy SQL Server Integration Services packages to
Azure.
IMPORTANT
An Azure SQL Database server listens on port 1433. If you are attempting to connect to an Azure SQL Database server
from within a corporate firewall, this port must be open in the corporate firewall for you to connect successfully.
Ser ver name The fully qualified server name The name should be in this format:
mysqldbser ver.database.window
s.net . If you need the server name,
see Connect to the SSISDB Catalog
database on Azure.
Login The server admin account The account that you specified when
you created the server.
Password The password for your server admin The password that you specified
account when you created the server.
3. Connect to the SSISDB database . Select Options to expand the Connect to Ser ver dialog box. In the
expanded Connect to Ser ver dialog box, select the Connection Proper ties tab. In the Connect to
database field, select or enter SSISDB .
4. Then select Connect . The Object Explorer window opens in SSMS.
5. In Object Explorer, expand Integration Ser vices Catalogs and then expand SSISDB to view the objects in
the SSIS Catalog database.
NOTE
Deployment to Azure only supports the project deployment model.
NOTE
If you get the error message There is no active worker agent. (.Net SqlClient Data Provider) , make sure the
Azure-SSIS Integration Runtime is running. This error occurs if you try to deploy while the Azure-SSIS IR is in a
stopped state.
5. After the deployment process is complete, the Results page opens. This page displays the success or failure
of each action.
If the action failed, select Failed in the Result column to display an explanation of the error.
Optionally, select Save Repor t... to save the results to an XML file.
Select Close to exit the wizard.
if ($folders.Count -gt 0)
{
foreach ($filefolder in $folders)
{
Write-Host "Creating Folder " + $filefolder.Name + " ..."
Run a package
1. In Object Explorer in SSMS, select the package that you want to run.
2. Right-click and select Execute to open the Execute Package dialog box.
3. In the Execute Package dialog box, configure the package execution by using the settings on the
Parameters , Connection Managers , and Advanced tabs.
4. Select OK to run the package.
Next steps
Learn how to schedule package execution. For more info, see Schedule SSIS package execution on Azure
Connect to the SSIS Catalog (SSISDB) in Azure
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Find the connection information you need to connect to the SSIS Catalog (SSISDB) hosted on an Azure SQL
Database server. You need the following items to connect:
fully qualified server name
database name
login information
IMPORTANT
You can't create the SSISDB Catalog database on Azure SQL Database at this time independently of creating the Azure-SSIS
Integration Runtime in Azure Data Factory. The Azure-SSIS IR is the runtime environment that runs SSIS packages on Azure.
For a walkthrough of the process, see Deploy and run an SSIS package in Azure.
Prerequisites
Before you start, make sure you have version 17.2 or later of SQL Server Management Studio (SSMS). If the
SSISDB Catalog database is hosted on SQL Managed Instance, make sure you have version 17.6 or later of SSMS.
To download the latest version of SSMS, see Download SQL Server Management Studio (SSMS).
4. If you have forgotten the login information for the SQL Database server, navigate to the SQL Database
server page. There you can view the server admin name and, if necessary, reset the password.
Ser ver name The fully qualified server name The name should be in this format:
mysqldbser ver.database.window
s.net .
Login The server admin account This is the account that you specified
when you created the server.
Password The password for your server admin This is the password that you
account specified when you created the
server.
3. Connect to the SSISDB database . Select Options to expand the Connect to Ser ver dialog box. In the
expanded Connect to Ser ver dialog box, select the Connection Proper ties tab. In the Connect to
database field, select or enter SSISDB .
IMPORTANT
If you don't select SSISDB when you connect, you may not see the SSIS Catalog in Object Explorer.
4. Then select Connect .
5. In Object Explorer, expand Integration Ser vices Catalogs and then expand SSISDB to view the objects in
the SSIS Catalog database.
Next steps
Deploy a package. For more info, see Deploy an SSIS project with SQL Server Management Studio (SSMS).
Run a package. For more info, see Run an SSIS package with SQL Server Management Studio (SSMS).
Schedule a package. For more info, see Schedule SSIS packages in Azure
Validate SQL Server Integration Services (SSIS)
packages deployed to Azure
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
When you deploy a SQL Server Integration Services (SSIS) project to the SSIS Catalog (SSISDB) on an Azure
server, the Package Deployment Wizard adds an additional validation step after the Review page. This validation
step checks the packages in the project for known issues that may prevent the packages from running as expected
in the Azure SSIS Integration Runtime. Then the wizard displays any applicable warnings on the Validate page.
IMPORTANT
The validation described in this article occurs when you deploy a project with SQL Server Data Tools (SSDT) version 17.4 or
later. To get the latest version of SSDT, see Download SQL Server Data Tools (SSDT).
For more info about the Package Deployment Wizard, see Deploy Integration Services (SSIS) Projects and
Packages.
W IN DO W S
C O N N EC T IO N A UT H EN T IC AT IO P RO VIDER O R
M A N A GER N F IL E PAT H UN C PAT H H O ST N A M E DRIVER
Ftp ✓
Wmi ✓
Next steps
To learn how to schedule package execution on Azure, see Schedule SSIS packages in Azure.
Run SQL Server Integration Services (SSIS) packages
deployed in Azure
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can run SSIS packages deployed to the SSISDB Catalog on an Azure SQL Database server by choosing one of
the methods described in this article. You can run a package directly, or run a package as part of an Azure Data
Factory pipeline. For an overview about SSIS on Azure, see Deploy and run SSIS packages in Azure.
Run a package directly
Run with SSMS
Run with stored procedures
Run with script or code
Run a package as part of an Azure Data Factory pipeline
Run with the Execute SSIS Package activity
Run with the Stored Procedure activity
NOTE
Running a package with dtexec.exe has not been tested with packages deployed to Azure.
Next steps
Learn about options for scheduling SSIS packages deployed to Azure. For more info, see Schedule SSIS packages
in Azure.
Schedule the execution of SQL Server Integration
Services (SSIS) packages deployed in Azure
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can schedule the execution of SSIS packages deployed to the SSISDB Catalog on an Azure SQL Database
server by choosing one of the methods described in this article. You can schedule a package directly, or schedule a
package indirectly as part of an Azure Data Factory pipeline. For an overview about SSIS on Azure, see Lift and
shift SQL Server Integration Services workloads to the cloud.
Schedule a package directly
Schedule with the Schedule option in SQL Server Management Studio (SSMS)
SQL Database elastic jobs
SQL Server Agent
Schedule a package indirectly as part of an Azure Data Factory pipeline
-- Add a job step to create/start SSIS package execution using SSISDB catalog stored procedures
EXEC jobs.sp_add_jobstep @job_name='ExecutePackageJob',
@command=N'DECLARE @exe_id bigint
EXEC [SSISDB].[catalog].[create_execution]
@folder_name=N''folderName'', @project_name=N''projectName'',
@package_name=N''packageName'', @use32bitruntime=0,
@runinscaleout=1, @useanyworker=1,
@execution_id=@exe_id OUTPUT
EXEC [SSISDB].[catalog].[start_execution] @exe_id, @retry_count=0',
@credential_name='YourDBScopedCredentials',
@target_group_name='TargetGroup'
-- Add the SSISDB database on your Azure SQL Database as a linked server to your SQL Server on
premises
EXEC sp_addlinkedserver
@server='myLinkedServer', -- Name your linked server
@srvproduct='',
@provider='sqlncli', -- Use SQL Server native client
@datasrc='<server_name>.database.windows.net', -- Add your Azure SQL Database server endpoint
@location='',
@provstr='',
@catalog='SSISDB' -- Add SSISDB as the initial catalog
For more info, see Create Linked Servers and Linked Servers.
Create a SQL Server Agent job
To schedule a package with SQL Server Agent on premises, create a job with a job step that calls the SSIS Catalog
stored procedures [catalog].[create_execution] and then [catalog].[start_execution] . For more info, see SQL
Server Agent Jobs for Packages.
1. In SQL Server Management Studio, connect to the on-premises SQL Server database on which you want to
create the job.
2. Right-click on the SQL Ser ver Agent node, select New , and then select Job to open the New Job dialog
box.
3. In the New Job dialog box, select the Steps page, and then select New to open the New Job Step dialog
box.
4. In the New Job Step dialog box, select SSISDB as the Database.
5. In the Command field, enter a Transact-SQL script similar to the script shown in the following example:
-- T-SQL script to create and start SSIS package execution using SSISDB stored procedures
DECLARE @return_value int, @exe_id bigint
Next steps
Review the options for running SSIS packages deployed to Azure. For more info, see Run SSIS packages in Azure.
Schedule the execution of SSIS packages deployed in
Azure with SQL Server Management Studio (SSMS)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can use SQL Server Management Studio (SSMS) to schedule SSIS packages deployed to Azure SQL Database.
SQL Server on premises and SQL Managed Instance have SQL Server Agent and Managed Instance Agent
respectively as a first-class SSIS job scheduler. SQL Database, on the other hand, does not have a built-in first-class
SSIS job scheduler. The SSMS feature described in this article provides a familiar user interface that's similar to SQL
Server Agent for scheduling packages deployed to SQL Database.
If you're using SQL Database to host the SSIS catalog, SSISDB , you can use this SSMS feature to generate the Data
Factory pipelines, activities, and triggers required to schedule SSIS packages. Later you can optionally edit and
extend these objects in Data Factory.
When you use SSMS to schedule a package, SSIS automatically creates three new Data Factory objects, with names
based on the name of the selected package and the timestamp. For example, if the name of the SSIS package is
MyPackage , SSMS creates new Data Factory objects similar to the following:
O B JEC T NAME
Pipeline Pipeline_MyPackage_2018-05-08T09_00_00Z
Trigger Trigger_MyPackage_2018-05-08T09_00_00Z
Prerequisites
The feature described in this article requires SQL Server Management Studio version 17.7 or higher. To get the
latest version of SSMS, see Download SQL Server Management Studio (SSMS).
3. On the Package page of the New Schedule dialog box, select optional run-time settings and a run-time
environment.
4. On the Schedule page of the New Schedule dialog box, provide the schedule settings such as frequency,
time of day, and duration.
5. After you finish creating the job in the New Schedule dialog box, a confirmation appears to remind you
about the new Data Factory objects that SSMS is going to create. If you select Yes in confirmation dialog
box, the new Data Factory pipeline opens in the Azure portal for you to review and customize.
6. To customize the scheduling trigger, select New/Edit from the Trigger menu.
The Edit Trigger blade opens for you to customize the scheduling options.
Next steps
To learn about other methods for scheduling an SSIS package, see Schedule the execution of an SSIS package on
Azure.
To learn more about Azure Data Factory pipelines, activities, and triggers, see the following articles:
Pipelines and activities in Azure Data Factory
Pipeline execution and triggers in Azure Data Factory
Migrate on-premises SSIS workloads to SSIS in ADF
11/2/2020 • 2 minutes to read • Edit Online
This article lists process and tools that can help migrate SQL Server Integration Services (SSIS) workloads to SSIS
in ADF.
Migration overview highlights overall migration process of your ETL workloads from on-premises SSIS to SSIS in
ADF.
The migration process consists of two phases: Assessment and Migration.
Assessment
Data Migration Assistant (DMA) is a freely downloadable tool for this purpose that can be installed and executed
locally. DMA assessment project of type Integration Services can be created to assess SSIS packages in batches and
identify compatibility issues.
Get Database Migration Assistant, and perform package assessment.
Migration
Depending on the storage types of source SSIS packages and the migration destination of database workloads, the
steps to migrate SSIS packages and SQL Server Agent jobs that schedule SSIS package executions may vary. For
more information, see this page.
Next steps
Migrate SSIS packages to Azure SQL Managed Instance.
Migrate SSIS jobs to Azure Data Factory (ADF) with SQL Server Management Studio (SSMS).
Install Integration Services (SSIS)
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SQL Server provides a single setup program to install any or all of its components, including Integration Services.
Use Setup to install Integration Services with or without other SQL Server components on a single computer.
This article highlights important considerations that you should know before you install Integration Services.
Information in this article helps you evaluate your installation options so that your selection results in a successful
installation.
NOTE
Some SQL Server components that you can select for installation on the Feature Selection page of the Setup Wizard
install a partial subset of Integration Services components. These components are useful for specific tasks, but the
functionality of Integration Services is limited. For example, the Database Engine Ser vices option installs the Integration
Services components required for the SQL Server Import and Export Wizard. To ensure a complete installation of
Integration Services, you must select Integration Ser vices on the Feature Selection page.
Next steps
Installing Integration Services Versions Side by Side
What's New in Integration Services in SQL Server 2016
What's New in Integration Services in SQL Server 2017
Installing Integration Services Versions Side by Side
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can install
SQL Server 2019 (15.x) Integration Services (SSIS) side-by-side with earlier versions of SSIS. This topic describes
some limitations of side-by-side installations.
or
or
When you add an existing package to an existing project, the package is converted to the format targeted by the
project .
Running packages
You can use the SQL Server 2019 (15.x) version of the dtexec utility or of SQL Server Agent to run Integration
Services packages created by earlier versions of the development tools. When these SQL Server 2019 (15.x) tools
load a package that was developed in an earlier version of the development tools, the tool temporarily converts the
package in memory to the package format that SQL Server 2017 Integration Services (SSIS) uses. If the package
has issues that prevent a successful conversion, the SQL Server 2019 (15.x) tool can't run the package until those
issues are resolved. For more info, see Upgrade Integration Services Packages.
Upgrade Integration Services
11/2/2020 • 9 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
If SQL Server 2008 Integration Services (SSIS) or later is currently installed on your computer, you can upgrade to
SQL Server 2017 Integration Services (SSIS).
When you upgrade to SQL Server 2017 Integration Services (SSIS) on a machine that has one of these earlier
versions of Integration Services installed, SQL Server 2017 Integration Services (SSIS) is installed side-by-side with
the earlier version.
With this side-by-side install, multiple versions of dtexec utility are installed. To ensure that you run the correct
version of the utility, at the command prompt run the utility by entering the full path (<drive>:\Program
Files\Microsoft SQL Server\<version>\DTS\Binn). For more information about dtexec, see dtexec Utility.
NOTE
In previous versions of SQL Server, by default when you installed SQL Server all users in the Users group had access to the
Integration Services service. When you install SQL Server 2019 (15.x), users do not have access to the Integration Services
service. The service is secure by default. After SQL Server 2019 (15.x) is installed, the SQL Server administrator must run the
DCOM Configuration tool (Dcomcnfg.exe) to grant specific users access to the Integration Services service. For more
information, see Integration Services Service (SSIS Service).
NOTE
Support for migrating or running Data Transformation Services (DTS) packages has been discontinued in SQL Server 2012.
The following DTS functionality has been discontinued.
DTS runtime
DTS API
Package Migration Wizard for migrating DTS packages to the next version of Integration Services
Support for DTS package maintenance in SQL Server Management Studio
Execute DTS 2000 Package task
Upgrade Advisor scan of DTS packages.
For information about other discontinued features, see Discontinued Integration Services Functionality in SQL Server 2016.
NOTE
Although the data moves to a different system table, the upgrade process does not migrate packages to the
new format.
Moves folder metadata from the msdb.sysdtsfolders90 system table to the msdb.sysssisfolders
system table.
Moves log data from the msdb.sysdtslog90 system table to the msdb.sysssislog system table.
Removes the msdb.sysdts*90 system tables and the stored procedures that are used to access them after
moving the data to the new msdb.sysssis* tables. However, upgrade replaces the sysdtslog90 table with a
view that is also named sysdtslog90. This new sysdtslog90 view exposes the new msdb.sysssislog system
table. This ensures that reports based on the log table continue to run without interruption.
To control access to packages, creates three new fixed database-level roles: db_ssisadmin, db_ssisltduser, and
db_ssisoperator. The SQL Server 2005 (9.x)Integration Services roles of db_dtsadmin, db_dtsltduser, and
db_dtsoperator are not removed, but are made members of the corresponding new roles.
If the SSIS package store (that is, the file system location managed by the Integration Services service) is the
default location under \SQL Ser ver\90 , \SQL Ser ver\100 , \SQL Ser ver\110 , or \SQL Ser ver\120
moves those packages to the new default location under \SQL Ser ver\130 .
Updates the Integration Services service configuration file to point to the upgraded instance of the Database
Engine.
What the Upgrade Process Does Not Do
The upgrade process does not do the following tasks:
Does not remove the SQL Server 2008 Integration Services (SSIS) or later service.
Does not migrate existing Integration Services packages to the new package format that SQL Server 2019
(15.x) uses. For information about how to migrate packages, see Upgrade Integration Services Packages.
Does not move packages from file system locations, other than the default location, that have been added to
the service configuration file. If you have previously edited the service configuration file to add more file
system folders, packages that are stored in those folders will not be moved to a new location.
In SQL Server Agent job steps that call the dtexec utility (dtexec.exe) directly, does not update the file
system path for the dtexec utility. You have to edit these job steps manually to update the file system path
to specify the SQL Server 2019 (15.x) location for the dtexec utility.
What You Can Do After Upgrading
After the upgrade process finishes, you can do the following tasks:
Run SQL Server Agent jobs that run packages.
Use Management Studio to manage Integration Services packages that are stored in an instance of SQL
Server 2008, SQL Server 2008 R2, SQL Server 2012 (11.x), or SQL Server 2014 (12.x). You need to modify
the service configuration file to add the instance of SQL Server 2008, SQL Server 2008 R2, SQL Server 2012
(11.x), or SQL Server 2014 (12.x) to the list of locations managed by the service.
NOTE
Early versions of Management Studio cannot connect to SQL Server 2017 Integration Services (SSIS) Service.
Identify the version of packages in the msdb.dbo.sysssispackages system table by checking the value in the
packageformat column. The table has a packageformat column that identifies the version of each package. A
value of 3 indicates a SQL Server 2008 Integration Services (SSIS) package. Until you migrate packages to
the new package format, the value in the packageformat column does not change.
You cannot use the SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 (11.x), or SQL Server 2014
(12.x) tools to design, run, or manage Integration Services packages. The SQL Server 2008, SQL Server 2008
R2, SQL Server 2012 (11.x), or SQL Server 2014 (12.x) tools include the respective versions of SQL Server
Data Tools (SSDT), the SQL Server Import and Export Wizard, and the Package Execution Utility
(dtexecui.exe). The upgrade process does not remove the SQL Server 2008, SQL Server 2008 R2, SQL
Server 2012 (11.x), or SQL Server 2014 (12.x)tools. However, you will not able to use these tools to continue
to work with SQL Server 2008 Integration Services (SSIS) or later packages on a server that has been
upgraded.
By default, in an upgrade installation, Integration Services is configured to log events that are related to the
running of packages to the Application event log. This setting might generate too many event log entries
when you use the Data Collector feature of SQL Server 2019 (15.x). The events that are logged include
EventID 12288, "Package started," and EventID 12289, "Package finished successfully." To stop logging these
two events to the Application event log, open the registry for editing. Then in the registry, locate the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\130\SSIS node, and change the
DWORD value of the LogPackageExecutionToEventLog setting from 1 to 0.
NOTE
Although the packages in the upgraded instance of the Database Engine have not yet been migrated to the new
package format, they are not discoverable by the SQL Server 2008 tools. Therefore, the packages cannot be used by
the SQL Server 2008 tools.
You cannot use SQL Server 2008 Integration Services (SSIS) on other computers to run packages that are
stored in msdb on the upgraded instance of the Database Engine.
You cannot use SQL Server Agent jobs on SQL Server 2008 computers to run SQL Server 2008 Integration
Services (SSIS) packages that are stored in the upgraded instance of the Database Engine.
External Resources
Blog entry, Making your Existing Custom SSIS Extensions and Applications Work in Denali, on blogs.msdn.com.
Upgrade Integration Services Packages
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
When you upgrade an instance of SQL Server 2008 to the current release of SQL Server, your existing SQL Server
2008 Integration Services (SSIS) packages are not automatically upgraded to the package format that the current
release SQL ServerIntegration Services uses. You will have to select an upgrade method and manually upgrade
your packages.
For information on upgrading packages when you convert a project to the project deployment model, see Deploy
Integration Services (SSIS) Projects and Packages
NOTE
When you run a SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 (11.x), or SQL Server 2014 (12.x) package using
the dtexec utility (dtexec.exe) that is installed with the current release of SQL Server, the temporary package upgrade
increases the execution time. The rate of increase in package execution time varies depending on the size of the package. To
avoid an increase in the execution time, it is recommended that you upgrade the package before running it.
UP GRA DE M ET H O D T Y P E O F UP GRA DE
Use the dtexec utility (dtexec.exe) that is installed with the The package upgrade is temporary.
current release of SQL Server to run a SQL Server 2008, SQL
Server 2008 R2, SQL Server 2012 (11.x), or SQL Server 2014 The changes cannot be saved.
(12.x) package.
Open a SQL Server 2008, SQL Server 2008 R2, SQL Server The package upgrade is permanent if you save the package;
2012 (11.x), or SQL Server 2014 (12.x) package file in SQL otherwise, it is temporary if you do not save the package.
Server Data Tools (SSDT).
Add a SQL Server 2008, SQL Server 2008 R2, SQL Server The package upgrade is permanent.
2012 (11.x), or SQL Server 2014 (12.x) package to an existing
project in SQL Server Data Tools (SSDT).
Open a SQL Server 2008 Integration Services (SSIS) or later The package upgrade is permanent.
project file in Visual Studio, and then use the SSIS Package
Upgrade Wizard to upgrade multiple packages in the project.
Use the Upgrade method to upgrade one or more The package upgrade is permanent.
Integration Services packages.
NOTE
To identify which packages have the issues listed in this table, run Upgrade Advisor.
C O M P O N EN T O R F EAT URE UP GRA DE RESULT S
Connection strings For SQL Server 2008, SQL Server 2008 R2, SQL Server 2012
(11.x), or SQL Server 2014 (12.x) packages, the names of
certain providers have changed and require different values in
the connection strings. To update the connection strings, use
one of the following procedures:
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can upgrade packages that were created in earlier versions of Integration Services to the Integration Services
format that SQL Server 2019 (15.x) uses. SQL Server provides the SSIS Package Upgrade Wizard to help in this
process. Because you can configure the wizard to backup up your original packages, you can continue to use the
original packages if you experience upgrade difficulties.
The SSIS Package Upgrade Wizard is installed when Integration Services is installed.
NOTE
The SSIS Package Upgrade Wizard is available in the Standard, Enterprise, and Developer Editions of SQL Server.
For more information about how to upgrade Integration Services packages, see Upgrade Integration Services
Packages.
The remainder of this topic describes how to run the wizard and back up the original packages.
NOTE
When you open an Integration Services project that contains SQL Server 2008 Integration Services (SSIS) or later
packages, Integration Services automatically opens the SSIS Package Upgrade Wizard.
NOTE
The backup option in the wizard only works with packages that have been stored to the file system.
2. In SQL Server Management Studio or at the command prompt, run the SSIS Package Upgrade Wizard.
3. On the Select Source Location page of the wizard, set the Package source property to File System .
4. On the Select Destination Location page of the wizard, select Save to source location tosave the
upgraded packages to the same location as the original packages.
NOTE
The backup option in the wizard is available only when the upgraded packages are stored in the same folder as the
original packages.
5. On the Select Package Management Options page of the wizard, select the Backup original
packages option.
To back up the original packages in SQL Server Data Tools
1. Save the original packages to a location on the file system.
2. On the Select Package Management Options page of the wizard, select the Backup original
packages option.
WARNING
The Backup original packages option is not displayed when you open a SQL Server 2008 Integration Services
(SSIS) or later project in SQL Server Data Tools (SSDT), which automatically launches the wizard.
3. In SQL Server Data Tools (SSDT), run the SSIS Package Upgrade Wizard.
Integration Services (SSIS) Development and
Management Tools
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services includes two studios for working with packages:
SQL Server Data Tools (SSDT) for developing the Integration Services packages that a business solution
requires. SQL Server Data Tools (SSDT) provides the Integration Services project in which you create
packages.
SQL Server Management Studio for managing packages in a production environment.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SQL Server provides SQL Server Data Tools (SSDT) for the development of Integration Services packages.
Integration Services packages reside in projects. To create and work with Integration Services projects, you must
install SQL Server Data Tools. For more information, see Install Integration Services.
When you create a new Integration Services project in SQL Server Data Tools (SSDT), the New Project dialog box
includes an Integration Ser vices Project template. This project template creates a new project that contains a
single package.
TIP
By default, when you create a new project in SQL Server Data Tools, the solution is not shown in Solution Explorer pane. To
change this default behavior, on the Tools menus, click Options . In the Options dialog box, expand Projects and
Solutions , and then click General. On the General page, select Always show solution .
The following table describes the folders that appear in an Integration Services project.
Package Parts Contains Package Parts that can be reused or imported. For
more information, see Reuse Control Flow across Packages by
Using Control Flow Package Parts
NOTE: To view and change the selected source control plug-in and to configure the source control
environment, click Options on the Tools menu, and then expand the Source Control node.
8. Click OK to add the solution to Solution Explorer and add the project to the solution.
Next steps
Download and install SQL Server Data Tools.
SSIS How to Create an ETL Package
SQL Server Integration Services (SSIS) DevOps Tools
Azure DevOps extension
11/2/2020 • 11 minutes to read • Edit Online
Properties
Project path
Path of the project folder or file to be built. If a folder path is specified, SSIS Build task will search all dtproj files
recursively under this folder and build them all.
Project path cannot be empty, set as . to build from the root folder of the repository.
Project configuration
Name of the project configuration to be used for build. If not supplied, it defaults to the first defined project
configuration in each dtproj file.
Output path
Path of a separate folder to save build results, which can be published as build artifact via publish build artifacts
task.
Limitations and known issues
SSIS Build task relies on Visual Studio and SSIS designer, which is mandatory on build agents. Thus, to run
SSIS Build task in the pipeline, you must choose vs2017-win2016 for Microsoft-hosted agents, or install
Visual Studio and SSIS designer (either VS2017 + SSDT2017, or VS2019 + SSIS Projects extension) on self-
hosted agents.
To build SSIS projects using any out-of-box components (including SSIS Azure feature pack, and other third-
party components), those out-of-box components must be installed on the machine where the pipeline
agent is running. For Microsoft-hosted agent, user can add a PowerShell Script task or Command Line Script
task to download and install the components before SSIS Build task is executed. Below is the sample
PowerShell script to install Azure Feature Pack:
start -Wait -FilePath msiexec -Args "/i AFP.msi /quiet /l* log.txt"
cat log.txt
Protection level Encr yptSensitiveWithPassword and Encr yptAllWithPassword are not supported in SSIS
Build task. Make sure all SSIS projects in codebase are not using these two protection levels, or SSIS Build task
will stop responding and time out during execution.
Domain name
Domain name to access the specified file system. This property is only visible when Destination type is File System.
You can leave it empty when the user account to run the self-hosted agent has been granted read/write access to
the specified destination path.
Username
Username to access the specified file system or SSISDB. This property is visible when Destination type is File
System or Authentication type is SQL Server Authentication or Active Directory - Password. You can leave it empty
when the destination type is file system, and the user account to run the self-hosted agent has been granted
read/write access to the specified destination path.
Password
Password to access the specified file system or SSISDB. This property is visible when destination type is file system
or authentication type is SQL Server authentication or Active Directory - password. You can leave it empty when
destination type is file system, and the user account to run the self-hosted agent has been granted read/write
access to the specified destination path.
Overwrite existing projects or SSISDeploymentManifest files of the same names
Specify whether overwrite the existing projects or SSISDeploymentManifest files of the same names. If 'No', SSIS
Deploy task will skip deploying those projects or files.
Continue deployment when error occurs
Specify whether to continue deployment for remaining projects or files when an error occurs. If 'No', SSIS Deploy
task will stop immediately when error occurs.
Limitations and known issues
SSIS Deploy Task doesn't support the following scenarios currently:
Configure environment in SSIS catalog.
Deploy ispac to Azure SQL Server or Azure SQL Managed Instance, which only allows multi-factor
authentication (MFA).
Deploy packages to MSDB or SSIS Package Store.
Username
Username to access the target SQL Server. This property is only visible when Authentication type is SQL Server
Authentication or Active Directory - Password.
Password
Password to access the target SQL Server. This property is only visible when Authentication type is SQL Server
Authentication or Active Directory - Password.
Define configuration JSON
The configuration JSON schema has three layers:
catalog
folder
project and environment
JSON schema
Cat al o g A t t r i bu t es
P RO P ERT Y DESC RIP T IO N N OT ES
folders An array of folder objects. Each object See Folder Attributes for the schema of
contains configuration information for a a folder object.
catalog folder.
Fo l der A t t r i bu t es
name Name of the catalog folder. Folder will be created if not exists.
description Description of the catalog folder. The value of null will be skipped.
projects An array of project objects. Each object See Project Attributes for the schema of
contains configuration information for a a project object.
project.
environments An array of environment objects. Each See Environment Attributes for the
object contains configuration schema of an environment object.
information for an environment.
Pr o j ec t A t t r i bu t es
parameters An array of parameter objects. Each See Parameter Attributes the schema of
object contains configuration a parameter object.
information for a parameter.
references An array of reference objects. Each See Reference Attributes for the schema
object represents an environment of a reference object.
reference to the target project.
Par am et er A t t r i bu t es
R e fe r e n c e A t t r i b u t e s
environmentFolder Folder name of the environment. Folder will be created if not exists.
Value can be ".", which represents
parent folder of the project, which
references the environment.
En v i r o n m e n t A t t r i b u t e s
Va r i a b l e A t t r i b u t e s
description Description of the environment variable. The value of null will be skipped.
value Value of the environment variable. This attribute supports any valid
boolean, number, and string JSON
values.
The value will be converted to the type
specified by type attribute. Error will
occur if conversion fails.
The value of null is invalid. The task will
skip this environment variable object,
and give a warning.
Release notes
Version 1.0.3
Release Date: October 21, 2020
Allow specifying connection string suffix for SSIS Deploy task and SSIS Catalog Configuration task.
Version 1.0.2
Release Date: May 26, 2020
Fixed an issue that SSIS Catalog Configuration task may fail in some case after configuration work is done.
Version 1.0.1
Release Date: May 9, 2020
Fixed an issue that SSIS Build task always build the whole solution even if only single dtproj file is specified as
project path.
Version 1.0.0
Release Date: May 8, 2020
General Availability (GA) release.
Added a restriction of minimum .NET framework version on agent. Currently the minimum .NET framework
version is 4.6.2.
Refined description of SSIS Build task and SSIS Deploy task.
Version 0.2.0 Preview
Release Date: March 31, 2020
Add SSIS Catalog Configuration task.
Version 0.1.3 Preview
Release Date: January 19, 2020
Fixed an issue that prevented ispac from being deployed if its original file name was changed.
Version 0.1.2 Preview
Release Date: January 13, 2020
Added more detailed exception information in the SSIS Deploy task log when the destination type is SSISDB.
Fixed the example destination path in the help text of the property Destination path of SSIS Deploy task.
Version 0.1.1 Preview
Release Date: January 6, 2020
Added a restriction of minimal agent version requirement. Currently the minimal agent version of this product is
2.144.0.
Fixed some incorrect display text for SSIS Deploy task.
Refined some error messages.
Version 0.1.0 Preview
Release Date: December 5, 2019
Initial release of SSIS DevOps Tools. This is a preview release.
Next steps
Get SSIS DevOps extension
Standalone SQL Server Integration Service (SSIS)
DevOps Tools (Preview)
11/2/2020 • 4 minutes to read • Edit Online
Standalone SSIS DevOps Tools provide a set of executables to do SSIS CICD tasks. Without the dependency on
the installation of Visual Studio or SSIS runtime, these executables can be easily integrated with any CICD platform.
The executables provided are:
SSISBuild.exe: build SSIS projects in project deployment model or package deployment model.
SSISDeploy.exe: deploy ISPAC files to SSIS catalog, or DTSX files and their dependencies to file system.
Installation
.NET framework 4.6.2 or higher is required.
Download the latest installer from download center, then install via wizard or command line:
Install via wizard
Double-click the .exe file to install, then specify a folder to extract the executables and dependency files.
SSISBuild.exe
Syntax
PA RA M ET ER DESC RIP T IO N
-project |-p:<dtproj file path> File path of the dtproj file to be built.
-configuration|-c:<configuration name> Name of the project configuration to be used for build. If not
supplied, it defaults to the first defined project configuration in
the dtproj file.
-projectPassword|-pp:<project password> Password of the SSIS project and its packages. This argument
is only valid when the protection level of the SSIS project and
packages is EncryptSensitiveWithPassword or
EncryptAllWithPassword. For package deployment model, all
packages must share the same password specified by this
argument.
-output|-o:<output path> Output path of the build artifact. The value of this argument
will overwrite the default output path in the project
configuration.
Examples
Build a dtproj with the first defined project configuration, not encrypted with password:
SSISBuild.exe -p:"C:\projects\demo\demo.dtproj"
Build a dtproj with configuration "DevConfiguration", encrypted with password, and output the build
artifacts to a specific folder:
Build a dtproj with configuration "DevConfiguration", encrypted with password, striping its sensitive data,
and log level DIAG:
Parameters
PA RA M ET ER DESC RIP T IO N
-source|-s:<source path> Local file path of artifacts to be deployed. ISPAC, DTSX, path of
folder for DTSX, SSISDeploymentManfiest are allowed.
-authType|-at:<auth type name> Authentication type to access SQL Server. Mandatory for
CATALOG destination. Following types are supported:
WIN: Windows Authentication
SQL: SQL Server Authentication
ADPWD: Active Directory - Password
ADINT: Active Directory - Integrated
-connectionStringSuffix|-css:<connection string suffix> Suffix of the connection string, which is used to connect to the
SSIS catalog.
-log|-l:<log level>[;<log path>] Log related settings for running this utility.
log level: Only logs with equal or higher logging level will be
written to the log file. There are four logging levels (from low
to high): DIAG, INFO, WRN, ERR. The default logging level is
INFO if it's not specified.
log path: Path of the file to persist logs. Log file will not be
generated if the path is not specified.
Examples
Deploy a single ISPAC not encrypted with password to SSIS catalog with Windows authentication.
Deploy a single ISPAC encrypted with password to SSIS catalog with SQL authentication, and rename the
project name.
Deploy a single SSISDeploymentManifest and its associated files to Azure file share.
SSISDeploy.exe -s:D:\myfolder\mypackage.SSISDeploymentManifest -
d:file;\\myssisshare.file.core.windows.net\destfolder -u:Azure\myssisshare -p:storagekey
Release notes
Version 0.1.0 Preview
Release Date: October 16, 2020
Initial preview release of standalone SSIS DevOps Tools.
Next steps
Get standalone SSIS DevOps Tools
If you have questions, visit Q&A
Integration Services User Interface
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In addition to the design surfaces on the SSIS Designer tabs, the user interface provides access to the following
windows and dialog boxes for adding features to packages and configuring the properties of package objects:
The dialog boxes and windows that you use to add functionality such as logging and configurations to
packages.
The custom editors for configuring the properties of package objects. Almost every type of container, task,
and data flow component has its own custom editor.
The Advanced Editor dialog box, a generic editor that provides more detailed configuration options for
many data flow components.
SQL Server Data Tools (SSDT) also provides windows and dialog boxes for configuring the environment and
working with packages.
Getting Star ted Access samples, tutorials, and videos. On the design surface of the Control
Flow tab or the Data Flow tab, right-
click and then click Getting Star ted .
Configure SSIS Logs Configure logging for a package and its On the SSIS menu, click Logging .
tasks by adding logs and setting
logging details. -or-
Package Configuration Organizer Add and edit package configurations. On the SSIS menu, click Package
You run the Package Configuration Configurations .
Wizard from this dialog box.
-or-
Digital Signing Sign a package or remove the signature On the SSIS menu, click Digital
from the package. Signing .
-or-
Set Breakpoints Enable breakpoints on tasks and set On the design surface of the Control
breakpoint properties. Flow tab, right-click a task or container,
and then click Edit Breakpoints . To set
a breakpoint on the package, right-click
anywhere on the design surface of the
Control Flow tab, and then click Edit
Breakpoints .
The Getting Star ted window provides links to samples, tutorials, and videos. To add links to additional content,
modify the SamplesSites.xml file that is included with the current release of SQL ServerIntegration Services. It is
recommended that you not modify the <GettingStartedSamples> element value that specifies the RSS feed URL.
The file is located in the <drive>:\Program Files\Microsoft SQL Server\110\DTS\Binn folder. On a 64-bit computer,
the file is located in the <drive>:\Program Files(x86)\Microsoft SQL Server\110\DTS\Binn folder
If the SamplesSites.xml file does become corrupted, replace the xml in the file with the following default xml.
<?xml version="1.0" ?>
- <SamplesSites>
<GettingStartedSamples>https://go.microsoft.com/fwlink/?LinkID=203147</GettingStartedSamples>
- <ToolboxSamples>
<Site>https://go.microsoft.com/fwlink/?LinkID=203286&query=SSIS%20{0}</Site>
</ToolboxSamples>
</SamplesSites>
This table lists the windows that are available from the SSIS and View menus and the design surfaces of SSIS
Designer.
W IN DO W P URP O SE A C C ESS
Variables Add and manage custom variables. On the SSIS menu, click Variables .
-or-
-or-
Log Events View log entries at run time. On the SSIS menu, click Log Events .
-or-
-or-
Custom Editors
Integration Services provides a custom dialog box for most containers, tasks, sources, transformations, and
destinations.
The following table describes how to access custom dialog boxes.
EDITO R T Y P E A C C ESS
Container. For more information, see Integration Services On the design surface of the Control Flow tab, double-click
Containers. the container.
Task. For more information, see Integration Services Tasks. On the design surface of the Control Flow tab, double-click
the task.
Source. On the design surface of the Data Flow tab, double-click the
source.
Transformation. For more information, see Integration Services On the design surface of the Data Flow tab, double-click the
Transformations. transformation.
Destination. On the design surface of the Data Flow tab, double-click the
destination.
Advanced Editor
The Advanced Editor dialog box is a user interface for configuring data flow components. It reflects the
properties of the component using a generic layout. The Advanced Editor dialog box is not available to
Integration Services transformations that have multiple inputs.
To open this editor, click ShowAdvanced Editor in the Proper ties window or right-click a data flow component,
and then click ShowAdvanced Editor .
If you create a custom source, transformation, or destination but do not want to write a custom user interface, you
can use the Advanced Editor instead.
Related Tasks
For information about how to create packages in SQL Server Data Tools (SSDT), see Create Packages in SQL Server
Data Tools
See Also
SSIS Designer
SSIS Designer
11/2/2020 • 8 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SSIS Designer is a graphical tool that you can use to create and maintain Integration Services packages. SSIS
Designer is available in SQL Server Data Tools (SSDT) as part of an Integration Services project.
You can use SSIS Designer to perform the following tasks:
Constructing the control flow in a package.
Constructing the data flows in a package.
Adding event handlers to the package and package objects.
Viewing the package content.
At run time, viewing the execution progress of the package.
The following diagram shows SSIS Designer and the Toolbox window.
Integration Services includes additional dialog boxes and windows for adding functionality to packages, and SQL
Server Data Tools (SSDT) provides windows and dialog boxes for configuring the development environment and
working with packages. For more information, see Integration Services User Interface.
SSIS Designer has no dependency on the Integration Services service, the service that manages and monitors
packages, and it is not required that the service be running to create or modify packages in SSIS Designer. However,
if you stop the service while SSIS Designer is open, you can no longer open the dialog boxes that SSIS Designer
provides and you may receive the error message "RPC server is unavailable." To reset SSIS Designer and continue
working with the package, you must close the designer, exit SQL Server Data Tools (SSDT), and then reopen SQL
Server Data Tools (SSDT), the Integration Services project, and the package.
Undo and Redo
You can undo and redo up to 20 actions in the SSIS Designer. For a package, undo /redo is available in the Control
Flow , Data Flow , Event Handlers , and Parameters tabs, and in the Variables window. For a project, undo/redo
is available in the Project Parameters window.
You can't undo/redo changes to the new SSIS Toolbox .
When you make changes to a component using the component editor, you undo and redo the changes as a set
rather than undoing and redoing individual changes. The set of changes appears as a single action in the undo and
redo drop-down list.
To undo an action, click the undo toolbar button, Edit/Undo menu item, or press CTRL+Z. To redo an action, click
the redo toolbar button, Edit/Redo menu item or press CTRL + Y. You can undo and redo multiple actions, by
clicking the arrow next to the toolbar button, highlighting multiple actions in the drop-down list, and then clicking
in the list.
IMPORTANT!! Parameters are available only to projects developed for the project deployment model.
Therefore, you will see the Parameters tab only for packages that are part of a project configured to use the
project deployment model.
NOTE: To enable or disable the display of messages on the Progress tab, toggle the Debug Progress
Repor ting option on the SSIS menu.
Options
Executable
Select the executable for which you want to build an event handler. The executable can be the package, or a task or
containers in the package.
Event handler
Select a type of event handler. Create the event handler by dragging items from the Toolbox .
Delete
Select an event handler, and remove it from the package by clicking Delete .
Click here to create an <event handler name> for the executable <executable name>
Click to create the event handler.
Create the control flow by dragging graphical objects that represent SSIS tasks and containers from the Toolbox to
the design surface of the Event Handlers tab, and then connecting the objects by using precedence constraints to
define the sequence in which they run.
Additionally, to add annotations, right-click the design surface, and then on the menu, click Add Annotation .
Progress tab
Use the Progress tab of SSIS Designer to view the progress of execution of an Integration Services package when
you run the package in SQL Server Data Tools (SSDT). The Progress tab lists the start time, the finish time, and the
elapsed time for validation and execution of the package and its executables; any information or warnings for the
package; progress notifications; the success or failure of the package; and any error messages that are generated
during package execution.
To enable or disable the display of messages on the Progress tab, toggle the Debug Progress Repor ting option
on the SSIS menu. Disabling progress reporting can help improve performance while running a complex package
in SQL Server Data Tools.
After the package stops running, the Progress tab becomes the Execution Results tab.
Related Tasks
Create Packages in SQL Server Data Tools
See Also
Integration Services User Interface
Advanced Editor
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Advanced Editor dialog box to configure to configure properties for the selected Integration Services
object.
The Advanced Editor is available for most Integration Services objects that have configurable properties. It is the
only editor available for those objects that do not expose a custom user interface.
Integration Services data flow objects have properties that can be set at the component level, the input and output
level, and the input and output column level. The Advanced Editor enumerates all the common and custom
properties of the selected object and displays them on up to four of the following five tabs as applicable:
Connection Managers -- use this tab to set connection properties
Component Proper ties -- use this tab to set component-level properties
Column Mappings -- use this tab to map available columns as output columns
Input Columns -- use this tab to select input columns
Input and Output Proper ties -- use this tab to set input and output properties; and to add and remove
outputs, select or remove columns for inputs and outputs, and set properties for inputs and outputs
The properties displayed vary by component. For more information on the properties that may be displayed in the
Advanced Editor , see the following topics:
Common Properties
Transformation Custom Properties
Path Properties
For more information about the specific component that you are editing, see the description of the component in
the Data Flow Elements section of the Integration Services Objects and Concepts documentation:
Integration Services Transformations
See Also
Integration Services Error and Message Reference
Group or Ungroup Components
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Control Flow , Data Flow , and Event Handlers tabs in SSIS Designer supports collapsible grouping. If a
package has many components, the tabs can become crowded, making it difficult to view all the components at
one time and to locate the item with which you want to work. The collapsible grouping feature can conserve space
on the work surface and make it easier to work with large packages.
You select the components that you want to group, group them, and then expand or collapse the groups to suit
your work. Expanding a group provides access to the properties of the components in the group. The precedence
constraints that connect tasks and containers are automatically included in the group.
The following are considerations for grouping components.
To group components, the control flow, data flow, or event handler must contain more than one component.
Groups can also be nested, making it possible to create groups within groups. The design surface can
implement multiple un-nested groups, but a component can belong to only one group, unless the groups
are nested.
When a package is saved, SSIS Designer saves the grouping, but the grouping has no effect on package
execution. The ability to group components is a design-time feature; it does not affect the run-time behavior
of the package.
To group components
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Control Flow , Data Flow , or Event Handlers tab.
4. On the design surface of the tab, select the components you want to group, right-click a selected component,
and then click Group .
5. To save the updated package, click Save Selected Items on the File menu.
To ungroup components
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Control Flow , Data Flow , or Event Handlers tab.
4. On the design surface of the tab, select the group that contains the component you want to ungroup, right-
click, and then click Ungroup .
5. To save the updated package, click Save Selected Items on the File menu.
See Also
Add or Delete a Task or a Container in a Control Flow
Connect Tasks and Containers by Using a Default Precedence Constraint
Use Annotations in Packages
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The SSIS Designer provides annotations, which you can use to make packages self-documenting and easier to
understand and maintain. You can add annotations to the control flow, data flow, and event handler design surfaces
of SSIS Designer. The annotations can contain any type of text, and they are useful for adding labels, comments,
and other descriptive information to a package. Annotations are a design-time feature only. For example, they are
not written to logs.
When you press ENTER, the text wraps to the next line. The annotation box automatically increases in size as you
add additional lines of text. Package annotations are persisted as clear text in the CDATA section of the package file.
For more information about changes to the format of the package file, see SSIS Package Format.
When you save the package, SSIS Designer saves the annotations in the package.
NOTE
If you add no text, the text block is removed when you click outside the block.
5. To change the size or format of the text in the annotation, right-click the annotation and then click Set Text
Annotation Font .
6. To add an additional line of text, press ENTER.
The annotation box automatically increases in size as you add additional lines of text.
7. To add an annotation to a group, right-click the annotation and then click Group .
8. To save the updated package, on the File menu, click Save All .
SSIS Toolbox
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
All components installed on the local machine automatically appear in the SSIS Toolbox . When you install
additional components, right-click inside the toolbox and then click Refresh Toolbox to add the components.
When you create a new SSIS project or open an existing project, the SSIS Toolbox displays automatically. You can
also open the toolbox by clicking the toolbox button that is located in the top-right corner of the package design
surface, or by clicking VIEW -> Other Windows -> SSIS Toolbox.
NOTE
If you can't see the toolbox, go to VIEW -> Other Windows -> SSIS Toolbox.
Get more information about a component in the toolbox by clicking the component to view its description at the
bottom of the toolbox. For some components you can also access samples that demonstrate how to configure and
use the components. The samples are available on MSDN. To access the samples from the SSIS Toolbox , click the
Find Samples link that appears below the description.
NOTE
You can't remove installed components from the toolbox.
Toolbox categories
In the SSIS Toolbox , control flow and data flow components are organized into categories. You can expand and
collapse categories, and rearrange components. Restore the default organization by right-clicking inside the toolbox
and then click Restore Toolbox Defaults .
The Favorites and Common categories appear in the toolbox when you select the Control Flow , Data Flow , and
Event Handlers tabs. The Other Tasks category appears in the toolbox when you select the Control Flow tab or
the Event Handlers tab. The Other Transforms , Other Sources , and Other Destinations categories appear in
the toolbox when you select the Data Flow tab.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the General page of the Integration Ser vices Designers page in the Options dialog box to specify the
options for loading, displaying, and upgrading packages.
To open the General page, in SQL Server Data Tools (SSDT), on the Tools menu, click Options , expand Business
Intelligence Designers , and select Integration Ser vices Designers .
Options
Check digital signature when loading a package
Select to have Integration Services check the digital signature when loading a package. Integration Services will
only check whether the digital signature is present, is valid, and is from a trusted source. Integration Services will
not check whether the package has been changed since the package was signed.
If you set the BlockedSignatureStates registry value, this registry value overrides the Check digital signature
when loading a package option. For more information, see Implement a Signing Policy by Setting a Registry
Value.
For more information about digital certificates and packages, see Identify the Source of Packages with Digital
Signatures.
Show warning if package is unsigned
Select to display a warning when loading a package that is not signed.
Show precedence constraint labels
Select which label-Success, Failure, or Completion-to display on precedence constraints when viewing packages in
SQL Server Data Tools (SSDT).
Scripting language
Select the default scripting language for new Script tasks and Script components.
Update connection strings to use new provider names
When opening or upgrading SQL Server 2005 Integration Services (SSIS) packages, update connection strings to
use the names for the following providers, for the current release of SQL ServerIntegration Services:
Analysis Services OLE DB provider
SQL Server Native Client
The SSIS Package Upgrade Wizard updates only connection strings that are stored in connection managers. The
wizard does not update connection strings that are constructed dynamically by using the Integration Services
expression language, or by using code in a Script task.
Create new package ID
When upgrading SQL Server 2005 Integration Services (SSIS) packages, create new package IDs for the upgraded
versions of the packages.
See Also
Security Overview (Integration Services)
Extending Packages with Scripting
Integration Services (SSIS) Packages
11/2/2020 • 8 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A package is an organized collection of connections, control flow elements, data flow elements, event handlers,
variables, parameters, and configurations, that you assemble using either the graphical design tools that SQL
Server Integration Services provides, or build programmatically. You then save the completed package to SQL
Server, the SSIS Package Store, or the file system, or you can deploy the ssISnoversion project to the SSIS server.
The package is the unit of work that is retrieved, executed, and saved.
When you first create a package, it is an empty object that does nothing. To add functionality to a package, you
add a control flow and, optionally, one or more data flows to the package.
The following diagram shows a simple package that contains a control flow with a Data Flow task, which in turn
contains a data flow.
After you have created the basic package, you can add advanced features such as logging and variables to extend
package functionality. For more information, see the section about Objects that Extend Package Functionality.
The completed package can then be configured by setting package-level properties that implement security,
enable restarting of packages from checkpoints, or incorporate transactions in package workflow. For more
information, see the section about Properties that Support Extended Features.
Contents of a package
Tasks and containers (control flow). A control flow consists of one or more tasks and containers that execute
when the package runs. To control order or define the conditions for running the next task or container in the
package control flow, you use precedence constraints to connect the tasks and containers in a package. A subset
of tasks and containers can also be grouped and run repeatedly as a unit within the package control flow. For
more information, see Control Flow.
Data sources and destinations (data flow). A data flow consists of the sources and destinations that extract
and load data, the transformations that modify and extend data, and the paths that link sources, transformations,
and destinations. Before you can add a data flow to a package, the package control flow must include a Data Flow
task. The Data Flow task is the executable within the SSIS package that creates, orders, and runs the data flow. A
separate instance of the data flow engine is opened for each Data Flow task in a package. For more information,
see Data Flow Task and Data Flow.
Connection managers (connections). A package typically includes at least one connection manager. A
connection manager is a link between a package and a data source that defines the connection string for
accessing the data that the tasks, transformations, and event handlers in the package use. Integration Services
includes connection types for data sources such as text and XML files, relational databases, and Analysis Services
databases and projects. For more information, see Integration Services (SSIS) Connections.
LO G EN T RY DESC RIP T IO N
Related Tasks
Integration Services includes two graphical tools, SSIS Designer and SQL Server Import and Export Wizard, in
addition to the SSIS object model for creating packages. See the following topics for details.
Import and Export Data with the SQL Server Import and Export Wizard
Create Packages in SQL Server Data Tools
See Building Packages Programmatically in the Developer Guide.
Create Packages in SQL Server Data Tools
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In SQL Server Data Tools (SSDT), you can create a new package by using one of the following methods:
Use the package template that Integration Services includes.
Use a custom template
To use custom packages as templates for creating new packages, you simply copy them to the
DataTransformationItems folder. By default, this folder is in C:\Program Files\Microsoft Visual Studio
10.0\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject.
Copy an existing package.
If existing packages include functionality that you want to reuse, you can build the control flow and data
flows in the new package more quickly by copying and pasting objects from other packages. For more
information about using copy and paste in Integration Services projects, see Reuse of Package Objects.
If you create a new package by copying an existing package or by using a custom package as a template,
the name and the GUID of the existing package are copied as well. You should update the name and the
GUID of the new package to help differentiate it from the package from which it was copied. For example, if
packages have the same GUID, it is more difficult to identify the package to which log data belongs. You
can regenerate the GUID in the ID property and update the value of the Name property by using the
Properties window in SQL Server Data Tools (SSDT). For more information, see Set Package Properties and
dtutil Utility.
Use a custom package that you have designated as a template.
Run the SQL Server Import and Export Wizard
The SQL Server Import and Export Wizard creates a complete package for a simple import or export. This
wizard configures the connections, source, and destination, and adds any data transformations that are
required to let you run the import or export immediately. You can optionally save the package to run it
again later, or to refine and enhance the package in SQL Server Data Tools. However, if you save the
package, you must add the package to an existing Integration Services project before you can change the
package or run the package in SQL Server Data Tools.
The packages that you create in SQL Server Data Tools (SSDT) using SSIS Designer are saved to the file system. To
save a package to SQL Server or to the package store, you need to save a copy of the package. For more
information, see Save a Copy of a Package.
For a video that demonstrates how to create a basic package using the default package template, see Creating a
Basic Package (SQL Server Video).
Create a package in SQL Server Data Tools using the Package Template
1. In SQL Server Data Tools (SSDT), open the Integration Services project in which you want to create a
package.
2. In Solution Explorer, right-click the SSIS Packages folder, and then click New SSIS Package .
3. Optionally, add control flow, data flow tasks, and event handlers to the package. For more information, see
Control Flow, Data Flow, and Integration Services (SSIS) Event Handlers.
4. On the File menu, click Save Selected Items to save the new package.
NOTE
You can save an empty package.
You can create, maintain, and run packages that target SQL Server 2016, SQL Server 2014, or SQL Server 2012.
Add Copy of Existing Package
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Add Copy of Existing Package dialog box to add a copy of a package stored in SQL Server, the file
system, or the SSIS Package Store to an Integration Services project.
Options
Package location
Select the type of storage location from which to copy the package.
Ser ver
If copying from SQL Server or the SSIS Package Store, type a server name or select a server from the list.
Authentication type
If copying from SQL Server, select an authentication type.
User name
If using SQL Server Authentication, provide a user name.
Password
If using SQL Server Authentication, provide a password.
Package path
Type the package path, or click the browse button (...) and locate the package to copy.
See Also
Save Copy of Package
Save Packages
Integration Services Service (SSIS Service)
Set Package Properties
11/2/2020 • 7 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
When you create a package in SQL Server Data Tools (SSDT) by using the graphical interface that Integration
Services provides, you set the properties of the package object in the Properties window.
The Proper ties window provides a categorized and alphabetical list of properties. To arrange the Proper ties
window by category, click the Categorized icon.
When arranged by category, the Proper ties window groups properties in the following categories:
Checkpoints
Execution
Forced Execution Value
Identification
Misc
Security
Transactions
Version
For information about additional package properties that you cannot set in the Proper ties window, see Package.
To set package properties in the Properties window
Set the Properties of a Package
Properties by Category
The following tables list the package properties by category.
Checkpoints
You can use the properties in this category to restart the package from a point of failure in the package control
flow, instead of rerunning the package from the beginning of its control flow. For more information, see Restart
Packages by Using Checkpoints.
CheckpointFileName The name of the file that captures the checkpoint information
that enables a package to restart. When the package finishes
successfully, this file is deleted.
NOTE
The /CheckPointing on option of dtexec is equivalent to setting the SaveCheckpoints property of the package to True,
and the CheckpointUsage property to Always. For more information, see dtexec Utility.
Execution
The properties in this category configure the run-time behavior of the package object.
DisableEventHandlers Specifies whether the package event handlers run. The default
value of this property is False .
MaxConcurrentExecutables The number of executable files that the package can run
concurrently. The default value of this property is -1 , which
indicates that there is no limit.
PackagePriorityClass The Win32 thread priority class of the package thread. The
values are Default , AboveNormal, Normal, BelowNormal,
Idle . The default value of this property is Default . For more
information, see DTSPriorityClass.
Identification
The properties in this category provide information such as the unique identifier and name of the package.
CreatorComputerName The name of the computer on which the package was created.
Misc
The properties in this category are used to access the configurations and expressions that a package uses and to
provide information about the locale and logging mode of the package. For more information, see Use Property
Expressions in Packages.
Expressions Click the browse button (...) to create expressions for package
properties.
Note that you can create property expressions for all the
package properties that object model includes, not just the
properties listed in the Properties window.
ForceExecutionResult The execution result of the package. The values are None ,
Success , Failure , and Completion . The default value of this
property is None . For more information, see
T:Microsoft.SqlServer.Dts.Runtime.DTSForcedExecResult.
Security
The properties in this category are used to set the protection level of the package. For more information, see
Access Control for Sensitive Data in Packages.
Transactions
The properties in this category configure the isolation level and the transaction option of the package. For more
information, see Integration Services Transactions.
IsolationLevel The isolation level of the package transaction. The values are
Unspecified , Chaos , ReadUncommitted ,
ReadCommitted , RepeatableRead , Serializable , and
Snapshot . The default value of this property is Serializable .
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In SSIS Designer, the Package Explorer tab provides an explorer view of the package. The view reflects the
container hierarchy of the Integration Services architecture. The package container is at the top of the hierarchy,
and you expand the package to view the connections, executables, event handlers, log providers, precedence
constraints, and variables in the package.
The executables, which are the containers and tasks in the package, can include event handlers, precedence
constraints, and variables. Integration Services supports a nested hierarchy of containers, and the For Loop,
Foreach Loop, and Sequence containers can include other executables.
If a package includes a data flow, the Package Explorer lists the Data Flow task and includes a Components
folder that lists the data flow components.
From the Package Explorer tab, you can delete objects in a package and access the Proper ties window to view
object properties.
The following diagram shows a tree view of a simple package.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This topic describes how to create a new Integration Services package by copying an existing package, and how to
update the Name and GUID properties of the new package.
To copy a package
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package that you
want to copy.
2. In Solution Explorer, double-click the package.
3. Verify either the package to copy is selected in Solution Explorer or the tab in SSIS Designer that contains the
package is the active tab
4. On the File menu, click Save <package name> As .
NOTE
The package must be opened in SSIS Designer before the Save As option appears on the File menu.
See Also
Save a Copy of a Package
Create Packages in SQL Server Data Tools
Integration Services (SSIS) Packages
Copy Package Objects
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This topic describes how to copy control flow items, data flow items, and connection managers within a package or
between packages.
To copy control and data flow items
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the packages that you
want work with.
2. In Solution Explorer, double-click the packages that you want to copy between.
3. In SSIS Designer, click the tab for the package that contains the items to copy and click the Control Flow ,
Data Flow , or Event Handlers tab.
4. Select the control flow or data flow items to copy. You can either select items one at a time by pressing the
Shift key and clicking the item or select items as a group by dragging the pointer across the items you want
to select.
IMPORTANT
The precedence constraints and paths that connect items are not selected automatically when you select the two
items that they connect. To copy an ordered workflow-a segment of control flow or data flow-make sure to also copy
the precedence constrains and the paths.
IMPORTANT
You cannot copy a data flow to a package unless the package contains at least one Data Flow task.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In SQL Server Data Tools (SSDT) you build packages by using SSIS Designer and save the packages to the file
system as XML files (.dtsx files). You can also save copies of the package XML file to the msdb database in SQL
Server or to the package store. The package store represents the folders in the file system location that the
Integration Services service manages.
If you save a package to the file system, you can later use the Integration Services service to import the package
to SQL Server or to the package store. For more information, see Integration Services Service (SSIS Service).
You can also use a command prompt utility, dtutil , to copy a package between the file system and msdb. For
more information, see dtutil Utility.
NOTE
You can verify the path and file name where the package was saved in the Properties window.
NOTE
The package must be opened in SSIS Designer before you can save a copy of the package.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Save a commonly used control flow task or container to a standalone part file - a ".dtsxp" file - and reuse it
multiple times in one or more packages by using control flow package parts. This reusability makes SSIS packages
easier to design and maintain.
A new part file with the ".dtsxp" extension is created under the Package Par ts | Control Flow folder. At the same
time, a new item with the same name is also added to the SSIS toolbox. (The toolbox item is only visible while you
have a project that contains the part open in Visual Studio.)
Add a copy of an existing control flow package part or a reference to an existing part
To add a copy of an existing part in the file system to a package, in Solution Explorer, expand the Package Par ts
folder. Right-click on Control Flow and select Add Existing Control Flow Package Par t .
Options
Package Par t path
Type the path to the part file, or click the browse button (...) and locate the part file to copy or to reference.
Add as a reference
If selected, the part is added to the Integration Services project as a reference. Select this option when you
when want to reference a single copy of a part file in multiple Integration Services projects.
If cleared, a copy of the part file is added to the project.
NOTE
If you want to remove a part from an Integration Services project, but continue to use it in other projects, use the Exclude
from Project option instead of the Delete option.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Frequently packages functionality that you want to reuse. For example, if you created a set of tasks, you might want
to reuse the items together as a group, or you might want to reuse a single item such as a connection manager that
you created in a different Integration Services project.
Related Tasks
Copy Package Objects
Copy Project Items
Save a Package as a Package Template
Delete Packages
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In SQL Server Data Tools (SSDT), you can delete packages saved to the file system. If you delete a package, it is
deleted permanently and it cannot be restored to an Integration Services project.
NOTE
If you want to remove packages from an Integration Services project, but use them in other projects, then you should use
the Exclude From Project option instead of the Delete option.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The dtutil command prompt utility is used to manage SQL Server Integration Services packages. The utility can
copy, move, delete, or verify the existence of a package. These actions can be performed on any SSIS package that
is stored in one of three locations: a Microsoft SQL Server database, the SSIS Package Store, and the file system. If
the utility accesses a package that is stored in msdb , the command prompt may require a user name and a
password. If the instance of SQL Server uses SQL Server Authentication, the command prompt requires both a
user name and a password. If the user name is missing, dtutil tries to log on to SQL Server using Windows
Authentication. The storage type of the package is identified by the /SQL , /FILE , and /DTS options.
The dtutil command prompt utility does not support the use of command files or redirection.
The dtutil command prompt utility includes the following features:
Remarks in the command prompt, which makes the command prompt action self-documenting and easier
to understand.
Overwrite protection, to prompt for a confirmation before overwriting an existing package when you are
copying or moving packages.
Console help, to provide information about the command options for dtutil .
NOTE
Many of the operations that are performed by dtutil can also be performed visually in SQL Server Management Studio
when you are connected to an instance of Integration Services. For more information, see Package Management (SSIS
Service).
The options can be typed in any order. The pipe ("|") character is the OR operator and is used to show possible
values. You must use one of the options that are delimited by the OR pipe.
All options must start with a slash (/) or a minus sign (-). However, do not include a space between the slash or
minus sign and the text for the option; otherwise, the command will fail.
Arguments must be strings that are either enclosed in quotation marks or contain no white space.
Double quotation marks within strings that are enclosed in quotation marks represent escaped single quotation
marks.
Options and arguments, except for passwords, are not case sensitive.
Installation Considerations on 64-bit Computers
On a 64-bit computer, Integration Services installs a 64-bit version of the dtexec utility (dtexec.exe) and the dtutil
utility (dtutil.exe). To install 32-bit versions of these Integration Services tools, you must select either Client Tools
or SQL Server Data Tools (SSDT) during setup.
By default, a 64-bit computer that has both the 64-bit and 32-bit versions of an Integration Services command
prompt utility installed will run the 32-bit version at the command prompt. The 32-bit version runs because the
directory path for the 32-bit version appears in the PATH environment variable before the directory path for the
64-bit version. (Typically, the 32-bit directory path is <drive>:\Program Files(x86)\Microsoft SQL
Server\130\DTS\Binn, while the 64-bit directory path is <drive>:\Program Files\Microsoft SQL
Server\130\DTS\Binn.)
NOTE
If you use SQL Server Agent to run the utility, SQL Server Agent automatically uses the 64-bit version of the utility. SQL
Server Agent uses the registry, not the PATH environment variable, to locate the correct executable for the utility.
To ensure that you run the 64-bit version of the utility at the command prompt, you can take one of the following
actions:
Open a Command Prompt window, change to the directory that contains the 64-bit version of the utility
(<drive>:\Program Files\Microsoft SQL Server\130\DTS\Binn), and then run the utility from that location.
At the command prompt, run the utility by entering the full path (<drive>:\Program Files\Microsoft SQL
Server\130\DTS\Binn) to the 64-bit version of the utility.
Permanently change the order of the paths in the PATH environment variable by placing the 64-bit path
(<drive>:\Program Files\Microsoft SQL Server\130\DTS\Binn) before the 32-bit path (<drive>:\ Program
Files(x86)\Microsoft SQL Server\130\DTS\Binn) in the variable.
Syntax
dtutil /option [value] [/option [value]]...
Parameters
O P T IO N DESC RIP T IO N
/Dec[rypt] password (Optional). Sets the decryption password that is used when
you load a package with password encryption.
/Del[ete] Deletes the package specified by the SQL, DTS or FILE option.
If dtutil cannot delete the package, the program ends.
O P T IO N DESC RIP T IO N
/DestP[assword] password Specifies the password that is used with the SQL option to
connect to a destination SQL Server instance using SQL
Server Authentication. An error is generated if
DESTPASSWORD is specified in a command line that does not
include the DTSUSER option.
/DestS[erver] server_instance Specifies the server name that is used with any action that
causes a destination to be saved to SQL Server. It is used to
identify a non-local or non-default server when saving an
SSIS package. It is an error to specify DESTSERVER in a
command line that does not have an action associated with
SQL Server. Actions such as SIGN SQL, COPY SQL, or MOVE
SQL options would be appropriate commands to combine
with this option.
/DestU[ser] username Specifies the user name that is used with the SIGN SQL,
COPY SQL, and MOVE SQL options to connect to a SQL
Server instance that uses SQL Server Authentication. It is an
error to specify DESTUSER in a command line that does not
include the SIGN SQL, COPY SQL, or MOVE SQL option.
/Dump process ID (Optional) Causes the specified process, either the dtexec
utility or the dtsDebugHost.exe process, to pause and
create the debug dump files, .mdmp and .tmp.
To find the process ID for the process that you want to pause,
use Windows Task Manager.
FILE
SQL
SOURCEUSER
SOURCEPASSWORD
SOURCESERVER
/En[crypt] {SQL | FILE}; Path;ProtectionLevel[;password] (Optional). Encrypts the loaded package with the specified
protection level and password, and saves it to the location
specified in Path. The ProtectionLevel determines whether a
password is required.
FILE - Path is the fully-qualified path and file name for the
package.
ProtectionLevel options:
/FC[reate] {SQL | DTS};ParentFolderPath;NewFolderName (Optional). Create a new folder that has the name that you
specified in NewFolderName. The location of the new folder is
indicated by the ParentFolderPath.
O P T IO N DESC RIP T IO N
/FDe[lete] {SQL | DTS}[;ParentFolderPath;FolderName] (Optional). Deletes from SQL Server or SSIS the folder that
was specified by the name in FolderName. The location of the
folder to delete is indicated by the ParentFolderPath.
/FDi[rectory] {SQL | DTS};FolderPath[;S] (Optional). Lists the contents, both folders and packages, in a
folder on SSIS or SQL Server. The optional FolderPath
parameter specifies the folder that you want to view the
content of. The optional S parameter specifies that you want
to view a listing of the contents of the subfolders for the
folder specified in FolderPath.
/FE[xists ] {SQL | DTS};FolderPath (Optional). Verifies if the specified folder exists on SSIS or SQL
Server. The FolderPath parameter is the path and name of the
folder to verify.
/Fi[le] filespec This option specifies that the SSIS package to be operated on
is located in the file system. The filespec value can be
provided as either a Universal Naming Convention (UNC)
path or local path.
DTS
SQL
SOURCEUSER
SOURCEPASSWORD
SOURCESERVER
/FR[ename] {SQL | DTS} [;ParentFolderPath; (Optional). Renames a folder on the SSIS or SQL Server. The
OldFolderName;NewFolderName] ParentFolderPath is the location of the folder to rename. The
OldFolderName is the current name of the folder, and
NewFolderName is the new name to give the folder.
/H[elp] option Displays text extensive help that shows the dtutil options
and describes their use. The option argument is optional. If
the argument is included, the Help text includes detailed
information about the specified option. The following example
displays help for all options:
dtutil /H
dtutil /H Q
O P T IO N DESC RIP T IO N
/I[DRegenerate] Creates a new GUID for the package and updates the
package ID property. When a package is copied, the package
ID remains the same; therefore, the log files contain the same
GUID for both packages. This action creates a new GUID for
the newly-copied package to distinguish it from the original.
/M[ove] {SQL | File | DTS}; pathandname Specifies a move action on an SSIS package. To use this
parameter, first specify the location of the package using the
/FI , /SQ , or /DT option. Next, specify the Move action. This
action requires two arguments, which are separated by a
semicolon:
/Si[gn] {SQL | File | DTS}; path; hash Signs an SSIS package. This action uses three required
arguments, which are separated by semicolons; destination,
path, and hash:
/SourceP[assword] password Specifies the password that is used with the SQL and
SOURCEUSER options to enable the retrieval of an SSIS
package that is stored in a database on a SQL Server instance
that uses SQL Server Authentication. It is an error to specify
SOURCEPASSWORD in a command line that does not include
the SOURCEUSER option.
/SourceS[erver] server_instance Specifies the server name that is used with the SQL option to
enable the retrieval of an SSIS package that is stored in SQL
Server. It is an error to specify SOURCESERVER in a command
line that does not include the SIGN SQL, COPY SQL, or
MOVE SQL option.
/SourceU[ser] username Specifies the user name that is used with the SOURCESERVER
option to enable the retrieval of an SSIS package stored in
SQL Server using SQL Server Authentication. It is an error to
specify SOURCEUSER in a command line that does not
include the SIGN SQL, COPY SQL, or MOVE SQL option.
/SQ[L] package_path Specifies the location of an SSIS package. This option indicates
that the package is stored in the msdb database. The
package_path argument specifies the path and name of the
SSIS package. Folder names are terminated with back slashes.
DTS
FILE
SOURCEUSER
SOURCEPASSWORD
SOURCESERVER
VA L UE DESC RIP T IO N
Remarks
You cannot use command files or redirection with dtutil .
The order of the options within the command line is not significant.
Examples
The following examples detail typical command line usage scenarios.
Copy Examples
To copy a package that is stored in the msdb database on a local instance of SQL Server using Windows
Authentication to the SSIS Package Store, use the following syntax:
To copy a package from a location on the File system to another location and give the copy a different name, use
the following syntax:
To copy a package on the local file system to an instance of SQL Server hosted on another computer, use the
following syntax:
Because the /DestU[ser] and /DestP[assword] options were not used, Windows Authentication is assumed.
To create a new ID for a package after it is copied, use the following syntax:
To create a new ID for all the packages in a specific folder, use the following syntax:
Use a single percent sign (%) when typing the command at the command prompt. Use a double percent sign
(%%) if the command is used inside a batch file.
Delete Examples
To delete a package that is stored in the msdb database on an instance of SQL Server that uses Windows
Authentication, use the following syntax:
To delete a package that is stored in the msdb database on an instance of SQL Server that uses SQL Server
Authentication, use the following syntax:
To delete a package that is stored in the SSIS Package Store, use the following syntax:
To delete a package that is stored in the file system, use the following syntax:
Exists Examples
To determine whether a package exists in the msdb database on a local instance of SQL Server that uses
Windows Authentication, use the following syntax:
To determine whether a package exists in the msdb database on a local instance of SQL Server that uses SQL
Server Authentication, use the following syntax:
NOTE
To determine whether a package exists on a named server, include the SOURCESERVER option and its argument. You can
only specify a server by using the SQL option.
To determine whether a package exists in the local package store, use the following syntax:
To determine whether a package exists in the local file system, use the following syntax:
Move Examples
To move a package that is stored in the SSIS Package Store to the msdb database on a local instance of SQL
Server that uses Windows Authentication, use the following syntax:
To move a package that is stored in the msdb database on a local instance of SQL Server that uses SQL Server
Authentication to the msdb database on another local instance of SQL Server that uses SQL Server
Authentication, use the following syntax:
dtutil /SQL srcPackage /SOURCEUSER srcUserName /SOURCEPASSWORD $Hj45jhd@X /MOVE SQL;destPackage /DESTUSER
destUserName /DESTPASSWORD !38dsFH@v
NOTE
To move a package from one named server to another, include the SOURCES and the DESTS option and their arguments.
You can only specify servers by using the SQL option.
To move a package that is stored in the SSIS Package Store, use the following syntax:
To move a package that is stored in the file system, use the following syntax:
Sign Examples
To sign a package that is stored in a SQL Server database on a local instance of SQL Server that uses Windows
Authentication, use the following syntax:
To locate information about your certificate, use Cer tMgr . The hash code can be viewed in the Cer tMgr utility by
selecting the certificate, and then clicking View to view the properties. The Details tab provides more
information about the certificate. The Thumbprint property is used as the hash value, with spaces removed.
NOTE
The hash used in this example is not a real hash.
For more information, see the CertMgr section in Signing and Checking Code with Authenticode.
Encrypt Examples
The following sample encrypts the file-based PackageToEncrypt.dtsx to the file-based EncryptedPackage.dts using
full package encryption, with a password. The password that is used for the encryption is EncPswd.
See Also
Run Integration Services (SSIS) Packages
SSIS Package Upgrade Wizard F1 Help
11/2/2020 • 8 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the SSIS Package Upgrade Wizard to upgrade packages created by earlier versions of SQL Server to the
package format for the current release of SQL Server Integration Services.
To run the SSIS Package Upgrade Wizard
Upgrade Integration Services Packages Using the SSIS Package Upgrade Wizard
NOTE
This page is only available when you run the SSIS Package Upgrade Wizard from SQL Server Management Studio or at the
command prompt.
Static Options
Package source
Select the storage location that contains the packages to be upgraded. This option has the values listed in the
following table.
VA L UE DESC RIP T IO N
SSIS Package Store Indicates that the packages to be upgraded are in the package
store. The package store consists of the set of file system
folders that the Integration Services service manages. For
more information, see Package Management (SSIS Service).
Microsoft SQL Ser ver Indicates the packages to be upgraded are from an existing
instance of SQL Server.
Folder
Type the name of a folder that contains the packages you want to upgrade or click Browse and locate the folder.
Browse
Browse to locate the folder that contains the packages you want to upgrade.
Package Source Dynamic Options
Package source = SSIS Package Store
Ser ver
Type the name of the server that has the packages to be upgraded, or select this server in the list.
Package source = Microsoft SQL Server
Ser ver
Type the name of the server that has the packages to be upgraded, or select this server from the list.
Use Windows authentication
Select to use Windows Authentication to connect to the server.
Use SQL Ser ver authentication
Select to use SQL Server Authentication to connect to the server. If you use SQL Server Authentication, you must
provide a user name and password.
User name
Type the user name that SQL Server Authentication will use to connect to the server.
Password
Type the password that SQL Server Authentication will use to connect to the server.
NOTE
This page is only available when you run the SSIS Package Upgrade Wizard from SQL Server Management Studio or at the
command prompt.
Static Options
Save to source location
Save the upgraded packages to the same location as specified on the Select Source Location page of the wizard.
If the original packages are stored in the file system and you want the wizard to back up those packages, select the
Save to source location option. For more information, see Upgrade Integration Services Packages Using the
SSIS Package Upgrade Wizard.
Select new destination location
Save the upgraded packages to the destination location that is specified on this page.
Package source
Specify where the upgrade packages are to be stored. This option has the values listed in the following table.
VA L UE DESC RIP T IO N
SSIS Package Store Indicates that the upgraded packages are to be saved to the
Integration Services package store. The package store consists
of the set of file system folders that the Integration Services
service manages. For more information, see Package
Management (SSIS Service).
Microsoft SQL Ser ver Indicates that the upgraded packages are to be saved to an
existing instance of SQL Server.
Folder
Type the name of a folder to which the upgraded packages will be saved, or click Browse and locate the folder.
Browse
Browse to locate the folder to which the upgraded packages will be saved.
Package Source Dynamic Options
Package source = SSIS Package Store
Ser ver
Type the name of the server to which the upgrade packages will be saved, or select a server in the list.
Package source = Microsoft SQL Server
Ser ver
Type the name of the server to which the upgrade packages will be saved, or select this server in the list.
Use Windows authentication
Select to use Windows Authentication to connect to the server.
Use SQL Ser ver authentication
Select to use SQL Server Authentication to connect to the server. If you use SQL Server Authentication, you must
provide a user name and password.
User name
Type the user name to be used when using SQL Server Authentication to connect to the server.
Password
Type the password to be used when using SQL Server Authentication to connect to the server.
NOTE
This option is available only when you specify that the original packages and the upgraded packages are stored in the file
system and in the same folder.
Select Packages page
Use the Select Packages page to select the packages to upgrade. This page lists the packages that are stored in
the location that was specified on the Select Source Location page of the wizard.
Options
Existing package name
Select one or more packages to upgrade.
Upgrade package name
Provide the destination package name, or use the default name that the wizard provides.
NOTE
You can also change the destination package name after upgrading the package. In SQL Server Data Tools (SSDT) or SQL
Server Management Studio, open the upgraded package and change the package name.
Password
Specify the password that is used to decrypt the selected upgrade packages.
Apply to selection
Apply the specified password to decrypt the selected upgrade packages.
See Also
Upgrade Integration Services Packages
Integration Services (SSIS) Package and Project
Parameters
11/2/2020 • 11 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services (SSIS) parameters allow you to assign values to properties within packages at the time of
package execution. You can create project parameters at the project level and package parameters at the package
level. Project parameters are used to supply any external input the project receives to one or more packages in the
project. Package parameters allow you to modify package execution without having to edit and redeploy the
package.
In SQL Server Data Tools you create, modify, or delete project parameters by using the Project.params window.
You create, modify, and delete package parameters by using the Parameters tab in the SSIS Designer. You
associate a new or an existing parameter with a task property by using the Parameterize dialog box. For more
about using the Project.params window and the Parameters tab, see . For more information about the
Create Parameters
VA L UE N A M E DESC RIP T IO N T Y P E O F VA L UE
VA L UE N A M E DESC RIP T IO N T Y P E O F VA L UE
Server Value The value assigned to the parameter Literal or Environment Variable
within the scope of the project, after Reference
the project is deployed to the
Integration Services server. This value
overrides the design default.
You can use a single parameter to assign a value to multiple package properties. A single package property can be
assigned a value only from a single parameter.
Executions and Parameter Values
The execution is an object that represents a single instance of package execution. When you create an execution,
you specify all of the details necessary to run a package such as execution parameter values. You can also modify
the parameters values for existing executions.
When you explicitly set an execution parameter value, the value is applicable only to that particular instance of
execution. The execution value is used instead of a server value or a design value. If you do not explicitly set an
execution value, and a server value has been specified, the server value is used.
When a parameter is marked as required, a server value or execution value must be specified for that parameter.
Otherwise, the corresponding package does not execute. Although the parameter has a default value at design
time, it will never be used once the project is deployed.
Environment Variables
If a parameter references an environment variable, the literal value from that variable is resolved through the
specified environment reference and applied to the parameter. The final literal parameter value that is used for
package execution is referred to as the execution parameter value. You specify the environment reference for an
execution by using the Execute dialog box
If a project parameter references an environment variable and the literal value from the variable cannot be
resolved at execution, the design value is used. The server value is not used.
To view the environment variables that are assigned to parameter values, query the catalog.object_parameters
view. For more information, see catalog.object_parameters (SSISDB Database).
Determining Execution Parameter Values
The following Transact-SQL views and stored procedure can be used to display and set parameter values.
catalog.execution_parameter_values (SSISDB Database)(view)
Shows the actual parameter values in a specific execution.
catalog.get_parameter_values (SSISDB Database) (stored procedure)
Resolves and shows the actual values for the specified package and environment reference.
catalog.object_parameters (SSISDB Database) (view)
Displays the parameters and properties for all packages and projects in the Integration Services catalog, including
the design default and server default values.
catalog.set_execution_parameter_value (SSISDB Database)
Sets the value of a parameter for an instance of execution in the Integration Services catalog.
You can also use the Execute Package dialog box in SQL Server Data Tools (SSDT) modify the parameter value.
For more information, see Execute Package Dialog Box.
You can also use the dtexec /Parameter option to modify a parameter value. For more information, see dtexec
Utility.
Parameter Validation
If parameter values cannot be resolved, the corresponding package execution will fail. To help avoid failures, you
can validate projects and packages by using the Validate dialog box in SQL Server Data Tools (SSDT). Validation
allows you to confirm that all parameters have the necessary values or can resolve the necessary values with
specific environment references. Validation also checks for other common package issues.
For more information, see Validate Dialog Box.
Parameter Example
This example describes a parameter named pkgOptions that is used to specify options for the package in which it
resides.
During design time, when the parameter was created in SQL Server Data Tools, a default value of 1 was assigned
to the parameter. This default value is referred to as the design default. If the project was deployed to the SSISDB
catalog and no other values were assigned to this parameter, the package property corresponding to the
pkgOptions parameter would be assigned the value of 1 during package execution. The design default persists
with the project throughout its life cycle.
While preparing a specific instance of package execution, a value of 5 is assigned to the pkgOptions parameter.
This value is referred to as the execution value because it applies to the parameter only for that particular instance
of execution. When execution starts, the package property corresponding to the pkgOptions parameter is
assigned the value of 5.
Create parameters
You use SQL Server Data Tools (SSDT) to create project parameters and package parameters. The following
procedures provide step-by-step instructions for creating package/project parameters.
NOTE: If you are converting a project that you created using an earlier version of Integration Services to the
project deployment model, you can use the Integration Ser vices Project Conversion Wizard to create
parameters based on configurations. For more information, see Deploy Integration Services (SSIS) Projects
and Packages.
Default value The default value for the parameter assigned at design
time. This is also known as the design default.
NOTE: When you deploy a project to the catalog, several more properties become associated with the
project. To see all properties for all parameters in the catalog, use the catalog.object_parameters
(SSISDB Database) view.
4. Save the project to save changes to parameters. Parameter values are stored in the project file.
WARNING!! You can in-place edit in the list or use the Proper ties window to modify the values of
parameter properties. You can delete a parameter by using the Delete (X) toolbar button. Using the
last toolbar button, you can specify a value for a parameter that is used only when you execute the
package in SQL Server Data Tools.
NOTE: If you re-open the package file without opening the project in SQL Server Data Tools, the
Parameters tab will be empty and disabled.
4. Enter values for the Name , Data Type , Value , Sensitive , and Required properties.
Default value The default value for the parameter assigned at design
time. This is also known as the design default.
5. Save the project to save changes to parameters. Parameter values are stored in configurations in the project
file. Save the project file to commit to disk any changes in the parameter values.
WARNING!!! You can in-place edit in the list or use the Proper ties window to modify the values of
parameter properties. You can delete a parameter by using the Delete (X) toolbar button. Using the
last toolbar button to open the Manage Parameter Values dialog box, you can specify a value for a
parameter that is used only when you execute the package in SQL Server Data Tools.
Options
Proper ty
Select the property of the task that you want to associate with a parameter. This list is populated with all the
properties that can be parameterized.
Use existing parameter
Select this option to associate the property of task with an existing parameter and then select the parameter from
drop-down list.
Do not use parameter
Select this option to remove a reference to a parameter. The parameter is not deleted.
Create new parameter
Select this option to create a new parameter that you want to associate with the property of the task.
Name
Specify the name of the parameter you want to create.
Description
Specify the description for parameter.
Value
Specify the default value for the parameter. This is also known as the design default, which can be overridden later
at the deployment time.
Scope
Specify the scope of the parameter by selecting either Project or Package option. Project parameters are used to
supply any external input the project receives to one or more packages in the project. Package parameters allow
you to modify package execution without having to edit and redeploy the package.
Sensitive
Specify whether the parameter is a sensitive by checking or clearing the check box. Sensitive parameter values are
encrypted in the catalog and appear as a NULL value when viewed with Transact-SQL or SQL Server Management
Studio.
Required
Specify whether the parameter requires that a value, other than the design default, is specified before the package
can execute.
Related Content
Blog entry, SSIS Quick Tip: Required Parameters, on mattmasson.com.
Integration Services (SSIS) Connections
11/2/2020 • 16 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Microsoft SQL Server Integration Services packages use connections to perform different tasks and to
implement Integration Services features:
Connecting to source and destination data stores such as text, XML, Excel workbooks, and relational
databases to extract and load data.
Connecting to relational databases that contain reference data to perform exact or fuzzy lookups.
Connecting to relational databases to run SQL statements such as SELECT, DELETE, and INSERT
commands and also stored procedures.
Connecting to SQL Server to perform maintenance and transfer tasks such as backing up databases
and transferring logins.
Writing log entries in text and XML files and SQL Server tables and package configurations to SQL
Server tables.
Connecting to SQL Server to create temporary work tables that some transformations require to do
their work.
Connecting to Analysis Services projects and databases to access data mining models, process cubes
and dimensions, and run DDL code.
Specifying existing or creating new files and folders to use with Foreach Loop enumerators and tasks.
Connecting to message queues and to Windows Management Instrumentation (WMI), SQL Server
Management Objects (SMO), Web, and mail servers.
To make these connections, Integration Services uses connection managers, as described in the next section.
Connection Managers
Integration Services uses the connection manager as a logical representation of a connection. At design time,
you set the properties of a connection manager to describe the physical connection that Integration Services
creates when the package runs. For example, a connection manager includes the ConnectionString
property that you set at design time; at run time, a physical connection is created using the value in the
connection string property.
A package can use multiple instances of a connection manager type, and you can set the properties on each
instance. At run time, each instance of a connection manager type creates a connection that has different
attributes.
SQL Server Integration Services provides different types of connection managers that enable packages to
connect to a variety of data sources and servers:
There are built-in connection managers that Setup installs when you install Integration Services.
There are connection managers that are available for download from the Microsoft website.
You can create your own custom connection manager if the existing connection managers do not meet
your needs.
Package level and project level connection managers
A connection manager can be created at the package level or at the project level. The connection manager
created at the project level is available all the packages in the project. Whereas, connection manager created
at the package level is available to that specific package.
You use connection managers that are created at the project level in place of data sources, to share
connections to sources. To add a connection manager at the project level, the Integration Services project
must use the project deployment model. When a project is configured to use this model, the Connection
Managers folder appears in Solution Explorer , and the Data Sources folder is removed from Solution
Explorer .
NOTE
If you want to use data sources in your package, you need to convert the project to the package deployment model.
For more information about the two models, and about converting a project to the project deployment model, see
Deploy Integration Services (SSIS) Projects and Packages.
CACHE Reads data from the data flow or Cache Connection Manager
from a cache file (.caw), and can save
data to the cache file.
FLATFILE Connect to data in a single flat file. Flat File Connection Manager
MULTIFILE Connects to multiple files and folders. Multiple Files Connection Manager
TYPE DESC RIP T IO N TO P IC
MULTIFLATFILE Connects to multiple data files and Multiple Flat Files Connection
folders. Manager
IMPORTANT
The connection managers listed in the following table work only with Microsoft SQL Server 2012 Enterprise and
Microsoft SQL Server 2012 Developer.
ORACLE Connects to an Oracle <version info> The Oracle connection manager is the
server. connection manager component of
the Microsoft Connector for Oracle
by Attunity. The Microsoft Connector
for Oracle by Attunity also includes a
source and a destination. For more
information, see the download page,
Microsoft Connectors for Oracle and
Teradata by Attunity.
C O N N EC T IO N M A N A GER O P T IO N S
Analysis Services Connection Manager Add Analysis Services Connection Manager Dialog Box
UI Reference
Multiple Files Connection Manager Add File Connection Manager Dialog Box UI Reference
Flat File Connection Manager Flat File Connection Manager Editor (General Page)
Multiple Flat Files Connection Manager Multiple Flat Files Connection Manager Editor (General
Page)
SQL Server Compact Edition Connection Manager SQL Server Compact Edition Connection Manager
Editor (Connection Page)
C O N N EC T IO N M A N A GER O P T IO N S
Analysis Services Connection Manager Add Analysis Services Connection Manager Dialog Box
UI Reference
Multiple Files Connection Manager Add File Connection Manager Dialog Box UI Reference
C O N N EC T IO N M A N A GER O P T IO N S
Flat File Connection Manager Flat File Connection Manager Editor (General Page)
Multiple Flat Files Connection Manager Multiple Flat Files Connection Manager Editor (General
Page)
SQL Server Compact Edition Connection Manager SQL Server Compact Edition Connection Manager
Editor (Connection Page)
The connection manager you added will show up under the Connections Managers node in the
Solution Explorer . It will also appear in the Connection Managers tab in the SSIS Designer
window for all the packages in the project. The name of the connection manager in this tab will have a
(project) prefix in order to differentiate this project level connection manager from the package level
connection managers.
4. Optionally, right-click the connection manager in the Solution Explorer window under Connection
Managers node (or) in the Connection Managers tab of the SSIS Designer window, click
Rename , and then modify the default name of the connection manager.
NOTE
In the Connection Managers tab of the SSIS Designer window, you won't be able to overwrite the
(project) prefix from the connection manager name. This is by design.
NOTE
You can also delete a project level connection manager from the Connection Manager tab of the SSIS
Designer window opened for any package in the project. You do so by right-clicking the connection manager
in the tab and then by clicking Delete .
C O N N EC T IO N M A N A GER O P T IO N S
Analysis Services Connection Manager Add Analysis Services Connection Manager Dialog Box
UI Reference
Multiple Files Connection Manager Add File Connection Manager Dialog Box UI Reference
Flat File Connection Manager Flat File Connection Manager Editor (General Page)
Multiple Flat Files Connection Manager Multiple Flat Files Connection Manager Editor (General
Page)
SQL Server Compact Edition Connection Manager SQL Server Compact Edition Connection Manager
Editor (Connection Page)
Related Content
Video, Leverage Microsoft Attunity Connector for Oracle to enhance Package Performance, on
technet.microsoft.com
Wiki articles, SSIS Connectivity, on social.technet.microsoft.com
Blog entry, Connecting to MySQL from SSIS, on blogs.msdn.com.
Technical article, Extracting and Loading SharePoint Data in SQL Server Integration Services, on
msdn.microsoft.com.
Technical article, You get "DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER"
error message when using Oracle connection manager in SSIS, on support.microsoft.com.
Data Sources for Integration Services packages
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SQL Server Data Tools (SSDT) includes a design-time object that you can use in Microsoft Integration Services
packages: the data source.
A data source object is a reference to a connection, and at a minimum, it includes a connection string and a data
source identifier. It can also include additional metadata such a description, a name, a user name, and a password.
NOTE: You can add data sources only to projects that are configured to use the package deployment model. If a
project is configured to use the project deployment model, you use connection managers created at the project
level to share connections, in place of using data sources.
For more information about the deployment models, see Deployment of Projects and Packages. For more
information about converting a project to the project deployment model, see Deploy Projects to Integration
Services Server.
The advantages of using data sources in Integration Services packages include the following:
A data source has project scope, which means that a data source created in an Integration Services project is
available to all the packages in the project. A data source can be defined one time and then referenced by
connection managers in multiple packages.
A data source offers synchronization between the data source object and its package references. If the data
source and the packages that reference it reside in the same project, the connection string property of the
data source references is automatically updated when the data source changes.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An ADO connection manager enables a package to connect to ActiveX Data Objects (ADO) objects, such as a
recordset. This connection manager is typically used in custom tasks written in an earlier version of a language,
such as Microsoft Visual Basic 6.0, or in custom tasks that are part of an existing application that uses ADO to
connect to a data source.
When you add an ADO connection manager to a package, Microsoft SQL Server Integration Services creates a
connection manager that will resolve to an ADO connection at run time, sets the connection manager properties,
and adds the connection manager to the Connections collection on the package. The
ConnectionManagerType property of the connection manager is set to ADO .
time , datetimeoffset The package fails unless the package uses parameterized SQL
commands. To use parameterized SQL commands, use the
Execute SQL Task in your package. For more information, see
Execute SQL Task and Parameters and Return Codes in the
Execute SQL Task.
NOTE
For more information about SQL Server data types and how they map to Integration Services data types, see Data Types
(Transact-SQL) and Integration Services Data Types.
See Also
Integration Services (SSIS) Connections
ADO.NET connection manager
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An ADO.NET connection manager enables a package to access data sources by using a .NET provider. Typically,
you use this connection manager to access data sources such as Microsoft SQL Server. You can also access data
sources exposed through OLE DB and XML in custom tasks that are written in managed code, by using a
language such as C#.
When you add an ADO.NET connection manager to a package, SQL Server Integration Services creates a
connection manager that is resolved as an ADO.NET connection at runtime. It sets the connection manager
properties, and adds the connection manager to the Connections collection on the package.
The ConnectionManagerType property of the connection manager is set to ADO.NET . The value of
ConnectionManagerType is qualified to include the name of the .NET provider that the connection manager uses.
time , datetimeoffset The package fails unless the package uses parameterized
SQL commands. To use parameterized SQL commands, use
the Execute SQL Task in your package. For more information,
see Execute SQL Task and Parameters and Return Codes in
the Execute SQL Task.
NOTE
For more information about SQL Server data types and how they map to Integration Services data types, see Data Types
(Transact-SQL) and Integration Services Data Types.
For information about configuring a connection manager programmatically, see ConnectionManager and
Adding Connections Programmatically.
Configure ADO.NET connection manager
Use the Configure ADO.NET Connection Manager dialog box to add a connection to a data source that can
be accessed by using a .NET Framework data provider. For example, one such provider is the SqlClient provider.
The connection manager can use an existing connection, or you can create a new one.
To learn more about the ADO.NET connection manager, see ADO.NET Connection Manager.
Options
Data connections
Select an existing ADO.NET data connection from the list.
Data connection proper ties
View properties and values for the selected ADO.NET data connection.
New
Create an ADO.NET data connection by using the Connection Manager dialog box.
Delete
Select a connection, and then delete it by selecting Delete .
Managed identities for Azure resources authentication
When running SSIS packages on Azure-SSIS integration runtime in Azure Data Factory, you can use the
managed identity associated with your data factory for Azure SQL Database or Azure SQL Managed Instance
authentication. The designated factory can access and copy data from or to your database by using this identity.
NOTE
When you use Azure Active Directory (Azure AD) authentication (including managed identity authentication) to connect to
Azure SQL Database or Azure SQL Managed Instance, you might encounter a problem related to package execution
failure or unexpected behavior change. For more information, see Azure AD features and limitations.
To use managed identity authentication for Azure SQL Database, follow these steps to configure your database:
1. Provision an Azure Active Directory administrator for your Azure SQL server on the Azure portal, if you
haven't already done so. The Azure AD administrator can be an Azure AD user or Azure AD group. If you
grant the group with managed identity an admin role, skip step 2 and 3. The administrator will have full
access to the database.
2. Create contained database users for the data factory managed identity. Connect to the database from or
to which you want to copy data by using tools like SSMS, with an Azure AD identity that has at least
ALTER ANY USER permission. Run the following T-SQL:
3. Grant the data factory managed identity needed permissions, as you normally do for SQL users and
others. Refer to Database-Level Roles for appropriate roles. Run the following code. For more options, see
this document.
To use managed identity authentication for Azure SQL Managed Instance, follow these steps to configure your
database:
1. Provision an Azure Active Directory administrator for your managed instance on the Azure portal, if you
haven't already done so. The Azure AD administrator can be an Azure AD user or Azure AD group. If you
grant the group with managed identity an admin role, skip step 2-4. The administrator will have full
access to the database.
2. Create logins for the data factory managed identity. In SQL Server Management Studio (SSMS), connect
to your Managed Instance using a SQL Server account that is a sysadmin . In master database, run the
following T-SQL:
3. Create contained database users for the data factory managed identity. Connect to the database from or
to which you want to copy data, run the following T-SQL:
4. Grant the data factory managed identity needed permissions as you normally do for SQL users and
others. Run the following code. For more options, see this document.
ALTER ROLE [role name e.g., db_owner] ADD MEMBER [your data factory name];
Finally, configure managed identity authentication for the ADO.NET connection manager. Here are the options to
do this:
Configure at design time. In SSIS Designer, right-click the ADO.NET connection manager, and select
Proper ties . Update the property ConnectUsingManagedIdentity to True .
NOTE
Currently, the connection manager property ConnectUsingManagedIdentity doesn't take effect (indicating that
managed identity authentication doesn't work) when you run SSIS package in SSIS Designer or Microsoft SQL
Server.
Configure at runtime. When you run the package via SQL Server Management Studio (SSMS) or Azure
Data Factory Execute SSIS Package activity, find the ADO.NET connection manager. Update its property
ConnectUsingManagedIdentity to True .
NOTE
In Azure-SSIS integration runtime, all other authentication methods (for example, integrated authentication and
password) preconfigured on the ADO.NET connection manager are overridden when managed identity
authentication is used to establish a database connection.
NOTE
To configure managed identity authentication on existing packages, the preferred way is to rebuild your SSIS project with
the latest SSIS Designer at least once. Redeploy that SSIS project to your Azure-SSIS integration runtime, so that the new
connection manager property ConnectUsingManagedIdentity is automatically added to all ADO.NET connection
managers in your SSIS project. The alternative way is to directly use a property override with property path
\Package.Connections[{the name of your connection
manager}].Proper ties[ConnectUsingManagedIdentity] at runtime.
See also
Integration Services (SSIS) Connections
Analysis Services Connection Manager
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An SQL Server Analysis Services connection manager enables a package to connect to a server that runs an
Analysis Services database or to an Analysis Services project that provides access to cube and dimension data.
You can only connect to an Analysis Services project while developing packages in SQL Server Data Tools (SSDT).
At run time, packages connect to the server and the database to which you deployed the Analysis Services
project.
Both tasks, such as the Analysis Services Execute DDL task and the Analysis Services Processing task, and
destinations, such as the Data Mining Model Training destination, use an Analysis Services connection manager.
For more information about Analysis Services databases, see Multidimensional Model Databases (SSAS).
NOTE
If you use SSIS in Azure Data Factory (ADF) and want to connect to Azure Analysis Services (AAS) instance, you can not
use an account with Multi-Factor Authentication (MFA) enabled, but must use an account that does not require any
interactivity/MFA or a service principal instead. To use the latter, see here to create one and assign the server administrator
role to it, then select Use a specific user name and password to log on to the server in your connection manager,
and finally enter User name: app:YourApplicationID and Password: YourAuthorizationKey .
Indicate whether the connection that is created from the connection manager is retained at run time.
You can set properties through SSIS Designer or programmatically.
For more information about the properties that you can set in SSIS Designer, click one of the following topic:
Add Analysis Services Connection Manager Dialog Box UI Reference
For information about configuring a connection manager programmatically, see ConnectionManager and Adding
Connections Programmatically.
Add Analysis Services Connection Manager Dialog
Box UI Reference
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Add Analysis Ser vices Connection Manager dialog box to create a connection to a server running
SQL Server Analysis Services, or to edit connection properties.
To learn more about the Analysis Services connection manager, see Analysis Services Connection Manager.
Options
Create a connection to a computer running Analysis Ser vices
Use the default connection to a server that is running an instance of Analysis Services, or create a new connection
by clicking Edit .
Edit
Use the Connection Manager dialog box to create a connection to a server that is running an instance of
Analysis Services, and to edit connection properties.
Create a connection to an Analysis Ser vices project in this solution
Specify that the connection will use an Analysis Services project in the open solution.
NOTE
Analysis Services tabular model projects are not supported for this scenario.
See Also
Integration Services Error and Message Reference
Integration Services (SSIS) Connections
Azure Data Lake Analytics connection manager
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A SQL Server Integration Services (SSIS) package can use the Azure Data Lake Analytics connection manager to
connect to a Data Lake Analytics account with one of the two following authentication types:
Azure Active Directory (Azure AD) User Identity
Azure AD Service Identity
The Data Lake Analytics connection manager is a component of the SQL Server Integration Services (SSIS) Feature
Pack for Azure.
NOTE
When you select the Azure AD User Identity authentication option, multi-factor authentication and Microsoft
account authentication are not supported.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A SQL Server Integration Services (SSIS) package can use the Azure Data Lake Store Connection Manager to
connect to an Azure Data Lake Storage Gen1 account with one of the two following authentication types:
Azure AD User Identity
Azure AD Service Identity
The Azure Data Lake Store Connection Manager is a component of the SQL Server Integration Services (SSIS)
Feature Pack for Azure.
NOTE
To ensure that the Azure Data Lake Store Connection Manager and the components that use it - that is, the Data Lake
Storage Gen1 source and the Data Lake Storage Gen1 destination - can connect to services, make sure you download the
latest version of the Azure Feature Pack here.
3. In the Authentication field, choose the appropriate authentication type to access the data in Data Lake
Storage Gen1.
a. If you select the Azure AD User Identity authentication option, do the following things:
a. Provide values for the User Name and Password fields.
b. To test the connection, select Test Connection . If you or the tenant administrator didn't
previously consent to allow SSIS to access your Data Lake Storage Gen1 data, select Accept
when prompted. For more information about this consent experience, see Integrating
applications with Azure Active Directory.
NOTE
When you select the Azure AD User Identity authentication option, multi-factor authentication and
Microsoft account authentication are not supported.
b. If you select the Azure AD Ser vice Identity authentication option, do the following things:
a. Create an Azure Active Directory (AAD) application and service principal to access the Data
Lake Storage Gen1 data.
b. Assign appropriate permissions to let this AAD application access your Data Lake Storage
Gen1 resources. For more information about this authentication option, see Use portal to
create Active Directory application and service principal that can access resources.
c. Provide values for the Client Id , Secret Key , and Tenant Name fields.
d. To test the connection, select Test Connection .
4. Select OK to close the Azure Data Lake Store Connection Manager Editor dialog box.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Azure HDInsight Connection Manager enables an SSIS package to connect to an Azure HDInsight cluster.
The Azure HDInsight Connection Manager is a component of the SQL Server Integration Services (SSIS)
Feature Pack for Azure.
To create and configure an Azure HDInsight Connection Manager , follow the steps below:
1. In the Add SSIS Connection Manager dialog box, select AzureHDInsight , and click Add .
2. In the Azure HDInsight Connection Manager Editor dialog box, specify the Cluster DNS name (without
the protocol prefix), Username , and Password for the HDInsight cluster to connect to.
3. Click OK to close the dialog box.
4. You can see the properties of the connection manager you created in the Proper ties window.
Azure Resource Manager Connection Manager
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Azure Resource Manager Connection Manager enables an SSIS package to manage Azure resources
using a service principal.
The Azure Resource Manager Connection Manager is a component of the SQL Server Integration Services
(SSIS) Feature Pack for Azure.
To create and configure an Azure Resource Manager Connection Manager , follow the steps below:
1. In the Add SSIS Connection Manager dialog box, select AzureResourceManager , and click Add .
2. In the Azure Resource Manager Connection Manager Editor dialog box, specify the Application ID ,
Application Key , and Tenant ID for the service principal. For details about these properties, please refer to this
article.
3. Click OK to close the dialog box.
4. You can see the properties of the connection manager you created in the Proper ties window.
Azure Storage connection manager
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Azure Storage connection manager enables a SQL Server Integration Services (SSIS) package to connect to an
Azure Storage account. The connection manager is a component of the SQL Server Integration Services (SSIS)
Feature Pack for Azure.
In the Add SSIS Connection Manager dialog box, select AzureStorage > Add .
The following properties are available.
Ser vice: Specifies the storage service to connect to.
Account name: Specifies the storage account name.
Authentication: Specifies the authentication method to use. AccessKey, ServicePrincipal, and
SharedAccessSignature authentication are supported.
AccessKey: For this authentication method, specify the Account key .
Ser vicePrincipal: For this authentication method, specify the Application ID , Application key , and
Tenant ID of the service principal. For Test Connection to work, the service principal should be
assigned at least the Storage Blob Data Reader role to the storage account. For more information, see
Grant access to Azure blob and queue data with RBAC in the Azure portal.
SharedAccessSignature: For this authentication method, specify at least the Token of the shared
access signature. To test connection, specify additionally the resource scope to test against. It may be
Ser vice , Container , or Blob . For Container and Blob , specify container name and blob path,
respectively. For more information, see Azure Storage shared access signature overview.
Environment: Specifies the cloud environment hosting the storage account.
Configure at runtime. When you run the package via SQL Server Management Studio (SSMS) or Azure
Data Factory Execute SSIS Package activity, find the Azure Storage connection manager. Update its property
ConnectUsingManagedIdentity to True .
NOTE
In Azure-SSIS integration runtime, all other authentication methods (for example, access key and service principal)
preconfigured on the Azure Storage connection manager are overridden when managed identity authentication is
used for storage operations.
NOTE
To configure managed identity authentication on existing packages, the preferred way is to rebuild your SSIS project with the
latest SSIS Designer at least once. Redeploy that SSIS project to your Azure-SSIS integration runtime, so that the new
connection manager property ConnectUsingManagedIdentity is automatically added to all Azure Storage connection
managers in your SSIS project. The alternative way is to directly use a property override with property path
\Package.Connections[{the name of your connection manager}].Proper ties[ConnectUsingManagedIdentity] at
runtime.
See also
Integration Services (SSIS) Connections
Azure Subscription Connection Manager
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Azure Subscription connection manager enables an SSIS package to connect to an Azure subscription by
using the values you specify for the properties: Azure Subscription ID and Management Certificate.
The Azure Subscription connection manager is a component of the SQL Server Integration Services (SSIS)
Feature Pack for Azure.
1. In the Add SSIS Connection Manager dialog box shown above, you select Azure Subscription , and
click Add . You should see the following Azure Subscription Connection Manager Editor dialog box.
2. Enter your Azure subscription ID, which uniquely identifies an Azure subscription, for the Azure
subscription ID . The value can be found on the Azure Management Portal under Settings page:
3. Choose Management cer tificate store location and Management cer tificate store name from the
drop-down lists.
4. Enter Management cer tificate thumbprint or click the Browse... to choose a certificate from the
selected store. The certificate must be uploaded as a management certificate for the subscription. To do so,
click Upload on the following page of the Azure Portal (see this MSDN post for more detail).
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An Excel connection manager enables a package to connect to a Microsoft Excel workbook file. The Excel source
and the Excel destination that Microsoft SQL Server Integration Services includes use the Excel connection
manager.
IMPORTANT
For detailed info about connecting to Excel files, and about limitations and known issues for loading data from or to Excel
files, see Load data from or to Excel with SQL Server Integration Services (SSIS).
When you add an Excel connection manager to a package, Integration Services creates a connection manager
that is resolved as an Excel connection at run time, sets the connection manager properties, and adds the
connection manager to the Connections collection on the package.
The ConnectionManagerType property of the connection manager is set to EXCEL .
For information about configuring a connection manager programmatically, see ConnectionManager and
Adding Connections Programmatically.
For this solution to work reliably, you might have to also modify the registry settings. The main.cmd file is
as follows:
Save the file in CSV format and change the SSIS package to support a CSV import.
Related Tasks
Load data from or to Excel with SQL Server Integration Services (SSIS)
Excel Source
Excel Destination
File Connection Manager
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data
Factory
A File connection manager enables a package to reference an existing file or folder, or to create a file or
folder at run time. For example, you can reference an Excel file. Certain components in Microsoft SQL
Server Integration Services use information in files to perform their work. For example, an Execute SQL
task can reference a file that contains the SQL statements that the task executes. Other components
perform operations on files. For example, the File System task can reference a file to copy it to a new
location.
VA L UE DESC RIP T IO N
NOTE
You can set the ConnectionString property for the File connection manager by specifying an expression in the
Properties window of SQL Server Data Tools (SSDT). However, to avoid a validation error when you use an
expression to specify the file or folder, in the File Connection Manager Editor , for File/Folder , add a file or
folder path.
To learn more about the File connection manager, see File Connection Manager.
Options
Usage Type
Specify whether the File Connection Manager connects to an existing file or folder or creates a new
file or folder.
VA L UE DESC RIP T IO N
File / Folder
If File , specify the file to use.
If Folder , specify the folder to use.
Browse
Select the file or folder by using the Select File or Browse for Folder dialog box.
Add File Connection Manager Dialog Box UI
Reference
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Add File Connection Manager dialog box to define a connection to a group of files or folders.
To learn more about the Multiple Files connection manager, see Multiple Files Connection Manager.
NOTE
The built-in tasks and data flow components in Integration Services do not use the Multiple Files connection manager.
However, you can use this connection manager in the Script task or Script component.
Options
Usage type
Specify the type of files to use for the multiple files connection manager.
VA L UE DESC RIP T IO N
Files / Folders
View the files or folders that you have added by using the buttons described as follows.
Add
Add a file by using the Select Files dialog box, or add a folder by using the Browse for Folder dialog box.
Edit
Select a file or folder, and then replace it with a different file or folder by using the Select Files or Browse for
Folder dialog box.
Remove
Select a file or folder, and then remove it from the list by using the Remove button.
Arrow buttons
Select a file or folder, and then use the arrow buttons to move it up or down to specify the sequence of access.
See Also
Integration Services Error and Message Reference
Suggest Column Types Dialog Box UI Reference
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Suggest Column Types dialog box to identify the data type and length of columns in a Flat File
Connection Manager based on a sampling of the file content.
To learn more about the data types used by Integration Services, see Integration Services Data Types.
Options
Number of rows
Type or select the number of rows in the sample that the algorithm uses.
Suggest the smallest integer data type
Clear this check box to skip the assessment. If selected, determines the smallest possible integer data type for
columns that contain integral numeric data.
Suggest the smallest real data type
Clear this check box to skip the assessment. If selected, determines whether columns that contain real numeric data
can use the smaller real data type, DT_R4.
Identify Boolean columns using the following values
Type the two values that you want to use as the Boolean values true and false. The values must be separated by a
comma, and the first value represents True.
Pad string columns
Select this check box to enable string padding.
Percent padding
Type or select the percentage of the column lengths by which to increase the length of columns for character data
types. The percentage must be an integer.
See Also
Integration Services Error and Message Reference
Flat File Connection Manager
Flat File Connection Manager
11/2/2020 • 13 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A Flat File connection manager enables a package to access data in a flat file. For example, the Flat File
source and destination can use Flat File connection managers to extract and load data.
The Flat File connection manager can access only one file. To reference multiple files, use a Multiple Flat Files
connection manager instead of a Flat File connection manager. For more information, see Multiple Flat Files
Connection Manager.
Column Length
By default, the Flat File connection manager sets the length of string columns to 50 characters. In the Flat
File Connection Manager Editor dialog box, you can evaluate sample data and automatically resize the
length of these columns to prevent truncation of data or excess column width. Also, unless you subsequently
resize the column length in a Flat File source or a transformation, the column length of string column
remains the same throughout the data flow. If these string columns map to destination columns that are
narrower, warnings appear in the user interface. Moreover, at run time, errors may occur due to data
truncation. To avoid errors or truncation, you can resize the columns to be compatible with the destination
columns in the Flat File connection manager, the Flat File source, or a transformation. To modify the length of
output columns, you set the Length property of the output column on the Input and Output Proper ties
tab in the Advanced Editor dialog box.
If you update column lengths in the Flat File connection manager after you have added and configured the
Flat File source that uses the connection manager, you do not have to manually resize the output columns in
the Flat File source. When you open the Flat File Source dialog box, the Flat File source provides an option
to synchronize the column metadata.
VA L UE DESC RIP T IO N
Ragged right Ragged right files are files in which every column has a
fixed width, except for the last column. It is delimited by
the row delimiter.
Text qualifier
Specify the text qualifier to use. For example, you can specify that text fields are enclosed in quotation marks.
NOTE
After you select a text qualifier, you cannot re-select the None option. Type None to de-select the text qualifier.
VA L UE DESC RIP T IO N
Ver tical bar {|} The header row is delimited by a vertical bar.
VA L UE DESC RIP T IO N
Column delimiter
Select from the list of available column delimiters, or enter the delimiter text.
VA L UE DESC RIP T IO N
Refresh
View the effect of changing the delimiters to skip by clicking Refresh . This button only becomes visible after
you have changed other connection options.
Preview rows
View sample data in the flat file, divided into columns and rows by using the options selected.
Reset Columns
Remove all but the original columns by clicking Reset Columns .
Format = Fixed Width
Font
Select the font in which to display the preview data.
Source data columns
Adjust the width of the row by sliding the vertical red row marker, and adjust the width of the columns by
clicking the ruler at the top of the preview window
Row width
Specify the length of the row before adding delimiters for individual columns. Or, drag the vertical red line in
the preview window to mark the end of the row. The row width value is automatically updated.
Reset Columns
Remove all but the original columns by clicking Reset Columns .
Format = Ragged Right
NOTE
Ragged right files are files in which every column has a fixed width, except for the last column. It is delimited by the
row delimiter.
Font
Select the font in which to display the preview data.
Source data columns
Adjust the width of the row by sliding the vertical red row marker, and adjust the width of the columns by
clicking the ruler at the top of the preview window
Row delimiter
Select from the list of available row delimiters, or enter the delimiter text.
VA L UE DESC RIP T IO N
Reset Columns
Remove all but the original columns by clicking Reset Columns .
DataType Select from the list of available data types. For more
information, see Integration Services Data Types.
True: Text data in the flat file is qualified. False: Text data in
the flat file is NOT qualified.
New
Add a new column by clicking New . By default, the New button adds a new column at the end of the list. The
button also has the following options, available in the drop-down list.
VA L UE DESC RIP T IO N
Delete
Select a column, and then remove it by clicking Delete .
Suggest Types
Use the Suggest Column Types dialog box to evaluate sample data in the file and to obtain suggestions
for the data type and length of each column. For more information, see Suggest Column Types Dialog Box UI
Reference.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An FTP connection manager enables a package to connect to a File Transfer Protocol (FTP) server. The FTP task
that SQL Server Integration Services includes uses this connection manager.
When you add an FTP connection manager to a package, Integration Services creates a connection manager that
can be resolved as an FTP connection at run time, sets the connection manager properties, and adds the
connection manager to the Connections collection on the package.
The ConnectionManagerType property of the connection manager is set to FTP .
You can configure the FTP connection manager in the following ways:
Specify a server name and server port.
Specify anonymous access, or provide a user name and a password for basic authentication.
IMPORTANT
The FTP connection manager supports only anonymous authentication and basic authentication. It does not
support Windows Authentication.
Set the time-out, number of retries, and the amount of data to copy at a time.
Indicate whether the FTP connection manager uses passive or active mode.
Depending on the configuration of the FTP site to which the FTP connection manager connects, you may need to
change the following default values of the connection manager:
The server port is set to 21. You should specify the port that the FTP site listens to.
The user name is set to "anonymous". You should provide the credentials that the FTP site requires.
Active/Passive Modes
An FTP connection manager can send and receive files using either active mode or passive mode. In active mode,
the server initiates the data connection, and in passive mode, the client initiates the data connection.
For information about configuring a connection manager programmatically, see ConnectionManager and
Adding Connections Programmatically.
To learn more about the FTP connection manager, see FTP Connection Manager.
Options
Ser ver name
Provide the name of the FTP server.
Ser ver por t
Specify the port number on the FTP server to use for the connection. The default value of this property is 21 .
User name
Provide a user name to access the FTP server. The default value of this property is anonymous .
Password
Provide the password to access the FTP server.
Time-out (in seconds)
Specify the number of seconds the task takes before timing out. A value of 0 indicates an infinite amount of time.
The default value of this property is 60 .
Use passive mode
Specify whether the server or the client initiates the connection. The server initiates the connection in active
mode, and the client activates the connection in passive mode. The default value of this property is active
mode .
Retries
Specify the number of times the task attempts to make a connection. A value of 0 indicates no limit to the
number of attempts.
Chunk size (in KB)
Provide a chunk size in kilobytes for transmitting data.
Test Connection
After configuring the FTP Connection Manager, confirm that the connection is viable by clicking Test
Connection .
See Also
FTP Task
Integration Services (SSIS) Connections
Hadoop Connection Manager
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Hadoop Connection Manager enables a SQL Server Integration Services (SSIS) package to connect to a
Hadoop cluster, by using the values you specify for the properties.
C:> Ksetup
default realm = REALM.COM (external)
REALM.com:
kdc = <your_kdc_server_address>
Option 2: Enable mutual trust between the Windows domain and the Kerberos realm
Requirements:
The gateway computer must join a Windows domain.
You need permission to update the domain controller's settings.
How to configure:
NOTE
Replace REALM.COM and AD.COM in the following tutorial with your own respective realm and domain controller, as
needed.
[libdefaults]
default_realm = REALM.COM
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
[realms]
REALM.COM = {
kdc = node.REALM.COM
admin_server = node.REALM.COM
}
AD.COM = {
kdc = windc.ad.com
admin_server = windc.ad.com
}
[domain_realm]
.REALM.COM = REALM.COM
REALM.COM = REALM.COM
.ad.com = AD.COM
ad.com = AD.COM
[capaths]
AD.COM = {
REALM.COM = .
}
2. Establish trust from the Windows domain to the Kerberos realm. In the following example, [password] is
the password for the principal krbtgt/[email protected] .
C:> netdom trust REALM.COM /Domain: AD.COM /add /realm /password:[password]
d. Use the Ksetup command to specify the encryption algorithm to be used on the specific realm.
C:> ksetup /SetEncTypeAttr REALM.COM DES-CBC-CRC DES-CBC-MD5 RC4-HMAC-MD5 AES128-CTS-HMAC-SHA1-96
AES256-CTS-HMAC-SHA1-96
4. To use the Kerberos principal in the Windows domain, create the mapping between the domain account
and Kerberos principal.
a. Go to Administrative tools > Active Director y Users and Computers .
b. Configure advanced features by selecting View > Advanced Features .
c. Locate the account to which you want to create mappings, right-click to view Name Mappings , and
then select the Kerberos Names tab.
d. Add a principal from the realm.
See also
Hadoop Hive Task
Hadoop Pig Task
Hadoop File System Task
HTTP Connection Manager
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An HTTP connection enables a package to access a Web server by using HTTP to send or receive files. The Web
Service task that SQL Server Integration Services includes uses this connection manager.
When you add an HTTP connection manager to a package, Integration Services creates a connection manager
that will resolve to an HTTP connection at run time, sets the connection manager properties, and adds the
connection manager to the Connections collection on the package.
The ConnectionManagerType property of the connection manager is set to HTTP.
You can configure the HTTP connection manager the following ways:
Use credentials. If the connection manager uses credentials, its properties include the user name,
password, and domain.
IMPORTANT
The HTTP connection manager supports only anonymous authentication and basic authentication. It does not
support Windows Authentication.
Use a client certificate. If the connection manager uses a client certificate, its properties include the
certificate name.
Provide a time-out for connecting to the server and a chunk size for writing data.
Use a proxy server. The proxy server can also be configured to use credentials and to bypass the proxy
server and use local addresses instead.
IMPORTANT
The HTTP connection manager supports only anonymous authentication and basic authentication. It does not support
Windows Authentication.
To learn more about the HTTP connection manager, see HTTP Connection Manager. To learn more about a
common usage scenario for the HTTP Connection Manager, see Web Service Task.
Options
Ser ver URL
Type the URL for the server.
If you plan to use the Download WSDL button on the General page of the Web Ser vice Task Editor to
download a WSDL file, type the URL for the WSDL file. This URL ends with "?wsdl".
Use credentials
Specify whether you want the HTTP Connection Manager to use the user's security credentials for
authentication.
User name
If the HTTP Connection Manager uses credentials, you must specify a user name, password, and domain.
Password
If the HTTP Connection Manager uses credentials, you must specify a user name, password, and domain.
Domain
If the HTTP Connection Manager uses credentials, you must specify a user name, password, and domain.
Use client cer tificate
Specify whether you want the HTTP Connection Manager to use a client certificate for authentication.
Cer tificate
Select a certificate from the list by using the Select Cer tificate dialog box. The text box displays the name
associated with this certificate.
Time-out (in seconds)
Provide a time-out for connecting to the Web server. The default value of this property is 30 seconds.
Chunk size (in KB)
Provide a chunk size for writing data.
Test Connection
After configuring the HTTP Connection Manager, confirm that the connection is viable by clicking Test
Connection .
See Also
Web Service Task
Integration Services (SSIS) Connections
MSMQ Connection Manager
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An MSMQ connection manager enables a package to connect to a message queue that uses Message Queuing
(also known as MSMQ). The Message Queue task that Microsoft SQL Server Integration Services includes uses
an MSMQ connection manager.
When you add an MSMQ connection manager to a package, Integration Services creates a connection manager
that will resolve to an MSMQ connection at run time, sets the connection manager properties, and adds the
connection manager to the Connections collection on the package. The ConnectionManagerType property
of the connection manager is set to MSMQ .
You can configure an MSMQ connection manager in the following ways:
Provide a connection string.
Provide the path of the message queue to connect to.
The format of the path depends on the type of queue, as shown in the following table.
Q UEUE T Y P E SA M P L E PAT H
For information about configuring a connection manager programmatically, see ConnectionManager and
Adding Connections Programmatically.
NOTE
The MSMQ connection manager supports local public and private queues and remote public queues. It does not support
remote private queues. For a workaround that uses the Script Task, see Sending to a Remote Private Message Queue with
the Script Task.
Options
Name
Provide a unique name for the MSMQ connection manager in the workflow. The name provided will be
displayed within SSIS Designer.
Description
Describe the connection manager. As a best practice, describe the connection manager in terms of its purpose, to
make packages self-documenting and easier to maintain.
Path
Type the complete path of the message queue. The format of the path depends on the type of queue.
Q UEUE T Y P E SA M P L E PAT H
See Also
Message Queue Task
Integration Services (SSIS) Connections
Multiple Files Connection Manager
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A Multiple Files connection manager enables a package to reference existing files and folders, or to create files
and folders at run time.
NOTE
The built-in tasks and data flow components in Integration Services do not use the Multiple Files connection manager.
However, you can use this connection manager in the Script task or Script component. For information about how to use
connection managers in the Script task, see Connecting to Data Sources in the Script Task. For information about how to
use connection managers in the Script component, see Connecting to Data Sources in the Script Component.
VA L UE DESC RIP T IO N
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A Multiple Flat Files connection manager enables a package to access data in multiple flat files. For example, a
Flat File source can use a Multiple Flat Files connection manager when the Data Flow task is inside a loop
container, such as the For Loop container. On each loop of the container, the Flat File source loads data from
the next file name that the Multiple Flat Files connection manager provides.
When you add a Multiple Flat Files connection manager to a package, SQL Server Integration Services creates
a connection manager that will resolve to a Multiple Flat Files connection at run time, sets the properties on
the Multiple Flat Files connection manager, and adds the Multiple Flat Files connection manager to the
Connections collection of the package.
The ConnectionManagerType property of the connection manager is set to MULTIFL ATFILE .
You can configure the Multiple Flat Files connection manager in the following ways:
Specify the files, locale, and code page to use. The locale is used to interpret locale-sensitive data such
as dates, and the code page is used to convert string data to Unicode.
Specify the file format. You can use a delimited, fixed width, or ragged right format.
Specify a header row, data row, and column delimiters. Column delimiters can be set at the file level
and overwritten at the column level.
Indicate whether the first row in the files contains column names.
Specify a text qualifier character. Each column can be configured to recognize a text qualifier.
Set properties such as the name, data type, and maximum width on individual columns.
When the Multiple Flat Files connection manager references multiple files, the paths of the files are separated
by the pipe (|) character. The ConnectionString property of the connection manager has the following
format:
<path>|<path>
You can also specify multiple files by using wildcard characters. For example, to reference all the text files on
the C drive, the value of the ConnectionString property can be set to C:\*.txt.
If a Multiple Flat Files connection manager references multiple files, all the files must have the same format.
By default, the Multiple Flat Files connection manager sets the length of string columns to 50 characters. In the
Multiple Flat Files Connection Manager Editor dialog box, you can evaluate sample data and
automatically resize the length of these columns to prevent truncation of data or excess column width. Unless
you resize the column length in a Flat File source or a transformation, the column length remains the same
throughout the data flow. If these columns map to destination columns that are narrower, warnings appear in
the user interface, and at run time, errors may occur due to data truncation. You can resize the columns to be
compatible with the destination columns in the Flat File connection manager, the Flat File source, or a
transformation. To modify the length of output columns, you set the Length property of the output column
on the Input and Output Proper ties tab in the Advanced Editor dialog box.
If you update column lengths in the Multiple Flat Files connection manager after you have added and
configured the Flat File source that uses the connection manager, you do not have to manually resize the
output columns in the Flat File source. When you open the Flat File Source dialog box, the Flat File source
provides an option to synchronize the column metadata.
VA L UE DESC RIP T IO N
Ragged right Ragged right files are files in which every column has a fixed
width, except for the last column, which is delimited by the
row delimiter, specified on the Columns page.
Text qualifier
Specify the text qualifier to use. For example, you can specify to enclose text with quotation marks.
Header row delimiter
Select from the list of delimiters for header rows, or enter the delimiter text.
VA L UE DESC RIP T IO N
Ver tical bar {|} The header row is delimited by a vertical bar.
VA L UE DESC RIP T IO N
Column delimiter
Select from the list of available column delimiters, or enter the delimiter text.
VA L UE DESC RIP T IO N
Reset Columns
Remove all but the original columns by clicking Reset Columns .
Format = Fixed Width
Font
Select the font in which to display the preview data.
Source data columns
Adjust the width of the row by sliding the vertical row marker, and adjust the width of the columns by clicking
the ruler at the top of the preview window
Row width
Specify the length of the row before adding delimiters for individual columns. Or, drag the vertical line in the
preview window to mark the end of the row. The row width value is automatically updated.
Reset Columns
Remove all but the original columns by clicking Reset Columns .
Format = Ragged Right
NOTE
Ragged right files are those in which every column has a fixed width, except for the last column. It is delimited by the
row delimiter.
Font
Select the font in which to display the preview data.
Source data columns
Adjust the width of the row by sliding the vertical row marker, and adjust the width of the columns by clicking
the ruler at the top of the preview window
Row delimiter
Select from the list of available row delimiters, or enter the delimiter text.
VA L UE DESC RIP T IO N
Reset Columns
Remove all but the original columns by clicking Reset Columns .
DataType Select from the list of available data types. For more
information, see Integration Services Data Types.
New
Add a new column by clicking New . By default, the New button adds a new column at the end of the list. The
button also has the following options, available in the dropdown list.
VA L UE DESC RIP T IO N
Delete
Select a column, and then remove it by clicking Delete .
Suggest Types
Use the Suggest Column Types dialog box to evaluate sample data in the first selected file and to obtain
suggestions for the data type and length of each column. For more information, see Suggest Column Types
Dialog Box UI Reference.
See Also
Flat File Source
Flat File Destination
Integration Services (SSIS) Connections
OData Connection Manager
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Connect to an OData data source with an OData connection manager. An OData Source component uses an OData
connection manager to connect to an OData data source and consume data from the service. For more info, see
OData Source.
enter in the editor are persisted in the package. The password value is encrypted according to the package
protection level.
There are several ways to parameterize the username and password values or to store them outside the package.
For example, you can use parameters, or set the connection manager properties directly when you run the package
from SQL Server Management Studio.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An ODBC connection manager enables a package to connect to a variety of database management systems using
the Open Database Connectivity specification (ODBC).
When you add an ODBC connection to a package and set the connection manager properties, SQL Server
Integration Services creates a connection manager and adds the connection manager to the Connections
collection of the package. At run time the connection manager is resolved as a physical ODBC connection.
The ConnectionManagerType property of the connection manager is set to ODBC .
You can configure the ODBC connection manager in the following ways:
Provide a connection string that references a user or system data source name.
Specify the server to connect to.
Indicate whether the connection is retained at run time.
For information about configuring a connection manager programmatically, see ConnectionManager and Adding
Connections Programmatically.
See Also
Integration Services (SSIS) Connections
OLE DB connection manager
11/2/2020 • 7 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An OLE DB connection manager enables a package to connect to a data source by using an OLE DB provider.
For example, an OLE DB connection manager that connects to SQL Server can use the Microsoft OLE DB
Provider for SQL Server.
NOTE
The SQL Server Native Client 11.0 OLEDB provider doesn't support the new connection string key words
(MultiSubnetFailover=True) for multi-subnet failover clustering. For more information, see the SQL Server Release
Notes.
NOTE
If the data source is Microsoft Office Excel 2007 or Microsoft Office Access 2007, the data source requires a different
data provider than earlier versions of Excel or Access. For more information, see Connect to an Excel Workbook and
Connect to an Access Database.
Several SQL Server Integration Services tasks and data flow components use an OLE DB connection manager.
For example, the OLE DB source and OLE DB destination use this connection manager to extract and load
data. The Execute SQL task can use this connection manager to connect to a SQL Server database to run
queries.
You can also use the OLE DB connection manager to access OLE DB data sources in custom tasks written in
unmanaged code that uses a language such as C++.
When you add an OLE DB connection manager to a package, Integration Services creates a connection
manager that resolves to an OLE DB connection at runtime, sets the connection manager properties, and
adds the connection manager to the Connections collection on the package.
The ConnectionManagerType property of the connection manager is set to OLEDB .
Configure the OLE DB connection manager in the following ways:
Provide a specific connection string configured to meet the requirements of the selected provider.
Depending on the provider, include the name of the data source to connect to.
Provide security credentials as appropriate for the selected provider.
Indicate whether the connection created from the connection manager is retained at runtime.
NOTE
If the data source is Microsoft Office Excel 2007, the data source requires a different connection manager than earlier
versions of Excel. For more information, see Connect to an Excel Workbook.
If the data source is Microsoft Office Access 2007, the data source requires a different OLE DB provider than earlier
versions of Access. For more information, see Connect to an Access Database.
To learn more about the OLE DB connection manager, see OLE DB Connection Manager.
Options
Data connections
Select an existing OLE DB data connection from the list.
Data connection proper ties
View properties and values for the selected OLE DB data connection.
New
Create an OLE DB data connection by using the Connection Manager dialog box.
Delete
Select a data connection, and then delete it by selecting Delete .
Managed identities for Azure resources authentication
When running SSIS packages on Azure-SSIS integration runtime in Azure Data Factory, use the managed
identity associated with your data factory for Azure SQL Database or Managed Instance authentication. The
designated factory can access and copy data from or to your database by using this identity.
NOTE
When you use Azure Active Directory (Azure AD) authentication (including managed identity authentication) to
connect to Azure SQL Database or Managed Instance, you might encounter a problem related to package execution
failure or unexpected behavior change. For more information, see Azure AD features and limitations.
To use managed identity authentication for Azure SQL Database, follow these steps to configure your
database:
1. Provision an Azure Active Directory administrator for your Azure SQL server on the Azure portal, if
you haven't already done so. The Azure AD administrator can be an Azure AD user or Azure AD group.
If you grant the group with managed identity an admin role, skip step 2 and 3. The administrator will
have full access to the database.
2. Create contained database users for the data factory managed identity. Connect to the database from
or to which you want to copy data by using tools like SSMS, with an Azure AD identity that has at least
ALTER ANY USER permission. Run the following T-SQL:
CREATE USER [your data factory name] FROM EXTERNAL PROVIDER;
3. Grant the data factory managed identity needed permissions, as you normally do for SQL users and
others. Refer to Database-Level Roles for appropriate roles. Run the following code. For more options,
see this document.
To use managed identity authentication for Azure SQL Managed Instance, follow these steps to configure
your database:
1. Provision an Azure Active Directory administrator for your managed instance on the Azure portal, if
you haven't already done so. The Azure AD administrator can be an Azure AD user or Azure AD group.
If you grant the group with managed identity an admin role, skip step 2-4. The administrator will have
full access to the database.
2. Create logins for the data factory managed identity. In SQL Server Management Studio (SSMS),
connect to your Managed Instance using a SQL Server account that is a sysadmin . In master
database, run the following T-SQL:
3. Create contained database users for the data factory managed identity. Connect to the database from
or to which you want to copy data, run the following T-SQL:
4. Grant the data factory managed identity needed permissions as you normally do for SQL users and
others. Run the following code. For more options, see this document.
ALTER ROLE [role name e.g., db_owner] ADD MEMBER [your data factory name];
Then configure OLE DB provider for the OLE DB connection manager. Here are the options to do this:
Configure at design time. In SSIS Designer, double-click the OLE DB connection manager to open
the Connection Manager window. In the Provider drop-down list, select Microsoft OLE DB
Driver for SQL Ser ver .
NOTE
Other providers in the drop-down list might not support managed identity authentication.
Configure at runtime. When you run the package via SQL Server Management Studio (SSMS) or
Azure Data Factory Execute SSIS Package activity, find the connection manager property
ConnectionString for the OLE DB connection manager. Update the connection property Provider to
MSOLEDBSQL (that is, Microsoft OLE DB Driver for SQL Server).
Finally, configure managed identity authentication for the OLE DB connection manager. Here are the options
to do this:
Configure at design time. In SSIS Designer, right-click the OLE DB connection manager, and select
Proper ties . Update the property ConnectUsingManagedIdentity to True .
NOTE
Currently, the connection manager property ConnectUsingManagedIdentity doesn't take effect (indicating
that managed identity authentication doesn't work) when you run SSIS package in SSIS Designer or Microsoft
SQL Server.
Configure at runtime. When you run the package via SSMS or an Execute SQL Package activity,
find the OLE DB connection manager, and update its property ConnectUsingManagedIdentity to True .
NOTE
In Azure-SSIS integration runtime, all other authentication methods (for example, integrated security and
password) preconfigured on the OLE DB connection manager are overridden when managed identity
authentication is used to establish a database connection.
NOTE
To configure managed identity authentication on existing packages, the preferred way is to rebuild your SSIS project
with the latest SSIS Designer at least once. Redeploy that SSIS project to your Azure-SSIS integration runtime, so that
the new connection manager property ConnectUsingManagedIdentity is automatically added to all OLE DB
connection managers in your SSIS project. The alternative way is to directly use a property override with property path
\Package.Connections[{the name of your connection
manager}].Proper ties[ConnectUsingManagedIdentity] at runtime.
See also
OLE DB Source
OLE DB Destination
Execute SQL Task
Integration Services (SSIS) Connections
SAP BW Connection Manager
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The SAP BW connection manager is the connection manager component of the Microsoft Connector 1.1 for SAP
BW. Thus, the SAP BW connection manager provides the connectivity to an SAP Netweaver BW version 7 system
that the source and destination components of the Microsoft Connector 1.1 for SAP BW need. (The SAP BW source
and destination that are part of the Microsoft Connector 1.1 for SAP BW package are the only Integration Services
components that use the SAP BW connection manager.)
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
When you add an SAP BW connection manager to a package, the ConnectionManagerType property of the
connection manager is set to SAPBI .
IMPORTANT
If the data that is transferred contains sensitive information, the log files will also contain that sensitive information.
Use the values that you have entered to test the connection.
If you do not know all the values that are required to configure the connection manager, you might have to ask
your SAP administrator.
For a walkthrough that demonstrates how to configure and use the SAP BW connection manager, source, and
destination, see the white paper, Using SQL Server 2008 Integration Services with SAP BI 7.0. This white paper also
shows how to configure the required objects in SAP BW.
Using the SSIS Designer to Configure the Source
For more information about the properties of the SAP BW connection manager that you can set in SSIS Designer,
click the following topic:
SAP BW Connection Manager Edit or
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
NOTE
If you do not know all the values that are required to configure the connection manager, you might have to ask your SAP
administrator.
Client
Specify the client number of the system.
Language
Specify the language that the system uses. For example, specify EN for English.
User name
Specify the user name that will be used to connect to the system.
Password
Specify the password that will be used with the user name.
Use single application ser ver
Connect to a single application server.
To connect to a group of load-balanced servers, use the Use load balancing option instead.
Host
If connecting to a single application server, specify the host name.
NOTE
This option is only available if you have selected the Use single application ser ver option.
System number
If connecting to a single application server, specify the system number.
NOTE
This option is only available if you have selected the Use single application ser ver option.
NOTE
This option is only available if you have selected the Use load balancing option.
Group
If connecting to a group of load-balanced servers, specify the name of the server group name.
NOTE
This option is only available if you have selected the Use load balancing option.
SID
If connecting to a group of load-balanced servers, specify the System ID for the connection.
NOTE
This option is only available if you have selected the Use load balancing option.
Log director y
Enable logging for the components of the Microsoft Connector 1.1 for SAP BW.
To enable logging, specify a directory for the log files that are created before and after each RFC function call. (This
logging feature creates many log files in XML format. As these log files also contain all the rows of data that are
transferred, these log files may consume a large amount of disk space.)
IMPORTANT
If the data that is transferred contains sensitive information, the log files will also contain that sensitive information.
To specify the log directory, you can either enter the directory path manually, or click Browse and browse to the
log directory.
If you do not select a log directory, logging is not enabled.
Browse
Browse to select a folder for the log directory.
Test Connection
Test the connection using the values that you have provided. After clicking Test Connection , a message box
appears and indicates whether the connection succeeded or failed.
See Also
Microsoft Connector for SAP BW Components
SMTP Connection Manager
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An SMTP connection manager enables a package to connect to a Simple Mail Transfer Protocol (SMTP) server.
The Send Mail task that Microsoft SQL Server Integration Services includes uses an SMTP connection manager.
When using Microsoft Exchange as the SMTP server, you may need to configure the SMTP connection manager
to use Windows Authentication. Exchange servers may be configured to not allow unauthenticated SMTP
connections.
IMPORTANT
The SMTP connection manager supports only anonymous authentication and Windows Authentication. It does not
support basic authentication.
Specify whether to encrypt communication using Transport Layer Security (TLS), previously known as
Secure Sockets Layer (SSL), when sending e-mail messages.
You can set properties through SSIS Designer or programmatically.
For more information about the properties that you can set in SSIS Designer, see .
SMTP Connection Manager Edit or
For information about configuring a connection manager programmatically, see ConnectionManager and Adding
Connections Programmatically.
IMPORTANT
The SMTP connection manager supports only anonymous authentication and Windows Authentication. It does not
support basic authentication.
NOTE
When using Microsoft Exchange as the SMTP server, you may need to set Use Windows Authentication to True .
Exchange servers may be configured to disallow unauthenticated SMTP connections.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An SMO connection manager enables a package to connect to a SQL Management Object (SMO) server. The
transfer tasks that SQL Server Integration Services includes use an SMO connection manager. For example, the
Transfer Logins task that transfers SQL Server logins uses an SMO connection manager.
When you add an SMO connection manager to a package, Integration Services creates a connection manager
that will resolve to an SMO connection at run time, sets the connection manager properties, and adds the
connection manager to the Connections collection on the package. The ConnectionManagerType property
of the connection manager is set to SMOSer ver .
You can configure an SMO connection manager in the following ways:
Specify the name of a server on which SQL Server is installed.
Select the authentication mode for connecting to the server.
For information about configuring a connection manager programmatically, see ConnectionManager and
Adding Connections Programmatically.
See Also
Integration Services (SSIS) Connections
SQL Server Compact Edition Connection Manager
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A SQL Server Compact connection manager enables a package to connect to a SQL Server Compact database.
The SQL Server Compact destination that Microsoft SQL Server Integration Services includes uses this
connection manager to load data into a table in a SQL Server Compact database.
NOTE
On a 64-bit computer, you must run packages that connect to SQL Server Compact data sources in 32-bit mode. The
SQL Server Compact provider that Integration Services uses to connect to SQL Server Compact data sources is available
only in a 32-bit version.
VA L UE DESC RIP T IO N
Shared Read Specifies that other users can read from the database at the
same time.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A WMI connection manager enables a package to use Windows Management Instrumentation (WMI) to manage
information in an enterprise environment. The Web Service task that Microsoft SQL Server Integration Services
includes uses a WMI connection manager.
When you add a WMI connection manager to a package, Integration Services creates a connection manager that
will resolve to a WMI connection at run time, sets the connection manager properties, and adds the connection
manager to the Connections collection on the package. The ConnectionManagerType property of the
connection manager is set to WMI .
For information about configuring a connection manager programmatically, see ConnectionManager and
Adding Connections Programmatically.
See Also
Web Service Task
Integration Services (SSIS) Connections
Control Flow
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A package consists of a control flow and, optionally, one or more data flows. SQL Server Integration Services
provides three different types of control flow elements: containers that provide structures in packages, tasks
that provide functionality, and precedence constraints that connect the executables, containers, and tasks into
an ordered control flow.
For more information, see Precedence Constraints, Integration Services Containers, and Integration Services
Tasks.
The following diagram shows a control flow that has one container and six tasks. Five of the tasks are defined
at the package level, and one task is defined at the container level. The task is inside a container.
The Integration Services architecture supports the nesting of containers, and a control flow can include
multiple levels of nested containers. For example, a package could contain a container such as a Foreach Loop
container, which in turn could contain another Foreach Loop container and so on.
Event handlers also have control flows, which are built using the same kinds of control flow elements.
Related Tasks
Add or Delete a Task or a Container in a Control Flow
Set the Properties of a Task or Container
Group or Ungroup Components
Add or Delete a Task or a Container in a Control
Flow
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
When you are working in the control flow designer, the Toolbox in SSIS Designer lists the tasks that
Integration Services provides for building control flow in a package. For more information about the
Toolbox, see SSIS Toolbox.
A package can include multiple instances of the same task. Each instance of a task is uniquely identified in
the package, and you can configure each instance differently.
If you delete a task, the precedence constraints that connect the task to other tasks and containers in the
control flow are also deleted.
The following procedures describe how to add or delete a task or container in the control flow of a package.
NOTE
Most properties can be set by typing a value directly in the text box, or by selecting a value from a list.
However, some properties are more complex and have a custom property editor. To set the property, click in
the text box, and then click the build (...) button to open the custom editor.
6. Optionally, create property expressions to dynamically update the properties of the task or container.
For more information, see Add or Change a Property Expression.
7. To save the updated package, click Save Selected Items on the File menu.
Set the properties of a task or container with the task or container editor
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you
want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Control Flow tab.
4. On the design surface of the Control Flow tab, right-click the task or container, and then click Edit
to open the corresponding task or container editor.
For information about how to configure the For Loop container, see Configure a For Loop Container.
For information about how to configure the Foreach Loop container, see Configure a Foreach Loop
Container.
NOTE
The Sequence container has no custom editor.
5. If the task or container editor has multiple nodes, click the node that contains the property that you
want to set.
6. Optionally, click Expressions and, on the Expressions page, create property expressions to
dynamically update the properties of the task or container. For more information, see Add or Change
a Property Expression.
7. Update the property value.
8. To save the updated package, click Save Selected Items on the File menu.
See Also
Integration Services Tasks
Integration Services Containers
Control Flow
Integration Services Containers
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Containers are objects in SQL Server Integration Services that provide structure to packages and services to
tasks. They support repeating control flows in packages, and they group tasks and containers into meaningful
units of work. Containers can include other containers in addition to tasks.
Packages use containers for the following purposes:
Repeat tasks for each element in a collection, such as files in a folder, schemas, or SQL Server Management
Objects (SMO) objects. For example, a package can run Transact-SQL statements that reside in multiple
files.
Repeat tasks until a specified expression evaluates to false . For example, a package can send a different e-
mail message seven times, one time for every day of the week.
Group tasks and containers that must succeed or fail as a unit. For example, a package can group tasks that
delete and add rows in a database table, and then commit or roll back all the tasks when one fails.
Container Types
Integration Services provides four types of containers for building packages. The following table lists the
container types.
C O N TA IN ER DESC RIP T IO N
Sequence Container Groups tasks and containers into control flows that are
subsets of the package control flow.
Packages and events handlers are also types of containers. For information see Integration Services (SSIS)
Packages and Integration Services (SSIS) Event Handlers.
Summary of Container Properties
All container types have a set of properties in common. If you create packages using the graphical tools that
Integration Services provides, the Properties window lists the following properties for the Foreach Loop, For
Loop, and Sequence containers. The task host container properties are configured as part of configuring the task
that the task host encapsulates. You set the Task Host properties when you configure the task.
ID.
IsolationLevel The isolation level of the container transaction. The values are
Unspecified , Chaos , ReadUncommitted ,
ReadCommitted , RepeatableRead , Serializable , and
Snapshot . The default value of this property is Serializable .
For more information, see IsolationLevel.
To learn about all the properties that are available to Foreach Loop, For Loop, Sequence, and Task Host containers
when configure them programmatically, see the following Integration Services API topics:
T:Microsoft.SqlServer.Dts.Runtime.ForEachLoop
T:Microsoft.SqlServer.Dts.Runtime.ForLoop
T:Microsoft.SqlServer.Dts.Runtime.Sequence
T:Microsoft.SqlServer.Dts.Runtime.TaskHost
Break Points
When you set a breakpoint on a container and the break condition is Break when the container recevies the
OnVariableValueChanged event , define the variable in the container scope.
See Also
Control Flow
Foreach Loop Container
11/2/2020 • 28 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Foreach Loop container defines a repeating control flow in a package. The loop implementation is similar to
Foreach looping structure in programming languages. In a package, looping is enabled by using a Foreach
enumerator. The Foreach Loop container repeats the control flow for each member of a specified enumerator.
SQL Server Integration Services provides the following enumerator types:
Foreach ADO enumerator to enumerate rows in tables. For example, you can get the rows in an ADO
recordset.
The Recordset destination saves data in memory in a recordset that is stored in a package variable of
Object data type. You typically use a Foreach Loop container with the Foreach ADO enumerator to
process one row of the recordset at a time. The variable specified for the Foreach ADO enumerator must
be of Object data type. For more information about the Recordset destination, see Use a Recordset
Destination.
Foreach ADO.NET Schema Rowset enumerator to enumerate the schema information about a data source.
For example, you can enumerate and get a list of the tables in the AdventureWorks2012 SQL Server
database.
Foreach File enumerator to enumerate files in a folder. The enumerator can traverse subfolders. For
example, you can read all the files that have the *.log file name extension in the Windows folder and its
subfolders. Note that the order in which the files are retrieved cannot be specified.
Foreach From Variable enumerator to enumerate the enumerable object that a specified variable contains.
The enumerable object can be an array, an ADO.NET DataTable , an Integration Services enumerator, and
so on. For example, you can enumerate the values of an array that contains the name of servers.
Foreach Item enumerator to enumerate items that are collections. For example, you can enumerate the
names of executables and working directories that an Execute Process task uses.
Foreach Nodelist enumerator to enumerate the result set of an XML Path Language (XPath) expression.
For example, this expression enumerates and gets a list of all the authors in the classical period:
/authors/author[@period='classical'] .
Foreach SMO enumerator to enumerate SQL Server Management Objects (SMO) objects. For example,
you can enumerate and get a list of the views in a SQL Server database.
Foreach HDFS File Enumerator to enumerate HDFS files in the specified HDFS location.
Foreach Azure Blob enumerator to enumerate blobs in a blob container in Azure Storage.
Foreach ADLS File enumerator to enumerate files in a directory in Azure Data Lake Store.
Foreach Data Lake Storage Gen2 File enumerator to enumerate files in a directory in Azure Data Lake
Store Gen2.
The following diagram shows a Foreach Loop container that has a File System task. The Foreach loop uses the
Foreach File enumerator, and the File System task is configured to copy a file. If the folder that the enumerator
specifies contains four files, the loop repeats four times and copies four files.
You can use a combination of variables and property expressions to update the property of the package object
with the enumerator collection value. First you map the collection value to a user-defined variable, and then you
implement a property expression on the property that uses the variable. For example, the collection value of the
Foreach File enumerator is mapped to a variable called MyFile and the variable is then used in the property
expression for the Subject property of a Send Mail task. When the package runs, the Subject property is updated
with the name of a file each time that the loop repeats. For more information, see Use Property Expressions in
Packages.
Variables that are mapped to the enumerator collection value can also be used in expressions and scripts.
A Foreach Loop container can include multiple tasks and containers, but it can use only one type of enumerator.
If the Foreach Loop container includes multiple tasks, you can map the enumerator collection value to multiple
properties of each task.
You can set a transaction attribute on the Foreach Loop container to define a transaction for a subset of the
package control flow. In this way, you can manage transactions at the level of the Foreach Loop instead of the
package level. For example, if a Foreach Loop container repeats a control flow that updates dimensions and fact
tables in a star schema, you can configure a transaction to ensure that all fact tables are updated successfully, or
none are updated. For more information, see Integration Services Transactions.
Enumerator Types
Enumerators are configurable, and you must provide different information, depending on the enumerator.
The following table summarizes the information each enumerator type requires.
Foreach ADO Specify the ADO object source variable and the enumerator
mode. The variable must be of Object data type.
Foreach ADO.NET Schema Rowset Specify the connection to a database and the schema to
enumerate.
Foreach File Specify a folder and the files to enumerate, the format of the
file name of the retrieved files, and whether to traverse
subfolders.
Foreach From Variable Specify the variable that contains the objects to enumerate.
Foreach Item Define the items in the Foreach Item collection, including
columns and column data types.
Foreach Nodelist Specify the source of the XML document and configure the
XPath operation.
Foreach SMO Specify the connection to a database and the SMO objects to
enumerate.
EN UM ERATO R C O N F IGURAT IO N REQ UIREM EN T S
Foreach HDFS File Enumerator Specify a folder and the files to enumerate, the format of the
file name of the retrieved files, and whether to traverse
subfolders.
Foreach Azure Blob Specify the Azure blob container that containers blobs to be
enumerated.
Foreach ADLS File Specify the Azure Data Lake Store directory that contains the
files to be enumerated.
Foreach Data Lake Storage Gen2 File Specify the Azure Data Lake Storage Gen2 directory that
contains the files to be enumerated, along with other
options.
NOTE
To add a new row, click anywhere outside the cell in which you typed.
NOTE
If a value is not compatible with the column data type, the text is highlighted.
To use the Foreach ADO enumerator, select an existing variable or click New variable in the ADO
object source variable list to specify the variable that contains the name of the ADO object to
enumerate, and select an enumeration mode option.
If creating a new variable, set the variable properties in the Add Variable dialog box.
To use the Foreach ADO.NET Schema Rowset enumerator, select an existing ADO.NET connection or
click New connection in the Connection list, and then select a schema.
Optionally, click Set Restrictions and select schema restrictions, select the variable that contains
the restriction value or type the restriction value, and click OK .
To use the Foreach From Variable enumerator, select a variable in the Variable list.
To use the Foreach NodeList enumerator, click DocumentSourceType and select the source type
from the list, and then click DocumentSource. Depending on the value selected for
DocumentSourceType, select a variable or a file connection from the list, create a new variable or
file connection, or type the XML source in the Document Source Editor .
Next, click EnumerationType and select an enumeration type from the list. If EnumerationType is
Navigator, Node, or NodeText , click OuterXPathStringSourceType and select the source type,
and then click OuterXPathString. Depending on the value set for OuterXPathStringSourceType,
select a variable or a file connection from the list, create a new variable or file connection, or type
the string for the outer XML Path Language (XPath) expression.
If EnumerationType is ElementCollection , set OuterXPathStringSourceType and OuterXPathString
as described above. Then, click InnerElementType and select an enumeration type for the inner
elements, and then click InnerXPathStringSourceType. Depending on the value set for
InnerXPathStringSourceType, select a variable or a file connection, create a new variable or file
connection, or type the string for the inner XPath expression.
To use the Foreach SMO enumerator, select an existing ADO.NET connection or click New
connection in the Connection list, and then either type the string to use or click Browse . If you
click Browse , in the Select SMO Enumeration dialog box, select the object type to enumerate
and the enumeration type, and click OK .
6. Optionally, click the browse button (...) in the Expressions text box on the Collection page to create
expressions that update property values. For more information, see Add or Change a Property Expression.
NOTE
The properties listed in the Proper ty list vary by enumerator.
7. Optionally, click Variable Mappings to map object properties to the collection value, and then do the
following things:
a. In the Variables list, select a variable or click <New Variable> to create a new variable.
b. If you add a new variable, set the variable properties in the Add Variable dialog box and click OK .
c. If you use the For Each Item enumerator, you can update the index value in the Index list.
NOTE
The index value indicates which column in the item to map to the variable. Only the For Each Item
enumerator can use an index value other than 0.
8. Optionally, click Expressions and, on the Expressions page, create property expressions for the
properties of the Foreach Loop container. For more information, see Add or Change a Property
Expression.
9. Click OK .
Options
Name
Provide a unique name for the Foreach Loop container. This name is used as the label in the task icon and in the
logs.
NOTE
Object names must be unique within a package.
Description
Type a description of the Foreach Loop container.
Static Options
Enumerator
Select the enumerator type from the list. This property has the options listed in the following table:
VA L UE DESC RIP T IO N
Foreach File Enumerator Enumerate files. Selecting this value displays the dynamic
options in the section, Foreach File Enumerator .
Foreach Item Enumerator Enumerate values in an item. Selecting this value displays the
dynamic options in the section, Foreach Item
Enumerator .
Foreach ADO Enumerator Enumerate tables or rows in tables. Selecting this value
displays the dynamic options in the section, Foreach ADO
Enumerator .
Foreach ADO.NET Schema Rowset Enumerator Enumerate a schema. Selecting this value displays the
dynamic options in the section, Foreach ADO.NET
Enumerator .
Foreach From Variable Enumerator Enumerate the value in a variable. Selecting this value
displays the dynamic options in the section, Foreach From
Variable Enumerator .
Foreach Nodelist Enumerator Enumerate nodes in an XML document. Selecting this value
displays the dynamic options in the section, Foreach
Nodelist Enumerator .
Foreach SMO Enumerator Enumerate a SMO object. Selecting this value displays the
dynamic options in the section, Foreach SMO
Enumerator .
Foreach HDFS File Enumerator Enumerate HDFS files in the specified HDFS location.
Selecting this value displays the dynamic options in the
section, Foreach HDFS File Enumerator .
Foreach Azure Blob Enumerator Enumerate blob files in the specified blob location. Selecting
this value displays the dynamic options in the section,
Foreach Azure Blob Enumerator .
Foreach ADLS File Enumerator Enumerate files in the specified Data Lake Store directory.
Selecting this value displays the dynamic options in the
section, Foreach ADLS File Enumerator .
Foreach Data Lake Storage Gen2 File Enumerator Enumerate files in the specified Data Lake Storage Gen2
directory. Selecting this value displays the dynamic options in
the section, Foreach Data Lake Storage Gen2 File
Enumerator .
Expressions
Click or expand Expressions to view the list of existing property expressions. Click the ellipsis button (...) to add
a property expression for an enumerator property, or edit and evaluate an existing property expression.
Related Topics: Integration Services (SSIS) Expressions, Property Expressions Editor, Expression Builder
Enumerator Dynamic Options
Enumerator = Foreach File Enumerator
You use the Foreach File enumerator to enumerate files in a folder. For example, if the Foreach Loop includes an
Execute SQL task, you can use the Foreach File enumerator to enumerate files that contain SQL statements that
the Execute SQL task runs. The enumerator can be configured to include subfolders.
The content of the folders and subfolders that the Foreach File enumerator enumerates might change while the
loop is executing because external processes or tasks in the loop add, rename, or delete files while the loop is
executing. These changes may cause a number of unexpected situations:
If files are deleted, the actions of one task in the Foreach Loop may affect a different set of files than the
files used by subsequent tasks.
If files are renamed and an external process automatically adds files to replace the renamed files, the
actions of tasks in the Foreach Loop may affect the same files twice.
If files are added, it may be difficult to determine for which files the Foreach Loop affected.
Folder
Provide the path of the root folder to enumerate.
Browse
Browse to locate the root folder.
Files
Specify the files to enumerate.
NOTE
Use wildcard characters (*) to specify the files to include in the collection. For example, to include files with names that
contain "abc", use the following filter: *abc*.
When you specify a file name extension, the enumerator also returns files that have the same extension with additional
characters appended. (This is the same behavior as that of the dir command in the operating system, which also compares
8.3 file names for backward compatibility.) This behavior of the enumerator could cause unexpected results. For example,
you want to enumerate only Excel 2003 files, and you specify "*.xls". However, the enumerator also returns Excel 2007 files
because those files have the extension, ".xlsx".
You can use an expression to specify the files to include in a collection, by expanding Expressions on the Collection
page, selecting the FileSpec property, and then clicking the ellipsis button (...) to add the property expression.
Fully qualified
Select to retrieve the fully qualified path of file names. If wildcard characters are specified in the Files option, then
the fully qualified paths that are returned match the filter.
Name only
Select to retrieve only the file names. If wildcard characters are specified in the Files option, then the file names
returned match the filter.
Name and extension
Select to retrieve the file names and their file name extensions. If wildcard characters are specified in the Files
option, then the name and extension of files returned match the filter.
Traverse Subfolders
Select to include the subfolders in the enumeration.
Enumerator = Foreach Item Enumerator
You use the Foreach Item enumerator to enumerate items in a collection. You define the items in the collection by
specifying columns and column values. The columns in a row define an item. For example, an item that specifies
the executables that an Execute Process task runs and the working directory that the task uses has two columns,
one that lists the names of executables and one that lists the working directory. The number of rows determines
the number of times that the loop is repeated. If the table has 10 rows, the loop repeats 10 times.
To update the properties of the Execute Process task, you map variables to item columns by using the index of
the column. The first column defined in the enumerator item has the index value 0, the second column 1, and so
on. The variable values are updated with each repeat of the loop. The Executable and WorkingDirector y
properties of the Execute Process task can then be updated by property expressions that use these variables.
Define the items in the For Each Item collection
Provide a value for each column in the table.
NOTE
A new row is automatically added to the table after you enter values in row columns.
NOTE
If the values provided are not compatible with the column data type, the text is colored red.
NOTE
The variable must have the Object data type, otherwise an error occurs.
IMPORTANT
The ADO.NET connection manager must use a .NET provider for OLE DB. If connecting to SQL Server, the recommended
provider to use is the SQL Server Native Client, listed in the .Net Providers for OleDb section of the Connection
Manager dialog box.
VA L UE DESC RIP T IO N
VA L UE DESC RIP T IO N
OuterXPathStringSourceType
Select the source type of the XPath string. This property has the options listed in the following table:
VA L UE DESC RIP T IO N
OuterXPathString
If OuterXPathStringSourceType is set to Direct input , provide the XPath string.
If OuterXPathStringSourceType is set to File connection , select a File connection manager, or click <New
connection...> to create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
If OuterXPathStringSourceType is set to Variable , select an existing variable, or click <New variable...> to
create a new variable.
Related Topics: Integration Services (SSIS) Variables, Add Variable.
InnerElementType
If EnumerationType is set to ElementCollection , select the type of inner element in the list.
InnerXPathStringSourceType
Select the source type of the inner XPath string. This property has the options listed in the following table:
VA L UE DESC RIP T IO N
InnerXPathString
If InnerXPathStringSourceType is set to Direct input , provide the XPath string.
If InnerXPathStringSourceType is set to File connection , select a File connection manager, or click <New
connection...> to create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
If InnerXPathStringSourceType is set to Variable , select an existing variable, or click <New variable...> to
create a new variable.
Related Topics: Integration Services (SSIS) Variables, Add Variable.
Enumerator = Foreach SMO Enumerator
You use the Foreach SMO enumerator to enumerate SQL Server Management Object (SMO) objects. For
example, if the Foreach Loop includes an Execute SQL task, you can use the Foreach SMO enumerator to
enumerate the tables in the AdventureWorks database and run queries that count the number of rows in each
table.
Connection
Select an existing ADO.NET connection manager, or click <New connection...> to create a new connection
manager.
Related Topics: ADO.NET Connection Manager, Configure ADO.NET Connection Manager
Enumerate
Specify the SMO object to enumerate.
Browse
Select the SMO enumeration.
Related Topics:
Select SMO Enumeration Dialog Box
The Microsoft SQL Server Integration Services tutorial, Creating a Simple ETL Package Tutorial, includes a lesson
that teaches you to add and configure a Foreach Loop.
Options
Variable
Select an existing variable, or click New variable... to create a new variable.
NOTE
After you map a variable, a new row is automatically added to the Variable list.
Delete
Select a variable, and then click Delete .
See Also
Control Flow
Integration Services Containers
Loop through Excel Files and Tables with a Foreach
Loop Container
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The procedures in this topic describe how to loop through the Excel workbooks in a folder, or through the tables in
an Excel workbook, by using the Foreach Loop container with the appropriate enumerator.
IMPORTANT
For detailed info about connecting to Excel files, and about limitations and known issues for loading data from or to Excel
files, see Load data from or to Excel with SQL Server Integration Services (SSIS).
If you do not use a variable for the Extended Properties argument, then you must add it manually to the
expression that contains the connection string.
3. Add a Foreach Loop container to the Control Flow tab. For information about how to configure the
Foreach Loop Container, see Configure a Foreach Loop Container.
4. On the Collection page of the Foreach Loop Editor , select the Foreach File enumerator, specify the folder
in which the Excel workbooks are located, and specify the file filter (ordinarily *.xlsx).
5. On the Variable Mapping page, map Index 0 to a user-defined string variable that will receive the current
Excel path and file name on each iteration of the loop. (The sample expression shown later in this procedure
uses the variable name ExcelFile .)
6. Close the Foreach Loop Editor .
7. Add an Excel connection manager to the package as described in Add, Delete, or Share a Connection
Manager in a Package. Select an existing Excel workbook file for the connection to avoid validation errors.
IMPORTANT
To avoid validation errors as you configure tasks and data flow components that use this Excel connection manager,
select an existing Excel workbook in the Excel Connection Manager Editor . The connection manager will not use
this workbook at run time after you configure an expression for the ConnectionString property as described in the
following steps. After you create and configure the package, you can clear the value of the ConnectionString
property in the Properties window. However, if you clear this value, the connection string property of the Excel
connection manager is no longer valid until the Foreach Loop runs. Therefore you must set the DelayValidation
property to True on the tasks in which the connection manager is used, or on the package, to avoid validation
errors.
You must also use the default value of False for the RetainSameConnection property of the Excel connection
manager. If you change this value to True , each iteration of the loop will continue to open the first Excel workbook.
8. Select the new Excel connection manager, click the Expressions property in the Properties window, and
then click the ellipsis.
9. In the Proper ty Expressions Editor , select the ConnectionString property, and then click the ellipsis.
10. In the Expression Builder, enter the following expression:
Note the use of the escape character "\" to escape the inner quotation marks required around the value of
the Extended Properties argument.
The Extended Properties argument is not optional. If you do not use a variable to contain its value, then you
must add it manually to the expression, as in the following example:
11. Create tasks in the Foreach Loop container that use the Excel connection manager to perform the same
operations on each Excel workbook that matches the specified file location and pattern.
7. On the Variable Mappings page, map Index 2 to the string variable created earlier to hold the name of the
current table.
8. Close the Foreach Loop Editor .
9. Create tasks in the Foreach Loop container that use the Excel connection manager to perform the same
operations on each Excel table in the specified workbook. If you use a Script Task to examine the
enumerated table name or to work with each table, remember to add the string variable to the
ReadOnlyVariables property of the Script task.
See Also
Load data from or to Excel with SQL Server Integration Services (SSIS)
Configure a Foreach Loop Container
Add or Change a Property Expression
Excel Connection Manager
Excel Source
Excel Destination
Working with Excel Files with the Script Task
For Loop Container
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The For Loop container defines a repeating control flow in a package. The loop implementation is similar to the
For looping structure in programming languages. In each repeat of the loop, the For Loop container evaluates an
expression and repeats its workflow until the expression evaluates to False .
The For Loop container usesthe following elements to define the loop:
An optional initialization expression that assigns values to the loop counters.
An evaluation expression that contains the expression used to test whether the loop should stop or
continue.
An optional iteration expression that increments or decrements the loop counter.
The following diagram shows a For Loop container with a Send Mail task. If the initialization expression is
@Counter = 0 , the evaluation expression is @Counter < 4 , and the iteration expression is @Counter = @Counter + 1 ,
the loop repeats four times and sends four e-mail messages.
NOTE
The expression must evaluate to a Boolean. When the expression evaluates to false , the loop stops running.
NOTE
Object names must be unique within a package.
Description
Provide a description of the For Loop container.
See Also
Control Flow
Integration Services (SSIS) Expressions
Sequence Container
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Sequence container defines a control flow that is a subset of the package control flow. Sequence containers
group the package into multiple separate control flows, each containing one or more tasks and containers that run
within the overall package control flow.
The Sequence container can include multiple tasks in addition to other containers. Adding tasks and containers to a
Sequence container is similar to adding them to a package, except you drag the tasks and containers to the
Sequence container instead of to the package container. If the Sequence container includes more than one task or
container, you can connect them using precedence constraints just as you do in a package. For more information,
see Precedence Constraints.
There are many benefits of using a Sequence container:
Disabling groups of tasks to focus package debugging on one subset of the package control flow.
Managing properties on multiple tasks in one location by setting properties on a Sequence container
instead of on the individual tasks.
For example, you can set the Disable property of the Sequence container to True to disable all the tasks
and containers in the Sequence container.
Providing scope for variables that a group of related tasks and containers use.
Grouping many tasks so you can more easily managed them by collapsing and expanding the Sequence
container.
You can also create task groups, which expand and collapse using the Group box. However, the Group box
is a design-time feature that has no properties or run-time behavior. For more information, see Group or
Ungroup Components
Set a transaction attribute on the Sequence container to define a transaction for a subset of the package
control flow. In this way, you can manage transactions at a more granular level.
For example, if a Sequence container includes two related tasks, one task that deletes data in a table and
another task that inserts data into a table, you can configure a transaction to ensure that the delete action is
rolled back if the insert action fails. For more information, see Integration Services Transactions.
Related Tasks
For information about how to set properties of the component in the SQL Server Data Tools (SSDT), see Set the
Properties of a Task or Container.
See Also
Add or Delete a Task or a Container in a Control Flow
Connect Tasks and Containers by Using a Default Precedence Constraint
Integration Services Containers
Task Host Container
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The task host container encapsulates a single task. In SSIS Designer, the task host is not configured separately;
instead, it is configured when you set the properties of the task it encapsulates. For more information about the
tasks that the task host containers encapsulate, see Integration Services Tasks.
This container extends the use of variables and event handlers to the task level. For more information, see
Integration Services (SSIS) Event Handlers and Integration Services (SSIS) Variables.
Related Tasks
Set the Properties of a Task or Container
See Also
Integration Services Containers
Integration Services Tasks
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Tasks are control flow elements that define units of work that are performed in a package control flow. An SQL
Server Integration Services package is made up of one or more tasks. If the package contains more than one
task, they are connected and sequenced in the control flow by precedence constraints.
You can also write custom tasks using a programming language that supports COM, such as Visual Basic, or a
.NET programming language, such as C#.
The SSIS Designer, the graphical tool in SQL Server Integration Services for working with packages, provides
the design surface for creating package control flow, and provides custom editors for configuring tasks. You
can also program the SQL Server Integration Services object model to create packages programmatically.
Types of Tasks
Integration Services includes the following types of tasks.
Data Flow Task
The task that runs data flows to extract data, apply column level transformations, and load data.
Data Preparation Tasks
These tasks do the following processes: copy files and directories; download files and data; run Web methods;
apply operations to XML documents; and profile data for cleansing.
Workflow Tasks
The tasks that communicate with other processes to run packages, run programs or batch files, send and
receive messages between packages, send e-mail messages, read Windows Management Instrumentation
(WMI) data, and watch for WMI events.
SQL Server Tasks
The tasks that access, copy, insert, delete, and modify SQL Server objects and data.
Scripting Tasks
The tasks that extend package functionality by using scripts.
Analysis Services Tasks
The tasks that create, modify, delete, and process Analysis Services objects.
Maintenance Tasks
The tasks that perform administrative functions such as backing up and shrinking SQL Server databases,
rebuilding and reorganizing indexes, and running SQL Server Agent jobs.
Custom Tasks
Additionally, you can write custom tasks using a programming language that supports COM, such as Visual
Basic, or a .NET programming language, such as C#. If you want to access your custom task in the SSIS
Designer, you can create and register a user interface for the task. For more information, see Developing a
Custom Task.
Configuration of Tasks
An Integration Services package can contain a single task, such as an Execute SQL task that deletes records in
a database table when the package runs. However, packages typically contain several tasks, and each task is
set to run within the context of the package control flow. Event handlers, which are workflows that run in
response to run-time events, can also have tasks.
For more information about adding a task to a package using SSIS Designer, see Add or Delete a Task or a
Container in a Control Flow.
For more information about adding a task to a package programmatically, see Adding Tasks Programmatically.
Each task can be configured individually using the custom dialog boxes for each task that SSIS Designer
provides, or the Properties window included in SQL Server Data Tools (SSDT). A package can include multiple
tasks of the same type-for example, six Execute SQL tasks-and each task can be configured differently. For
more information, see Set the Properties of a Task or Container.
Related Tasks
Add or Delete a Task or a Container in a Control Flow
Analysis Services Execute DDL Task
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Analysis Services Execute DDL task runs data definition language (DDL) statements that can create, drop, or
alter mining models and multidimensional objects such as cubes and dimensions. For example, a DDL statement
can create a partition in the Adventure Works cube, or delete a dimension in Adventure Works DW
Multidimensional 2012, the sample Analysis Services database included in SQL Server.
The Analysis Services Execute DDL task uses an Analysis Services connection manager to connect to an instance of
Analysis Services or an Analysis Services project. For more information, see Analysis Services Connection
Manager.
Integration Services includes a number of tasks that perform business intelligence operations, such as processing
analytic objects and running data mining prediction queries.
For more information about related business intelligence tasks, click one of the following topics:
Analysis Services Processing Task
Data Mining Query Task
DDL Statements
The DDL statements are represented as statements in Analysis Services Scripting Language (ASSL), and framed in
an XML for Analysis (XMLA) command.
ASSL is used to define and describe an instance of Analysis Services and the databases and database
objects it contains. For more information, see Analysis Services Scripting Language (ASSL for XMLA).
XMLA is a command language that is used to send action commands, such as Create, Alter, or Process, to an
instance of Analysis Services. For more information, see XML for Analysis (XMLA) Reference.
If the DDL code is stored in a separate file, the Analysis Services Execute DDL task uses a File connection manager
to specify the path of the file. For more information, see File Connection Manager.
Because DDL statements can contain passwords and other sensitive information, a package that contains one or
more Analysis Services Execute DDL tasks should use the package protection level Encr yptAllWithUserKey or
Encr yptAllWithPassword . For more information, see Integration Services (SSIS) Packages.
DDL Examples
The following three DDL statements were generated by scripting objects in the Adventure Works DW
Multidimensional 2012, the Analysis Services database included in SQL Server.
The following DDL statement deletes the Promotion dimension.
<Delete xmlns="https://schemas.microsoft.com/analysisservices/2003/engine">
<Object>
<DatabaseID>Adventure Works DW Multidimensional 2012</DatabaseID>
<DimensionID>Dim Promotion</DimensionID>
</Object>
</Delete>
The following DDL statement processes the Adventure Works DW Multidimensional 2012 cube.
<Batch xmlns="https://schemas.microsoft.com/analysisservices/2003/engine">
<Parallel>
<Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<Object>
<DatabaseID>Adventure Works DW Multidimensional 2012</DatabaseID>
</Object>
<Type>ProcessFull</Type>
<WriteBackTableCreation>UseExisting</WriteBackTableCreation>
</Process>
</Parallel>
</Batch>
The following three DDL statements were generated by scripting objects in the Adventure Works DW
Multidimensional 2012, the Analysis Services database included in SQL Server.
The following DDL statement deletes the Promotion dimension.
<Delete xmlns="https://schemas.microsoft.com/analysisservices/2003/engine">
<Object>
<DatabaseID>Adventure Works DW Multidimensional 2012</DatabaseID>
<DimensionID>Dim Promotion</DimensionID>
</Object>
</Delete>
The following DDL statement processes the Adventure Works DW Multidimensional 2012 cube.
<Batch xmlns="https://schemas.microsoft.com/analysisservices/2003/engine">
<Parallel>
<Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<Object>
<DatabaseID>Adventure Works DW Multidimensional 2012</DatabaseID>
</Object>
<Type>ProcessFull</Type>
<WriteBackTableCreation>UseExisting</WriteBackTableCreation>
</Process>
</Parallel>
</Batch>
<Create xmlns="https://schemas.microsoft.com/analysisservices/2003/engine">
<ParentObject>
<DatabaseID>Adventure Works DW Multidimensional 2012</DatabaseID>
<MiningStructureID>Forecasting</MiningStructureID>
</ParentObject>
<ObjectDefinition>
<MiningModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<ID>Forecasting</ID>
<Name>Forecasting</Name>
<Algorithm>Microsoft_Time_Series</Algorithm>
<AlgorithmParameters>
<AlgorithmParameter>
<Name>PERIODICITY_HINT</Name>
<Value xsi:type="xsd:string">{12}</Value>
</AlgorithmParameter>
</AlgorithmParameters>
<Columns>
<Column>
<ID>Amount</ID>
<Name>Amount</Name>
<SourceColumnID>Amount</SourceColumnID>
<Usage>Predict</Usage>
</Column>
<Column>
<ID>Model Region</ID>
<Name>Model Region</Name>
<SourceColumnID>Model Region</SourceColumnID>
<Usage>Key</Usage>
</Column>
<Column>
<ID>Quantity</ID>
<Name>Quantity</Name>
<SourceColumnID>Quantity</SourceColumnID>
<Usage>Predict</Usage>
</Column>
<Column>
<ID>Time Index</ID>
<Name>Time Index</Name>
<SourceColumnID>Time Index</SourceColumnID>
<Usage>Key</Usage>
</Column>
</Columns>
<Collation>Latin1_General_CS_AS_KS</Collation>
</MiningModel>
</ObjectDefinition>
</Create>
Configuration of the Analysis Services Execute DDL Task
You can set properties through SSIS Designer or programmatically.
For more information about the properties that you can set in SSIS Designer, click the following topic:
Expressions Page
For more information about setting these properties in SSIS Designer, click the following topic:
Set the Properties of a Task or Container
NOTE
Task names must be unique within a package.
Description
Type a description of the Analysis Services Execute DDL task.
VA L UE DESC RIP T IO N
VA L UE DESC RIP T IO N
Direct Input Set the source to the DDL statement stored in the
SourceDirect text box. Selecting this value displays the
dynamic options in the following section.
File Connection Set the source to a file that contains the DDL statement.
Selecting this value displays the dynamic options in the
following section.
Variable Set the source to a variable. Selecting this value displays the
dynamic options in the following section.
Dynamic Options
SourceType = Direct Input
Source
Type the DDL statements or click the ellipsis (...) and then type the statements in the DDL Statements dialog box.
SourceType = File Connection
Source
Select a File connection in the list, or click <New connection...> and use the File Connection Manager dialog
box to create a new connection.
Related Topics: File Connection Manager
SourceType = Variable
Source
Select a variable in the list, or click <New variable...> and use the Add Variable dialog box to create a new
variable.
Related Topics: Integration Services (SSIS) Variables
Analysis Services Processing Task
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Analysis Services Processing task processes Analysis Services objects such as tabular models, cubes,
dimensions, and mining models.
When processing tabular models, keep the following in mind:
You cannot perform impact analysis on tabular models.
Some processing options for tabular mode are not exposed, such as Process Defrag and Process Recalc. You
can perform these functions by using the Execute DDL task.
The options Process Index and Process Update are not appropriate for tabular models and should not be
used.
Batch settings are ignored for tabular models.
Integration Services includes a number of tasks that perform business intelligence operations, such as running
Data Definition Language (DDL) statements and data mining prediction queries. For more information about
related business intelligence tasks, click one of the following topics:
Analysis Services Execute DDL Task
Data Mining Query Task
Object Processing
Multiple objects can be processed at the same time. When processing multiple objects, you define settings that
apply to the processing of all the objects in the batch.
Objects in a batch can be processed in sequence or in parallel. If the batch does not contain objects for which
processing sequence is important, parallel processing can speed up processing. If objects in the batch are
processed in parallel, you can configure the task to let it determine how many objects to process in parallel, or you
can manually specify the number of objects to process at the same time. If objects are processed sequentially, you
can set a transaction attribute on the batch either by enlisting all objects in one transaction or by using a separate
transaction for each object in the batch.
When you process analytic objects, you might also want to process the objects that depend on them. The Analysis
Services Processing task includes an option to process any dependent objects in addition to the selected objects.
Typically, you process dimension tables before processing fact tables. You may encounter errors if you try to
process fact tables before processing the dimension tables.
This task also lets you configure the handling of errors in dimension keys. For example, the task can ignore errors
or stop after a specified number of errors occur. The task can use the default error configuration, or you can
construct a custom error configuration. In the custom error configuration, you specify how the task handles errors
and the error conditions. For example, you can specify that the task should stop running when the fourth error
occurs, or specify how the task should handle Null key values. The custom error configuration can also include the
path of an error log.
NOTE
The Analysis Services Processing task can process only analytic objects created by using the SQL Server tools.
This task is frequently used in combination with a Bulk Insert task that loads data into a SQL Server table, or a Data
Flow task that implements a data flow that loads data into a table. For example, the Data Flow task might have a
data flow that extracts data from an online transactional database (OLTP) database and loads it into a fact table in a
data warehouse, after which the Analysis Services Processing task is called to process the cube built on the data
warehouse.
The Analysis Services Processing task uses an Analysis Services connection manager to connect to an instance of
Microsoft SQL Server Analysis Services. For more information, see Analysis Services Connection Manager.
Error Handling
Configuration of the Analysis Services Processing Task
You can set properties through SSIS Designer or programmatically.
For more information about the properties that you can set in SSIS Designer, click the following topic:
Expressions Page
For more information about setting these properties in SSIS Designer, click the following topic:
Set the Properties of a Task or Container
NOTE
Task names must be unique within a package.
Description
Type a description of the Analysis Services Processing task.
Add
Add an Analysis Services object to the list.
Remove
Select an object, and then click Delete .
Impact Analysis
Perform impact analysis on the selected object.
Related Topics: Impact Analysis Dialog Box (Analysis Services - Multidimensional Data)
Batch Settings Summar y
Dimension key error log path Specifies the path of the file to which errors are logged.
Process affected objects Indicates whether dependent or affected objects are also
processed.
Change Settings
Change the processing options and the handling of errors in dimension keys.
Related Topics: Change Settings Dialog Box (Analysis Services - Multidimensional Data)
Azure Blob Download Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Azure Blob Download Task enables an SSIS package to download files from an Azure blob storage.
To add an Azure Blob Download Task , drag-drop it to the SSIS Designer, and double-click or right-click and click
Edit to see the following Azure Blob Download Task Editor dialog box.
The Azure Blob Download Task is a component of the SQL Server Integration Services (SSIS) Feature Pack for
Azure.
The following table provides description for the fields in this dialog box.
BlobContainer Specifies the name of the blob container that contains the
blob files to be downloaded.
BlobDirectory Specifies the blob directory that contains the blob files to be
downloaded. The blob directory is a virtual hierarchical
structure.
LocalDirectory Specifies the local directory where the downloaded blob files
are stored.
FileName Specifies a name filter to select files with the specified name
pattern. For example, MySheet*.xls\* includes files such as
MySheet001.xls and MySheetABC.xlsx .
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Azure Blob Upload Task enables an SSIS package to upload files to an Azure blob storage.
To add an Azure Blob Upload Task , drag-drop it to the SSIS Designer, and double-click or right-click and click
Edit to see the following Azure Blob Upload Task Editor dialog box.
The Azure Blob Upload Task is a component of the SQL Server Integration Services (SSIS) Feature Pack for
Azure.
The following table provides descriptions for the fields in this dialog box.
BlobContainer Specifies the name of the blob container that contains the
uploaded files as blobs.
BlobDirectory Specifies the blob directory where the uploaded file is stored
as a block blob. The blob directory is a virtual hierarchical
structure. If the blob already exists, it is replaced.
FileName Specifies a name filter to select files with the specified name
pattern. For example, MySheet*.xls\* includes files such as
MySheet001.xls and MySheetABC.xlsx .
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can submit U-SQL jobs to Azure Data Lake Analytics service with the Data Lake Analytics task. This task is a
component of the SQL Server Integration Services (SSIS) feature pack for Azure.
For general background, see Azure Data Lake Analytics.
VA L UE DESC RIP T IO N
DirectInput Specifies the U-SQL script through the inline editor. Selecting
this value displays the dynamic option, USQLStatement .
FileConnection Specifies a local .usql file that contains the U-SQL script.
Selecting this option displays the dynamic option,
FileConnection .
SourceType Dynamic Options specifies the script content for the U-SQL query.
SO URC ET Y P E DY N A M IC O P T IO N S
SourceType = DirectInput Type the U-SQL query to be submitted in the option box
directly, or select the browse button (...) to type the U-SQL
query in the Enter U-SQL Quer y dialog box.
SO URC ET Y P E DY N A M IC O P T IO N S
Job configuration
Job configuration specifies U-SQL job submission properties.
AzureDataLakeAnalyticsConnection: Specifies the Data Lake Analytics account where the U-SQL script is
submitted. Choose the connection from a list of defined connection managers. To create a new connection,
select <New connection >. For related information, see Azure Data Lake Analytics Connection Manager.
JobName: Specifies the name of the U-SQL job.
AnalyticsUnits: Specifies the analytics unit count of the U-SQL job.
Priority: Specifies the priority of the U-SQL job. You can set this from 0 to 1000. The lower the number is,
the higher the priority.
RuntimeVersion: Specifies the Data Lake Analytics runtime version of the U-SQL job. It is set to "default"
by default. Usually you don't need to change this property.
Synchronous: A Boolean value specifies if the task waits for the job execution to complete or not. If the
value is set to true, the task is marked as succeed after the job completes. If the value is set to false, the task
is marked as succeed after the job passes the preparation phase.
VA L UE DESC RIP T IO N
True The task result is based on the U-SQL job execution result.
Job succeeds > task succeeds. Job fails > task fails. Task
succeeds or fails > task completes.
False The task result is based on the U-SQL job submission and
preparation result. Job submission succeeds and passes
the preparation phase > task succeeds. Job submission
fails or job fails at the preparation phase > task fails. Task
succeeds or fails > task completes.
TimeOut: Specifies a time-out time, in seconds, for job execution. If the job times out, it is cancelled and
marked as failed. This property is not available if Synchronous is set to false.
@searchlog =
EXTRACT UserId int,
Start DateTime,
Region string,
Query string,
Duration int,
Urls string,
ClickedUrls string
FROM @in
USING Extractors.Tsv(nullEscape:"#NULL#");
@rs1 =
SELECT Start, Region, Duration
FROM @searchlog
WHERE Region == "en-gb";
@rs1 =
SELECT Start, Region, Duration
FROM @rs1
WHERE Start <= DateTime.Parse("2012/02/19");
OUTPUT @rs1
TO @out
USING Outputters.Tsv(quoting:false, dateTimeFormat:null);
Note that the input and output paths are defined in @in and @out parameters. The values for @in and @out
parameters in the U-SQL script are passed dynamically by the parameter mapping configuration.
VA RIA B L E N A M E PA RA M ET ER N A M E
See also
Azure Data Lake Analytics Connection Manager
Azure Data Lake Store File System Task
Azure Data Lake Store Connection Manager
Azure Data Lake Store File System Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Azure Data Lake Store File System Task lets users perform various file system operations on Azure Data Lake
Store (ADLS).
The Azure Data Lake Store File System Task is a component of the SQL Server Integration Services (SSIS) Feature
Pack for Azure.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Azure HDInsight Create Cluster Task enables an SSIS package to create an Azure HDInsight cluster in the
specified Azure subscription and resource group.
The Azure HDInsight Create Cluster Task is a component of the SQL Server Integration Services (SSIS) Feature
Pack for Azure.
NOTE
Creating a new HDInsight cluster may take 10~20 minutes.
There is a cost associated with creating and running an Azure HDInsight cluster. See HDInsight Pricing for details.
To add an Azure HDInsight Create Cluster Task , drag-drop it to the SSIS Designer, and double-click or right-
click and click Edit to see the following Azure HDInsight Create Cluster Task Editor dialog box.
The following table provides a description of the fields in this dialog box.
ResourceGroup Specify the Azure resource group the HDInsight cluster will be
created in.
Location Specify the location of the HDInsight cluster. The cluster must
be created in the same location as the Azure Storage Account
specified.
SshUserName Specify the user name used to remotely access the HDInsight
cluster using SSH.
FailIfExists Specify whether the task should fail if the cluster already exists.
NOTE
The locations of the HDInsight cluster and the Azure Storage Account must be the same.
Azure HDInsight Delete Cluster Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Azure HDInsight Delete Cluster Task enables an SSIS package to delete an Azure HDInsight cluster in the
specified Azure subscription and resource group.
The Azure HDInsight Delete Cluster Task is a component of the SQL Server Integration Services (SSIS) Feature
Pack for Azure.
NOTE
Deleting an HDInsight cluster may take 10~20 minutes.
To add an Azure HDInsight Delete Cluster Task , drag-drop it to the SSIS Designer, and double-click or right-
click and click Edit to see the following Azure HDInsight Delete Cluster Task Editor dialog box.
The following table provides a description for the fields in the dialog box.
ResourceGroup Specify the Azure resource group the HDInsight cluster is in.
FailIfNotExists Specify whether the task should fail if the cluster does not
exist.
Azure HDInsight Hive Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Azure HDInsight Hive Task to run Hive script on an Azure HDInsight cluster.
To add an Azure HDInsight Hive Task , drag-drop it to the SSIS Designer, and double-click or right-click and click
Edit to see the following Azure HDInsight Hive Task Editor dialog box.
The Azure HDInsight Hive Task is a component of the SQL Server Integration Services (SSIS) Feature Pack for
Azure.
The following list describes fields in this dialog box.
1. For the HDInsightConnection field, select an existing Azure HDInsight Connection Manager or create a
new one that refers to the Azure HDInsight cluster used to execute the script.
2. For the AzureStorageConnection field, select an existing Azure Storage Connection Manager or create a
new one that refers to the Azure Storage Account associated with the cluster. This is only necessary if you
want to download the script execution output and error logs.
3. For the BlobContainer field, specify the storage container name associated with the cluster. This is only
necessary if you want to download the script execution output and error logs.
4. For the LocalLogFolder field, specify the folder to which the script execution output and error logs will be
downloaded to. This is only necessary if you want to download the script execution output and error logs.
5. There are two ways to specify the Hive script to execute:
a. In-line script : Specify the Script field by typing in-line the script to execute in the Enter Script
dialog box.
b. Script file : Upload the script file to Azure Blob Storage and specify the BlobName field. If the blob is
not in the default storage account or container associated with the HDInsight cluster, the
ExternalStorageAccountName and ExternalBlobContainer fields must be specified. For an
external blob, make sure that it is configured as publicly accessible.
If both are specified, script file will be used and the in-line script will be ignored.
Azure HDInsight Pig Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Azure HDInsight Pig Task to run Pig script on an Azure HDInsight cluster.
To add an Azure HDInsight Pig Task , drag-drop it to the SSIS Designer, and double-click or right-click and click
Edit to see the following Azure HDInsight Pig Task Editor dialog box.
The Azure HDInsight Pig Task is a component of the SQL Server Integration Services (SSIS) Feature Pack for
Azure.
The following list describes fields in this dialog box.
1. For the HDInsightConnection field, select an existing Azure HDInsight Connection Manager or create a
new one that refers to the Azure HDInsight cluster used to execute the script.
2. For the AzureStorageConnection field, select an existing Azure Storage Connection Manager or create a
new one that refers to the Azure Storage Account associated with the cluster. This is only necessary if you
want to download the script execution output and error logs.
3. For the BlobContainer field, specify the storage container name associated with the cluster. This is only
necessary if you want to download the script execution output and error logs.
4. For the LocalLogFolder field, specify the folder to which the script execution output and error logs will be
downloaded to. This is only necessary if you want to download the script execution output and error logs.
5. There are two ways to specify the Pig script to execute:
a. In-line script : Specify the Script field by typing in-line the script to execute in the Enter Script
dialog box.
b. Script file : Upload the script file to Azure Blob Storage and specify the BlobName field. If the blob is
not in the default storage account or container associated with the HDInsight cluster, the
ExternalStorageAccountName and ExternalBlobContainer fields must be specified. For an
external blob, make sure that it is configured as publicly accessible.
If both are specified, script file will be used and the in-line script will be ignored.
Azure SQL DW Upload Task
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Azure SQL DW Upload Task enables an SSIS package to copy tabular data to Azure Synapse Analytics (DW)
from file system or Azure Blob Storage. The task leverages PolyBase to improve performance, as described in the
article Azure Synapse Analytics Loading Patterns and Strategies. The currently supported source data file format is
delimited text in UTF8 encoding. When copying from file system, data will first be uploaded to Azure Blob Storage
for staging, and then to Azure SQL DW. Therefore, an Azure Blob Storage account is needed.
The Azure SQL DW Upload Task is a component of the SQL Server Integration Services (SSIS) Feature Pack for
Azure.
To add an Azure SQL DW Upload Task , drag-drop it from SSIS Toolbox to the designer canvas, and double-click
or right-click and click Edit to see the task editor dialog box.
On the General page, configure the following properties.
The SourceType specifies the type of source data store. Select one of the following types:
FileSystem: Source data resides in local file system.
BlobStorage: Source data resides in Azure Blob Storage.
Following are the properties for each source type.
FileSystem
F IEL D DESC RIP T IO N
LocalDirectory Specifies the local directory that contains the data files to be
uploaded.
FileName Specifies a name filter to select files with certain name pattern.
E.g. MySheet*.xsl* will include files such as MySheet001.xsl and
MySheetABC.xslx.
RowDelimiter Specifies the character(s) that marks the end of each row.
ColumnDelimiter Specifies one or more characters that mark the end of each
column. E.g. | (pipe), \t (tab), ' (single quote), " (double quote),
and 0x5c (backslash).
IsFirstRowHeader Specifies whether the first row in each data file contains
column names instead of actual data.
BlobContainer Specifies the name of blob container to which local data will be
uploaded and relayed to Azure DW via PolyBase. A new
container will be created if it does not exist.
F IEL D DESC RIP T IO N
HashColumnName Specifies the column used for hash table distribution. Applies if
HASH is specified for TableDistribution .
BlobStorage
F IEL D DESC RIP T IO N
RowDelimiter Specifies the character(s) that marks the end of each row.
ColumnDelimiter Specifies one or more characters that mark the end of each
column. E.g. | (pipe), \t (tab), ' (single quote), " (double quote),
and 0x5c (backslash).
HashColumnName Specifies the column used for hash table distribution. Applies if
HASH is specified for TableDistribution .
You will see a different Mappings page depending on whether you are copying to a new table or to an existing
one. In the former case, configure which source columns are to be mapped and their corresponding names in the
to-be-created destination table. In the latter case, configure the mapping relationships between source and
destination columns.
On the Columns page, configure the data type properties for each source column.
The T-SQL page shows the T-SQL used to load data from Azure Blob Storage to Azure SQL DW. The T-SQL is
automatically generated from configurations on the other pages, and will be executed as part of the task execution.
You may choose to manually edit the generated T-SQL to meet your particular needs by clicking the Edit button.
You can revert to the automatically generated one later on by clicking the Reset button.
Flexible File Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Flexible File Task enables users to perform file operations on various supported storage services. Currently
supported storage services are
Local File System
Azure Blob Storage
Azure Data Lake Storage Gen2
The Flexible File Task is a component of the SQL Server Integration Services (SSIS) Feature Pack for Azure.
To add a Flexible File Task to a package, drag it from SSIS Toolbox to the designer canvas. Then double-click the
task, or right-click the task and select Edit , to open the Flexible File Task Editor dialog box.
The Operation property specifies the file operation to perform. Currently supported operations are:
Copy Operation
Delete Operation
For Copy operation, following properties are available.
SourceConnectionType: Specifies the source connection manager type.
SourceConnection: Specifies the source connection manager.
SourceFolderPath: Specifies the source folder path.
SourceFileName: Specifies the source file name. If left blank, the source folder will be copied. Following
wildcards are allowed in source file name: * (matches zero or more characters), ? (matches zero or single
character) and ^ (escape character).
SearchRecursively: Specifies whether to recursively copy subfolders.
DestinationConnectionType: Specifies the destination connection manager type.
DestinationConnection: Specifies the destination connection manager.
DestinationFolderPath: Specifies the destination folder path.
DestinationFileName: Specifies the destination file name. If left blank, the source file names will be used.
For Delete operation, following properties are available.
ConnectionType: Specifies the connection manager type.
Connection: Specifies the connection manager.
FolderPath: Specifies the folder path.
FileName: Specifies the file name. If left blank, the folder will be deleted. For Azure Blob Storage, delete folder
is not supported. Following wildcards are allowed in file name: * (matches zero or more characters), ?
(matches zero or single character) and ^ (escape character).
DeleteRecursively: Specifies whether to recusively delete files.
Notes on Ser vice Principal Permission Configuration
For Test Connection to work (either blob storage or Data Lake Storage Gen2), the service principal should be
assigned at least Storage Blob Data Reader role to the storage account. This is done with RBAC.
For blob storage, read and write permissions are granted by assigning at least Storage Blob Data Reader and
Storage Blob Data Contributor roles, respectively.
For Data Lake Storage Gen2, permission is determined by both RBAC and ACLs. Pay attention that ACLs are
configured using the Object ID (OID) of the service principal for the app registration as detailed here. This is
different from the Application (client) ID that is used with RBAC configuration. When a security principal is granted
RBAC data permissions through a built-in role, or through a custom role, these permissions are evaluated first
upon authorization of a request. If the requested operation is authorized by the security principal's RBAC
assignments, then authorization is immediately resolved and no additional ACL checks are performed. Alternatively,
if the security principal does not have an RBAC assignment, or the request's operation does not match the assigned
permission, then ACL checks are performed to determine if the security principal is authorized to perform the
requested operation.
For read permission, grant at least Execute permission starting from the source file system, along with Read
permission for the files to copy. Alternatively, grant at least the Storage Blob Data Reader role with RBAC.
For write permission, grant at least Execute permission starting from the sink file system, along with Write
permission for the sink folder. Alternatively, grant at least the Storage Blob Data Contributor role with RBAC.
See this article for details.
Back Up Database Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Back Up Database task performs different types of SQL Server database backups. For more information, see
Back Up and Restore of SQL Server Databases.
By using the Back Up Database task, a package can back up a single database or multiple databases. If the task
backs up only a single database, you can choose the backup component: the database, or its files and filegroups.
DATA B A SE F IL E O R F IL E
REC O VERY M O DEL DATA B A SE DIF F EREN T IA L T RA N SA C T IO N LO G DIF F EREN T IA L
The Back Up Database task encapsulates a Transact-SQL BACKUP statement. For more information, see BACKUP
(Transact-SQL).
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Bulk Insert task provides an efficient way to copy large amounts of data into a SQL Server table or view. For
example, suppose your company stores its million-row product list on a mainframe system, but the company's e-
commerce system uses SQL Server to populate Web pages. You must update the SQL Server product table nightly
with the master product list from the mainframe. To update the table, you save the product list in a tab-delimited
format and use the Bulk Insert task to copy the data directly into the SQL Server table.
To ensure high-speed data copying, transformations cannot be performed on the data while it is moving from the
source file to the table or view.
Usage Considerations
Before you use the Bulk Insert task, consider the following:
The Bulk Insert task can transfer data only from a text file into a SQL Server table or view. To use the Bulk
Insert task to transfer data from other database management systems (DBMSs), you must export the data
from the source to a text file and then import the data from the text file into a SQL Server table or view.
The destination must be a table or view in a SQL Server database. If the destination table or view already
contains data, the new data is appended to the existing data when the Bulk Insert task runs. If you want to
replace the data, run an Execute SQL task that runs a DELETE or TRUNCATE statement before you run the
Bulk Insert task. For more information, see Execute SQL Task.
You can use a format file in the Bulk Insert task object. If you have a format file that was created by the bcp
utility, you can specify its path in the Bulk Insert task. The Bulk Insert task supports both XML and nonXML
format files. For more information about format files, see Format Files for Importing or Exporting Data (SQL
Server).
Only members of the sysadmin fixed server role can run a package that contains a Bulk Insert task.
Performance Optimization
To optimize performance, consider the following:
If the text file is located on the same computer as the SQL Server database into which data is inserted, the
copy operation occurs at an even faster rate because the data is not moved over the network.
The Bulk Insert task does not log error-causing rows. If you must capture this information, use the error
outputs of data flow components to capture error-causing rows in an exception file.
LO G EN T RY DESC RIP T IO N
Related Tasks
Set the Properties of a Task or Container
Related Content
Technical article, You may get "Unable to prepare the SSIS bulk insert for data insertion" error on UAC
enabled systems, on support.microsoft.com.
Technical article, The Data Loading Performance Guide, on msdn.microsoft.com.
Technical article, Using SQL Server Integration Services to Bulk Load Data, on simple-talk.com.
VA L UE DESC RIP T IO N
Use File Select a file containing the format specification. Selecting this
option displays the dynamic option, FormatFile .
Specify Specify the format. Selecting this option displays the dynamic
options, RowDelimiter and ColumnDelimiter .
File
Select a File or Flat File connection manager in the list, or click <New connection...> to create a new connection.
The file location is relative to the SQL Server Database Engine specified in the connection manager for this task.
The text file must be accessible by the SQL Server Database Engine either on a local hard drive on the server, or via
a share or mapped drive to the SQL Server. The file is not accessed by the SSIS Runtime.
If you access the source file by using a Flat File connection manager, the Bulk Insert task does not use the format
specified in the Flat File connection manager. Instead, the Bulk Insert task uses either the format specified in a
format file or the values of the RowDelimiter and ColumnDelimiter properties of the task.
Related Topics: File Connection Manager, Flat File Connection Manager
Refresh Tables
Refresh the list of tables and views.
Format Dynamic Options
Format = Use File
FormatFile
Type the path of the format file or click the ellipsis button (...) to locate the format file.
Format = Specify
RowDelimiter
Specify the row delimiter in the source file. The default value is {CR}{LF} .
ColumnDelimiter
Specify the column delimiter in the source file. The default is Tab .
NOTE
Task names must be unique within a package.
Description
Type a description of the Bulk Insert task.
NOTE
Each row that cannot be imported by the bulk load operation is counted as one error.
CDC Control Task
11/2/2020 • 10 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The CDC Control task is used to control the life cycle of change data capture (CDC) packages. It handles CDC
package synchronization with the initial load package, the management of Log Sequence Number (LSN) ranges
that are processed in a run of a CDC package. In addition, the CDC Control task deals with error scenarios and
recovery.
The CDC Control task maintains the state of the CDC package in an SSIS package variable and it can also persist
it in a database table so that the state is maintained across package activations and between multiple packages
that together perform a common CDC process (for example, one task may be responsible for the initial loading
and the other for the trickle-feed updates).
The CDC Control task supports two groups of operations. One group handles the synchronization of initial load
and change processing, and the other manages the change-processing range of LSNs for a run of a CDC
package and keeps track of what was processed successfully.
The following operations handle the synchronization of initial load and change processing:
MarkCdcStart This operation is used when then the initial load is made
from a snapshot database. In this case, the change
processing should start immediately after the snapshot LSN.
You can specify the name of the snapshot database to use
and the CDC Control task queries SQL Server 2019 (15.x) for
the snapshot LSN. You also have the option to directly
specify the snapshot LSN.
GetProcessingRange This operation is used before invoking the data flow that
uses the CDC Source data flow. It establishes a range of LSNs
that the CDC Source data flow reads when invoked. The
range is stored in an SSIS package variable that is used by
the CDC Source during data-flow processing.
For more information about the states that are stored, see
Define a State Variable.
MarkProcessedRange : This operation is executed after each CDC run (after the
CDC data flow is completed successfully) to record the last
LSN that was fully processed in the CDC run. The next time
GetProcessingRange is executed, this position is the start of
the processing range.
Error Handling
The CDC Control task may report an error when:
It fails to read the persistent CDC state or when updating the persistent state fails.
It fails to read the current LSN information from the source database.
The CDC state read is not consistent.
In all of these cases, the CDC Control task reports an error that can be handled in the standard way SSIS handles
control-flow errors.
The CDC Control task may also report a warning when the Get Processing Range operation is invoked directly
after another Get Processing Range operation without Mark Processed Range being called. This is an indication
that the previous run failed or that another CDC package may be running using the same CDC state name.
In This Section
CDC Control Task Custom Properties
Related Tasks
Define a State Variable
Related Content
Technical article, Installing Microsoft SQL Server 2012 Change Data Capture for Oracle by Attunity, on
social.technet.microsoft.com.
Technical article, Troubleshoot Configuration Issues in Microsoft Change Data Capture for Oracle by
Attunity, on social.technet.microsoft.com.
Technical article, Troubleshoot CDC Instance Errors in Microsoft Change Data Capture for Oracle by
Attunity, on social.technet.microsoft.com.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The following table describes the custom properties of the CDC Control task. All properties are read/write.
See Also
CDC Control Task
CDC Control Task Editor
Check Database Integrity Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Check Database Integrity task checks the allocation and structural integrity of all the objects in the specified
database. The task can check a single database or multiple databases, and you can choose whether to also check the
database indexes.
The Check Database Integrity task encapsulates the DBCC CHECKDB statement. For more information, see DBCC
CHECKDB (Transact-SQL).
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Data Flow task encapsulates the data flow engine that moves data between sources and destinations, and
lets the user transform, clean, and modify data as it is moved. Addition of a Data Flow task to a package control
flow makes it possible for the package to extract, transform, and load data.
A data flow consists of at least one data flow component, but it is typically a set of connected data flow
components: sources that extract data; transformations that modify, route, or summarize data; and destinations
that load data.
At run time, the Data Flow task builds an execution plan from the data flow, and the data flow engine executes
the plan. You can create a Data Flow task that has no data flow, but the task executes only if it includes at least
one data flow.
To bulk insert data from text files into a SQL Server database, you can use the Bulk Insert task instead of a Data
Flow task and a data flow. However, the Bulk Insert task cannot transform data. For more information, see Bulk
Insert Task.
Multiple Flows
A Data Flow task can include multiple data flows. If a task copies several sets of data, and if the order in which the
data is copied is not significant, it can be more convenient to include multiple data flows in the Data Flow task.
For example, you might create five data flows, each copying data from a flat file into a different dimension table
in a data warehouse star schema.
However, the data flow engine determines order of execution when there are multiple data flows within one data
flow task. Therefore, when order is important, the package should use multiple Data Flow tasks, each task
containing one data flow. You can then apply precedence constraints to control the execution order of the tasks.
The following diagram shows a Data Flow task that has multiple data flows.
Log Entries
Integration Services provides a set of log events that are available to all tasks. Integration Services also provides
custom log entries to many tasks. For more information, see Integration Services (SSIS) Logging. The Data Flow
task includes the following custom log entries:
LO G EN T RY DESC RIP T IO N
BufferSizeTuning Indicates that the Data Flow task changed the size of the
buffer. The log entry describes the reasons for the size
change and lists the temporary new buffer size.
OnPipelinePostPrimeOutput Indicates that the component has completed its last call to
the PrimeOutput method. Depending on the data flow,
multiple log entries may be written. If the component is a
source, this log entry means that the component has
finished processing rows.
OnPipelinePrePrimeOutput Indicates that the component is about to receive its call from
the PrimeOutput method. Depending on the data flow,
multiple log entries may be written.
PipelineExecutionPlan Reports the execution plan of the data flow. The execution
plan provides information about how buffers will be sent to
components. This information, in combination with the
PipelineExecutionTrees log entry, describes what is happening
within the Data Flow task.
PipelineExecutionTrees Reports the execution trees of the layout in the data flow.
The scheduler of the data flow engine uses the trees to build
the execution plan of the data flow.
LO G EN T RY M ESSA GES
PipelineExecutionPlan SourceThread0
Drives: 1
End SourceThread0
WorkThread0
Drives: 1180
End WorkThread0
WorkThread1
Drives: 1291
Influences: 1291
End WorkThread1
Many log events write multiple entries, and the messages for a number of log entries contain complex data. To
make it easier to understand and to communicate the content of complex messages you can parse the message
text. Depending on the location of the logs, you can use Transact-SQL statements or a Script component to
separate the complex text into columns or other formats that you find more useful.
For example, the following table contains the message "Rows were provided to a data flow component as input. :
: 1185 : OLE DB Source Output : 1180 : Sort : 1181 : Sort Input : 76", parsed into columns. The message was
written by the OnPipelineRowsSent event when rows were sent from the OLE DB source to the Sort
transformation.
C O L UM N DESC RIP T IO N VA L UE
PathName The value from the Name property of OLE DB Source Output
the path.
Related Tasks
Set the Properties of a Task or Container
Related Content
Video, Balanced Data Distributer, on technet.microsoft.com.
Data Mining Query Task
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Data Mining Query task runs prediction queries based on data mining models built in Analysis Services. The
prediction query creates a prediction for new data by using mining models. For example, a prediction query can
predict how many sailboats are likely to sell during the summer months or generate a list of prospective
customers who are likely to buy a sailboat.
Integration Services provides tasks that perform other business intelligence operations, such as running Data
Definition Language (DDL) statements and processing analytic objects.
For more information about other business intelligence tasks, click one of the following topics:
Analysis Services Execute DDL Task
Analysis Services Processing Task
Prediction Queries
The query is a Data Mining Extensions (DMX) statement. The DMX language is an extension of the SQL language
that provides support for working with mining models. For more information about how to use the DMX
language, see Data Mining Extensions (DMX) Reference.
The task can query multiple mining models that are built on the same mining structure. A mining model is built
using one of the data mining algorithms that Analysis Services provides. The mining structure that the Data
Mining Query task references can include multiple mining models, built using different algorithms. For more
information, see Mining Structures (Analysis Services - Data Mining) and Data Mining Algorithms (Analysis
Services - Data Mining).
The prediction query that the Data Mining Query task runs returns a result that is a single row or a data set. A
query that returns a single row is called a singleton query: for example, the query that predicts how many
sailboats will be sold during the summer months returns a number. For more information about prediction queries
that return a single row, see Data Mining Query Tools.
The query results are saved to tables. If a table with the name that the Data Mining Query task specifies already
exists, the task can create a new table, using the same name with a number appended, or it can overwrite the table
content.
If the results include nesting, the result is flattened before it is saved. Flattening a result changes a nested result set
to a table. For example, flattening a nested result with a Customer column and a nested Product column adds
rows to the Customer column to make a table that includes product data for each customer. For example, a
customer with three different products becomes a table with three rows, repeating the customer in each row and
including a different product in each row. If the FLATTENED keyword is omitted, the table contains only the
Customer column and only one row per customer. For more information, see SELECT (DMX).
NOTE
The Data Mining Query Editor has no Expressions page. Instead, use the Proper ties window to access the tools for creating
and managing property expressions for properties of the Data Mining Query task.
For more information about how to set these properties in SSIS Designer, click the following topic:
Set the Properties of a Task or Container
NOTE
Task names must be unique within a package.
Description
Type a description of the Data Mining Query task.
Mining Model Tab Options
Connection
Select an Analysis Services connection manager in the list or click New to create a new connection manager.
Related Topics: Analysis Services Connection Manager
New
Create a new Analysis Services connection manager.
Related Topics: Add Analysis Services Connection Manager Dialog Box UI Reference
Mining structure
Select a mining structure in the list.
Mining models
Select a mining model built on the selected mining structure.
NOTE
Task names must be unique within a package.
Description
Type a description of the Data Mining Query task.
Build Query Tab Options
Data mining quer y
Type a data mining query.
Related Topics: Data Mining Extensions (DMX) Reference
Build New Quer y
Create the data mining query using a graphical tool.
Related Topics: Data Mining Query
Parameter Mapping Tab Options
Parameter Name
Optionally, update the parameter name. Map the parameter to a variable by selecting a variable in the Variable
Name list.
Variable Name
Select a variable in the list to map it to the parameter.
Add
Add to a parameter to the list.
Remove
Select a parameter, and then click Remove .
Result Set Tab Options
Result Name
Optionally, update the result set name. Map the result to a variable by selecting a variable in the Variable Name
list.
After you have added a result by clicking Add , provide a unique name for the result.
Variable Name
Select a variable in the list to map it to the result set.
Result Type
Indicate whether to return a single row or a full result set.
Add
Add a result set to the list.
Remove
Select a result, and then click Remove .
Data Mining Query Task Editor (Output Tab)
Use the Output tab of the Data Mining Quer y Task Editor dialog box to specify the destination of the
prediction query.
To learn about implementing data mining in packages, see Data Mining Query Task and Data Mining Solutions.
General Options
Name
Provide a unique name for the Data Mining Query task. This name is used as the label in the task icon.
NOTE
Task names must be unique within a package.
Description
Type a description of the Data Mining Query task.
Output Tab Options
Connection
Select a connection manager in the list or click New to create a new connection manager.
New
Create a new connection manager. Only the ADO.NET and OLE DB connection manager types can be used.
Output table
Specify the table to which the prediction query writes its results.
Drop and re-create the output table
Indicate whether the prediction query should overwrite content in the destination table by dropping and then re-
creating the table.
Data Mining Query
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The design pane contains the data mining prediction query builder, which you can use to build data mining
prediction queries. You can design either prediction queries based on input tables, or singleton prediction queries.
Switch to the result view to run the query and view the results. The query view displays the Data Mining Extensions
(DMX) query created by the prediction query builder.
Options
Switch view button
Click an icon to switch between the design and query pane. By default, the design pane is open.
To switch to the design pane, click the icon.
To switch to the query pane, click the icon.
Mining Model
Displays the selected mining model on which you want to base predictions.
Select Model
Opens the Select Mining Model dialog box.
Input Columns
Displays the selected input columns used to generate the predictions.
Source
Select the source containing the field that you will use for the column from the dropdown list. You can either use
the mining model selected in the Mining Model table, the input table(s) selected in the Select Input Table(s)
table, a prediction function, or a custom expression.
Columns can be dragged from the tables containing the mining model and input columns to the cell.
Field
Select a column from the list of columns derived from the source table. If you selected Prediction Function in
Source , this cell contains a drop-down list of the prediction functions available for the selected mining model.
Alias
The name of the column returned by the server.
Show
Select to return the column or to only use the column in the WHERE clause.
Group
Use with the And/Or column to group expressions together. For example, (expr1 OR expr2) AND expr3.
And/Or
Use to create a logical query. For example, (expr1 OR expr2) AND expr3.
Criteria/Argument
Specify a condition or user expression that applies to the column. Columns can be dragged from the tables
containing the mining model and input columns to the cell.
See Also
Data Mining Query Tools
Data Mining Extensions (DMX) Statement Reference
Data Profiling Task and Viewer
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Data Profiling task provides data profiling functionality inside the process of extracting, transforming, and
loading data. By using the Data Profiling task, you can achieve the following benefits:
Analyze the source data more effectively
Understand the source data better
Prevent data quality problems before they are introduced into the data warehouse.
IMPORTANT
The Data Profiling task works only with data that is stored in SQL Server. It does not work with third-party or file-based data
sources.
Related Content
Data Profiler Schema
Setup of the Data Profiling Task
11/2/2020 • 8 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Before you can review a profile of the source data, the first step is to set up and run the Data Profiling task. You
create this task inside an Integration Services package. To configure the Data Profiling task, you use the Data
Profiling Task Editor. This editor enables you to select where to output the profiles, and which profiles to compute.
After you set up the task, you run the package to compute the data profiles.
IMPORTANT
The output file might contain sensitive data about your database and the data that database contains. For suggestions
about how to make this file more secure, see Access to Files Used by Packages.
Selection and Configuration of the Profiles to be Computed
After you have set up the output file, you have to select which data profiles to compute. The Data Profiling Task
can compute eight different data profiles. Five of these profiles analyze individual columns, and the remaining
three analyze multiple columns or relationships between columns and tables. In a single Data Profiling task, you
can compute multiple profiles for multiple columns or combinations of columns in multiple tables or views.
The following table describes the reports that each of these profiles computes and the data types for which the
profile is valid.
TO C O M P UT E W H IC H H EL P IDEN T IF Y USE T H IS P RO F IL E
All the distinct lengths of string values String values that are not valid - Column Length Distribution- Valid
in the selected column and the For example, you profile of a column for a column with one of the following
percentage of rows in the table that that is supposed to use two characters character data types:
each length represents. for state codes in the United States,
but discover values that are longer char
than two characters.
nchar
varchar
nvarchar
A set of regular expressions that cover String values that are not valid or Column Pattern Profile- Valid for a
the specified percentage of values in a not in the correct format- For column with one of the following
string column. example, a pattern profile of a Zip character data types:
Code/Postal Code column might
Also, to find regular expressions that produce the regular expressions: \d{5}- char
can be used in the future to validate \d{4}, \d{5}, and \d{9}. If the output
new values contains other regular expressions, the nchar
data contains values that are either not
valid or in an incorrect format. varchar
nvarchar
The percentage of null values in the An unexpectedly high ratio of null Column Null Ratio- Valid for a
selected column. values in a column- For example, column with one of the following data
you profile a column that is supposed types:
to contain United States Zip Codes, but
discover an unacceptably high image
percentage of missing zip codes.
text
xml
user-defined types
variant types
TO C O M P UT E W H IC H H EL P IDEN T IF Y USE T H IS P RO F IL E
Statistics such as minimum, maximum, Numeric values and dates that Column Statistics Profile- Valid for a
average, and standard deviation for are not valid -For example, you profile column with one of these data types.
numeric columns, and minimum and a column of historical dates, but
maximum for datetime columns. discover a maximum date that is in the Numeric data types:
future.
integer types (except bit
money
smallmoney
decimal
float
real
numeric
datetime
smalldatetime
timestamp
date
time
datetime2
datetimeoffset
All the distinct values in the selected An incorrect number of distinct Column Value Distribution- Valid
column and the percentage of rows in values in a column -For example, you for a column with one of the following
the table that each value represents. profile a column that contains states in data types.
Or, the values that represent more the United States, but discover more
than a specified percentage in the than 50 distinct values. Numeric data types:
table.
integer types (except bit
money
smallmoney
decimal
float
real
numeric
char
nchar
varchar
nvarchar
datetime
smalldatetime
timestamp
date
time
datetime2
datetimeoffset
TO C O M P UT E W H IC H H EL P IDEN T IF Y USE T H IS P RO F IL E
Whether a column or set of columns is Duplicate values in a potential Candidate Key- A multiple column
a key, or an approximate key, for the key column- For example, you profile profile that reports whether a column
selected table. the Name and Address columns in a or set of columns is appropriate to
Customers table, and discover serve as a key for the selected table.
duplicate values where the name and Valid for columns with one of these
address combinations should be data types.
unique.
Integer data types:
bit
tinyint
smallint
int
bigint
char
nchar
varchar
nvarchar
datetime
smalldatetime
timestamp
date
time
datetime2
datetimeoffset
TO C O M P UT E W H IC H H EL P IDEN T IF Y USE T H IS P RO F IL E
The extent to which the values in one Values that are not valid in Functional Dependency- Valid for
column (the dependent column) dependent columns- For example, columns with one of these data types.
depend on the values in another you profile the dependency between a
column or set of columns (the column that contains United States Zip Integer data types:
determinant column). Codes and a column that contains
states in the United States. The same bit
Zip Code should always have the same
state. However, the profile discovers tinyint
violations of the dependency.
smallint
int
bigint
char
nchar
varchar
nvarchar
datetime
smalldatetime
timestamp
date
time
datetime2
datetimeoffset
TO C O M P UT E W H IC H H EL P IDEN T IF Y USE T H IS P RO F IL E
Whether a column or set of columns is Values that are not valid- For Value Inclusion- Valid for columns
appropriate to serve as a foreign key example, you profile the ProductID with one of these data types:
between the selected tables. column of a Sales table. The profile
discovers that the column contains Integer data types:
That is, this profile reports the overlap values that are not found in the
in the values between two columns or ProductID column of the Products bit
sets of columns. table.
tinyint
smallint
int
bigint
char
nchar
varchar
nvarchar
datetime
smalldatetime
timestamp
date
time
datetime2
datetimeoffset
To select which profiles to compute, you use the Profile Requests page of the Data Profiling Task Editor. For
more information, see Data Profiling Task Editor (Profile Requests Page).
On the Profile Request page, you also specify the data source and configure the data profiles. When you
configure the task, think about the following information:
To simplify configuration and make it easier to discover characteristics of unfamiliar data, you can use the
wildcard, (*) , in place of an individual column name. If you use this wildcard, the task will profile every
column that has an appropriate data type, which in turn can slow down processing.
When the selected table or view is empty, the Data Profiling task does not compute any profiles.
When all the values in the selected column are null, the Data Profiling task computes only the Column Null
Ratio Profile. It does not compute the Column Length Distribution Profile, Column Pattern Profile, Column
Statistics Profile, or Column Value Distribution Profile for the empty column.
Each of the available data profiles has its own configuration options. For more information about those options,
see the following topics:
Candidate Key Profile Request Options (Data Profiling Task)
Column Length Distribution Profile Request Options (Data Profiling Task)
Column Null Ratio Profile Request Options (Data Profiling Task)
Column Pattern Profile Request Options (Data Profiling Task)
Column Statistics Profile Request Options (Data Profiling Task)
Column Value Distribution Profile Request Options (Data Profiling Task)
Functional Dependency Profile Request Options (Data Profiling Task)
Value Inclusion Profile Request Options (Data Profiling Task)
Next Step
Data Profile Viewer.
Data Profile Viewer
11/2/2020 • 9 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Viewing and analyzing the data profiles is the next step in the data profiling process. You can view these profiles
after you have run the Data Profiling task inside an Integration Services package and computed the data profiles.
For more information about how to set up and run the Data Profiling tasks, see Setup of the Data Profiling Task.
IMPORTANT
The output file might contain sensitive data about your database and the data that database contains. For suggestions on
how to make this file more secure, see Access to Files Used by Packages.
Data Profiles
To view the data profiles, you configure the Data Profiling task to send its output to a file, and then you use the
stand-alone Data Profile Viewer. To open the Data Profile Viewer, do one of the following.
Right-click the Data Profiling task in the SSIS Designer, and then click Edit . Click Open Profile Viewer
on the General page of the Data Profiling Task Editor .
In the folder, <drive>:\Program Files (x86) | Program Files\Microsoft SQL Server\110\DTS\Binn, run
DataProfileViewer.exe.
The viewer uses multiple panes to display the profiles that you requested and the computed results, with
optional details and drilldown capability:
Profiles pane
The Profiles pane displays the profiles that were requested in the Data Profile task. To view the computed results
for the profile, select the profile in the Profiles pane and the results will appear in the other panes of the viewer.
Results pane
The Results pane uses a single row to summarize the computed results of the profile. For example, if you
request a Column Length Distribution Profile , this row includes the minimum and maximum length, and the
row count. For most profiles, you can select this row in the Results pane to see additional detail in the optional
Details pane.
Details pane
For most profile types, the Details pane displays additional information about the profile results selected in the
Results pane. For example, if you request a Column Length Distribution Profile , the Details pane displays
each column length that was found. The pane also displays the number and percentage of rows in which the
column value has that column length.
For the three profile types that are computed against more than one column (Candidate Key, Functional
Dependency, and Value Inclusion), the Details pane displays violations of the expected relationship. For example,
if you request a Candidate Key Profile, the Details pane displays duplicate values that violate the uniqueness of
the candidate key.
If the data source that is used to compute the profile is available, you can double-click a row in the Details pane
to see the matching rows of data in the Drilldown pane.
Drilldown pane
You can double-click a row in the Details pane to see the matching rows of data in the Drilldown pane when
the following conditions are true:
The data source that is used to compute the profile is available.
You have permission to view the data.
To connect to the source database for a drilldown request, the Data Profile Viewer uses Windows Authentication
and the credentials of the current user. The Data Profile Viewer does not use the connection information that is
stored in the package that ran the Data Profiling task.
IMPORTANT
The drilldown capability that is available in the Data Profile Viewer sends live queries to the original data source. These
queries may have a negative impact on the performance of the server.
If you drill down from an output file that was not created recently, the drilldown queries might return a different set of
rows than those on which the original output was calculated.
For more information about the user interface of the Data Profile Viewer, see .
Data Prof ile Viewer F1 Help
Minimum Length
Displays the minimum length of values in this column.
Maximum Length
Displays the maximum length of values in this column.
Ignore Leading Spaces
Displays whether this profile was computed with an IgnoreLeadingSpaces value of True or False. This property
was set on the Profile Requests page of the Data Profiling Task Editor.
Ignore Trailing Spaces
Displays whether this profile was computed with an IgnoreTrailingSpaces value of True or False. This property
was set on the Profile Requests page of the Data Profiling Task Editor.
Row Count
Displays the number of rows in the table or view.
D e t a i l e d L e n g t h D i st r i b u t i o n p a n e
Length
Displays the column lengths found in the profiled column.
Count
Displays the number of rows in which the value of the profiled column has the length shown in the Length
column.
Percentage
Displays the percentage of rows in which the value of the profiled column has the length shown in the Length
column.
Profile Type = Column Null Ratio Profile
C o l u m n N u l l R a t i o P r o fi l e - < c o l u m n > p a n e
Null Count
Displays the number of rows in which the profiled column has a null value.
Null Percentage
Displays the percentage of rows in which the profiled column has a null value.
Row Count
Displays the number of rows in the table or view.
Profile Type = Column Pattern Profile
C o l u m n P a t t e r n P r o fi l e - < c o l u m n > p a n e
Row Count
Displays the number of rows in the table or view.
P a t t e r n D i st r i b u t i o n p a n e
Pattern
Displays the patterns computed for the profiled column.
Percentage
Displays the percentage of rows whose values match the pattern displayed in the Pattern column.
Profile Type = Column Statistics Profile
C o l u m n St a t i st i c s P r o fi l e - < c o l u m n > p a n e
Minimum
Displays the minimum value found in the profiled column.
Maximum
Displays the maximum value found in the profiled column.
Mean
Displays the mean of the values found in the profiled column.
Standard Deviation
Displays the standard deviation of the values found in the profiled column.
Profile Type = Column Value Distribution Profile
C o l u m n Va l u e D i st r i b u t i o n P r o fi l e - < c o l u m n > p a n e
Value
Displays the distinct values found in the profiled column.
Count
Displays the number of rows in which the profiled column has the value shown in the Value column.
Percentage
Displays the percentage of rows in which the profiled column has the value shown in the Value column.
Profile Type = Candidate Key Profile
C a n d i d a t e K e y P r o fi l e - < t a b l e > p a n e
Key Columns
Displays the columns that were selected for profiling as a candidate key.
Key Strength
Displays the strength (as a percentage) of the candidate key column or combination of columns. A key strength
of less than 100% indicates that duplicate values exist.
K e y Vi o l a t i o n s p a n e
Determinant Columns
Displays the column or columns selected as the determinant column. In the example where the same United
States Zip Code should always have the same state, the Zip Code is the determinant column.
Dependent Columns
Displays the column or columns selected as the dependent column. In the example where the same United States
Zip Code should always have the same state, the state is the dependent column.
Functional Dependency Strength
Displays the strength (as a percentage) of the functional dependency between columns. A key strength of less
than 100% indicates that there are cases where the determinant value does not determine the dependent value.
In the example where the same United States Zip Code should always have the same state, this probably
indicates some state values are not valid.
F u n c t i o n a l D e p e n d e n c y Vi o l a t i o n s p a n e
NOTE
A high percentage of erroneous values in the data could lead to unexpected results from a Functional Dependency profile.
For example, 90% of the rows have a State value of "WI" for a Postal Code value of "98052." The profile reports rows that
contain the correct state value of "WA" as violations.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Data Profiling task computes various profiles that help you become familiar with a data source and identify
problems in the data that have to be fixed.
You can use the Data Profiling task inside an Integration Services package to profile data that is stored in SQL
Server and to identify potential problems with data quality.
NOTE
This topic only describes the features and requirements of the Data Profiling task. For a walkthrough of how to use the Data
Profiling task, see the section, Data Profiling Task and Viewer.
IMPORTANT
The output file might contain sensitive data about your database and the data that the database contains. For suggestions
about how to make this file more secure, see Access to Files Used by Packages.
The drilldown capability, that is available in the Data Profile Viewer, sends live queries to the original data source.
Available Profiles
The Data Profiling Task can compute eight different data profiles. Five of these profiles analyze individual columns,
and the remaining three analyze multiple columns or relationships between columns and tables.
The following five profiles analyze individual columns.
Column Length Distribution Profile Reports all the distinct lengths of string values in the selected
column and the percentage of rows in the table that each
length represents.
Column Null Ratio Profile Reports the percentage of null values in the selected column.
Column Pattern Profile Reports a set of regular expressions that cover the specified
percentage of values in a string column.
Column Statistics Profile Reports statistics, such as minimum, maximum, average, and
standard deviation for numeric columns, and minimum and
maximum for datetime columns.
Column Value Distribution Profile Reports all the distinct values in the selected column and the
percentage of rows in the table that each value represents.
Can also report values that represent more than a specified
percentage of rows in the table.
The following three profiles analyze multiple columns or relationships between columns and tables.
This profile also helps you identify problems in your data, such
as duplicate values in a potential key column.
P RO F IL ES T H AT A N A LY Z E M ULT IP L E C O L UM N S DESC RIP T IO N
Functional Dependency Profile Reports the extent to which the values in one column (the
dependent column) depend on the values in another column
or set of columns (the determinant column).
This profile also helps you identify problems in your data, such
as values that are not valid. For example, you profile the
dependency between a column that contains United States Zip
Codes and a column that contains states in the United States.
The same Zip Code should always have the same state, but
the profile discovers violations of this dependency.
Value Inclusion Profile Computes the overlap in the values between two columns or
sets of columns. This profile can determine whether a column
or set of columns is appropriate to serve as a foreign key
between the selected tables.
This profile also helps you identify problems in your data, such
as values that are not valid. For example, you profile the
ProductID column of a Sales table and discover that the
column contains values that are not found in the ProductID
column of the Products table.
P RO F IL E VA L ID DATA T Y P ES*
* In the previous table of valid data types, the integer , char , datetime , and numeric types include the following
specific data types:
Integer types include bit , tinyint , smallint , int , and bigint .
Character types include char , nchar , varchar , and nvarchar, but do not include varchar(max) and
nvarchar(max) .
Date and time types include datetime , smalldatetime , and timestamp .
Numeric types include integer types (except bit ), money , smallmoney , decimal , float , real , and numeric .
** image , text , XML , udt , and variant types are not supported for profiles other than the Column Null Ratio
Profile.
Valid Tables and Columns
If the table or column is empty, the Data Profiling takes the following actions:
When the selected table or view is empty, the Data Profiling task does not compute any profiles.
When all the values in the selected column are null, the Data Profiling task computes only the Column Null
Ratio profile. The task does not compute the Column Length Distribution profile, Column Pattern profile,
Column Statistics profile, or Column Value Distribution profile.
LO G EN T RY DESC RIP T IO N
Query Start
Query End
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Single Table Quick Profile Form to configure the Data Profiling task quickly to profile a single table or
view by using default settings.
For more information about how to use the Data Profiling Task, see Setup of the Data Profiling Task. For more
information about how to use the Data Profile Viewer To analyze the output of the Data Profiling Task, see Data
Profile Viewer.
Options
Connection
Select an existing ADO.NET connection manager that uses the .NET Data Provider for SQL Server (SqlClient) to
connect to the SQL Server database that contains the table or view to be profiled.
Table or View
Select an existing table or view in the database to which the selected connection manager connects.
Compute
Select which profiles to compute.
VA L UE DESC RIP T IO N
Column Null Ratio Profile Compute a Column Null Ratio profile by using the default
settings for all applicable columns in the selected table or
view.
Column Statistics Profile Compute a Column Statistics profile by using the default
settings for all applicable columns in the selected table or
view.
Column Value Distribution Profile Compute a Column Value Distribution profile by using the
default settings for all applicable columns in the selected
table or view.
Column Length Distribution Profile Compute a Column Length Distribution profile by using the
default settings for all applicable columns in the selected
table or view.
Column Pattern Profile Compute a Column Pattern profile by using the default
settings for all applicable columns in the selected table or
view.
Candidate Key Profile Compute a Candidate Key profile for column combinations
that include up to the number of columns that is specified in
for up to N Column keys .
for up to N Column keys Select the maximum number of columns to test in possible
combinations as a key for the table or view. The default value
is 1. The maximum value is 1000. For example, selecting 3
tests one-column, two-column, and three-column key
combinations.
VA L UE DESC RIP T IO N
for up to N Columns as the determiner Select the maximum number of columns to test in possible
combinations as the determinant columns. The default value
is 1. The maximum value is 1000. For example, selecting 2
tests combinations in which either single columns or two-
column combinations are the determinant columns for
another (dependent) column.
NOTE
The Value Inclusion Profile type is not available from the Single Table Quick Profile Form .
See Also
Data Profiling Task Editor (General Page)
Data Profiling Task Editor (Profile Requests Page)
Data Profiling Task Editor (Profile Requests Page)
11/2/2020 • 8 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Profile Requests Page of the Data Profiling Task Editor to select and configure the profiles that you
want to compute. In a single Data Profiling task, you can compute multiple profiles for multiple columns or
combinations of columns in multiple tables or views.
For more information about how to use the Data Profiling Task, see Setup of the Data Profiling Task. For more
information about how to use the Data Profile Viewer to analyze the output of the Data Profiling Task, see Data
Profile Viewer.
To open the Profile Requests page of the Data Profiling Task Editor
1. In SQL Server Data Tools (SSDT), open the Integration Services package that has the Data Profiling task.
2. On the Control Flow tab, double-click the Data Profiling task.
3. In the Data Profiling Task Editor , click Profile Requests .
VA L UE DESC RIP T IO N
Column Length Distribution Profile Request Compute a Column Length Distribution Profile.
Column Null Ratio Profile Request Compute a Column Null Ratio Profile.
Column Statistics Profile Request Select this option to compute a Column Statistics Profile
using the default settings for all applicable columns in the
selected table or view.
Column Value Distribution Profile Request Compute a Column Value Distribution Profile.
RequestID
Displays the identifier for the request. Typically, you do not have to change the autogenerated value.
Columns Common to All Individual Profiles
Connection Manager
Displays the ADO.NET connection manager that connects to the source database.
Request ID
Displays an identifier for the request. Typically, you do not have to change the autogenerated value.
Columns Common to the Five Individual Column Profiles
Table or View
Displays the table or view that contains the selected column.
Column
Displays the column selected for profiling.
Columns Specific to the Candidate Key Profile
Table or View
Displays the table or view that contains the selected columns.
Key Columns
Displays the columns selected for profiling.
Columns Specific to the Functional Dependency Profile
Table or View
Displays the table or view that contains the selected columns.
Determinant Columns
Displays the columns selected for profiling as the determinant column or columns. In the example where the
United States Zip Code determines the state in the United States, the determinant column is the Zip Code column.
Dependent column
Displays the columns selected for profiling as the dependent column. In the example where the United States Zip
Code determines the state in the United States, the dependent column is the state column.
Columns Specific to the Value Inclusion Profile
Subset Side Table or View
Displays the table or view that contains the column or columns selected as the subset side columns.
Superset Side Table or View
Displays the table or view that contains the column or columns selected as the superset side columns.
Subset Side Columns
Displays the column or columns selected for profiling as the subset side columns. In the example where you want
to verify that the values in a US state column are found in a reference table of two-character US state codes, the
subset column is the state column in the source table.
Superset Side Columns
Displays the column or columns selected for profiling as the superset side columns. In the example where you
want to verify that the values in a US state column are found in a reference table of two-character US state codes,
the superset column is the column of state codes in the reference table.
NOTE
After you select a Profile Type , you must select the Request ID field to see the properties for the profile request in the
Request Proper ties pane.
These options vary based on the selected profile. For information about the options for individual profile types,
see the following topics:
Candidate Key Profile Request Options (Data Profiling Task)
Column Null Ratio Profile Request Options (Data Profiling Task)
Column Statistics Profile Request Options (Data Profiling Task)
Column Value Distribution Profile Request Options (Data Profiling Task)
Column Length Distribution Profile Request Options (Data Profiling Task)
Column Pattern Profile Request Options (Data Profiling Task)
Functional Dependency Profile Request Options (Data Profiling Task)
Value Inclusion Profile Request Options (Data Profiling Task)
See Also
Data Profiling Task Editor (General Page)
Single Table Quick Profile Form (Data Profiling Task)
Candidate Key Profile Request Options (Data
Profiling Task)
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Request Proper ties pane of the Profile Requests page to set the options for the Candidate Key
Profile Request that is selected in the requests pane. A Candidate Key profile reports whether a column or set of
columns is a key, or an approximate key, for the selected table. This profile can also help you identify problems in
your data such as duplicate values in a potential key column.
NOTE
The options described in this topic appear on the Profile Requests page of the Data Profiling Task Editor . For more
information about this page of the editor, see Data Profiling Task Editor (Profile Requests Page).
For more information about how to use the Data Profiling Task, see Setup of the Data Profiling Task. For more
information about how to use the Data Profile Viewer to analyze the output of the Data Profiling Task, see Data
Profile Viewer.
NOTE
If you select (*), this option might result in a large number of computations and decrease the performance of the task.
However, if the task finds a subset that satisfies the threshold for a key, the task does not analyze additional combinations.
For example, in the sample table described above, if the task determines that column C is a key, the task does not continue
to analyze the composite key candidates.
NOTE
When you use a (*) wildcard for ColumnName , CompareOptions is read-only and is set to the Default setting.
VA L UE DESC RIP T IO N
Binar ySor t Sorts and compares data based on the bit patterns defined
for each character. Binary sort order is case sensitive and
accent sensitive. Binary is also the fastest sorting order.
Dictionar ySor t Sorts and compares data based on the sorting and
comparison rules as defined in dictionaries for the associated
language or alphabet.
If you select Dictionar ySor t , you can also select any combination of the options listed in the following table. By
default, none of these additional options are selected.
VA L UE DESC RIP T IO N
General Options
RequestID
Type a descriptive name to identify this profile request. Typically, you do not have to change the autogenerated
value.
Options
ThresholdSetting
This property has the options listed in the following table. The default value of this property is Specified .
VA L UE DESC RIP T IO N
See Also
Data Profiling Task Editor (General Page)
Single Table Quick Profile Form (Data Profiling Task)
Column Length Distribution Profile Request Options
(Data Profiling Task)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Request Proper ties pane of the Profile Requests page to set the options for the Column Length
Distribution Profile Request selected in the requests pane. A Column Length Distribution profile reports all the
distinct lengths of string values in the selected column and the percentage of rows in the table that each length
represents. This profile can help you identify problems in your data such as invalid values. For example, you profile
a column of two-character United States state codes and discover values longer than two characters.
NOTE
The options described in this topic appear on the Profile Requests page of the Data Profiling Task Editor . For more
information about this page of the editor, see Data Profiling Task Editor (Profile Requests Page).
For more information about how to use the Data Profiling Task, see Setup of the Data Profiling Task. For more
information about how to use the Data Profile Viewer to analyze the output of the Data Profiling Task, see Data
Profile Viewer.
See Also
Data Profiling Task Editor (General Page)
Single Table Quick Profile Form (Data Profiling Task)
Column Null Ratio Profile Request Options (Data
Profiling Task)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Request Proper ties pane of the Profile Requests page to set the options for the Column Null Ratio
Request selected in the requests pane. A Column Null Ratio profile reports the percentage of null values in the
selected column. This profile can help you identify problems in your data such as an unexpectedly high ratio of
null values in a column. For example, a Column Null Ratio profile can profile a ZIP Code/Postal Code column and
discover an unacceptably high percentage of missing postal codes.
NOTE
The options described in this topic appear on the Profile Requests page of the Data Profiling Task Editor . For more
information about this page of the editor, see Data Profiling Task Editor (Profile Requests Page).
For more information about how to use the Data Profiling Task, see Setup of the Data Profiling Task. For more
information about how to use the Data Profile Viewer to analyze the output of the Data Profiling Task, see Data
Profile Viewer.
See Also
Data Profiling Task Editor (General Page)
Single Table Quick Profile Form (Data Profiling Task)
Column Pattern Profile Request Options (Data
Profiling Task)
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Request Proper ties pane of the Profile Requests page to set the options for the Column Pattern
Profile Request selected in the requests pane. A Column Pattern profile reports a set of regular expressions that
cover the specified percentage of values in a string column. This profile can help you identify problems in your
data, such as invalid strings, and can suggest regular expressions that can be used in the future to validate new
values. For example, a pattern profile of a column of United States Zip Codes might produce the regular
expressions \d{5}-\d{4}, \d{5}, and \d{9}. If you see other regular expressions, your data likely contains values that
are invalid or in an incorrect format.
NOTE
The options described in this topic appear on the Profile Requests page of the Data Profiling Task Editor . For more
information about this page of the editor, see Data Profiling Task Editor (Profile Requests Page).
For more information about how to use the Data Profiling Task, see Setup of the Data Profiling Task. For more
information about how to use the Data Profile Viewer to analyze the output of the Data Profiling Task, see Data
Profile Viewer.
TA G T ERM
Direction East
Direction West
Direction North
Direction South
You could use another tag to group the different words that express the notion of a "street" in street addresses:
TA G T ERM
Street Street
Street Avenue
Street Place
Street Way
Based on this combination of tags, the resulting pattern for a street address might resemble the following pattern:
\d+\ LookupTag=Direction \d+\p{L}+\ LookupTag=Street
NOTE
Using a tag table decreases the performance of the Data Profiling task. Do not use more than 10 tags or more than 100
terms per tag.
For more information, see "Understanding the Use of Delimiters and Symbols" earlier in this topic.
TagTableConnectionManager
Select the existing ADO.NET connection manager that uses the .NET Data Provider for SQL Server (SqlClient) to
connect to the SQL Server database that contains the tag table.
For more information, see "Understanding the Use of the Tag Table" earlier in this topic.
TagTableName
Select the existing tag table, which must have two string columns named Tag and Term.
For more information, see "Understanding the Use of the Tag Table" earlier in this topic.
See Also
Data Profiling Task Editor (General Page)
Single Table Quick Profile Form (Data Profiling Task)
Column Statistics Profile Request Options (Data
Profiling Task)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Request Proper ties pane of the Profile Requests page to set the options for the Column Statistics
Profile Request selected in the requests pane. A Column Statistics profile reports statistics such as minimum,
maximum, average, and standard deviation for numeric columns, and minimum and maximum for datetime
columns. This profile can help you identify problems in your data such as invalid dates. For example, you profile a
column of historical dates and discover a maximum date that is in the future.
NOTE
The options described in this topic appear on the Profile Requests page of the Data Profiling Task Editor . For more
information about this page of the editor, see Data Profiling Task Editor (Profile Requests Page).
For more information about how to use the Data Profiling Task, see Setup of the Data Profiling Task. For more
information about how to use the Data Profile Viewer to analyze the output of the Data Profiling Task, see Data
Profile Viewer.
See Also
Data Profiling Task Editor (General Page)
Single Table Quick Profile Form (Data Profiling Task)
Column Value Distribution Profile Request Options
(Data Profiling Task)
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Request Proper ties pane of the Profile Requests page to set the options for the Column Value
Distribution Profile Request selected in the requests pane. A Column Value Distribution profile reports all the
distinct values in the selected column and the percentage of rows in the table that each value represents. The
profile can also report values that represent more than a specified percentage of rows in the table. This profile can
help you identify problems in your data such as an incorrect number of distinct values in a column. For example,
you profile a United States state column and discover more than 50 distinct values.
NOTE
The options described in this topic appear on the Profile Requests page of the Data Profiling Task Editor . For more
information about this page of the editor, see Data Profiling Task Editor (Profile Requests Page).
For more information about how to use the Data Profiling Task, see Setup of the Data Profiling Task. For more
information about how to use the Data Profile Viewer to analyze the output of the Data Profiling Task, see Data
Profile Viewer.
NOTE
If the (*) wildcard is used for ColumnName , CompareOptions is read-only and is set to the Default setting.
VA L UE DESC RIP T IO N
Binar ySor t Sorts and compares data based on the bit patterns defined
for each character. Binary sort order is case sensitive and
accent sensitive. Binary is also the fastest sorting order.
Dictionar ySor t Sorts and compares data based on the sorting and
comparison rules as defined in dictionaries for the associated
language or alphabet.
If you select Dictionar ySor t , you can also select any combination of the options listed in the following table. By
default, none of these additional options are selected.
VA L UE DESC RIP T IO N
General Options
RequestID
Type a descriptive name to identify this profile request. Typically, you do not have to change the autogenerated
value.
Options
ValueDistributionOption
Specify whether to compute the distribution for all column values. The default value of this option is
FrequentValues .
VA L UE DESC RIP T IO N
FrequentValueThreshold
Specify the threshold (by using a value between 0 and 1) above which the column value should be reported. This
option is disabled when you select AllValues as the ValueDistributionOption . The default value of this option is
0.001.
See Also
Data Profiling Task Editor (General Page)
Single Table Quick Profile Form (Data Profiling Task)
Functional Dependency Profile Request Options
(Data Profiling Task)
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Request Proper ties pane of the Profile Requests page to set the options for the Functional
Dependency Profile Request selected in the requests pane. A Functional Dependency profile reports the extent
to which the values in one column (the dependent column) depend on the values in another column or set of
columns (the determinant column). This profile can also help you identify problems in your data such as invalid
values. For example, you profile the dependency between a Zip Code/Postal Code column and a United States state
column. In this profile, the same Zip Code should always have the same state, but the profile discovers violations
of the dependency.
NOTE
The options described in this topic appear on the Profile Requests page of the Data Profiling Task Editor . For more
information about this page of the editor, see Data Profiling Task Editor (Profile Requests Page).
For more information about how to use the Data Profiling Task, see Setup of the Data Profiling Task. For more
information about how to use the Data Profile Viewer to analyze the output of the Data Profiling Task, see Data
Profile Viewer.
VA L UE DESC RIP T IO N
Binar ySor t Sorts and compares data based on the bit patterns defined
for each character. Binary sort order is case sensitive and
accent sensitive. Binary is also the fastest sorting order.
Dictionar ySor t Sorts and compares data based on the sorting and
comparison rules as defined in dictionaries for the associated
language or alphabet.
If you select Dictionar ySor t , you can also select any combination of the options listed in the following table. By
default, none of these additional options are selected.
VA L UE DESC RIP T IO N
General Options
RequestID
Type a descriptive name to identify this profile request. Typically, you do not have to change the autogenerated
value.
Options
ThresholdSetting
Specify the threshold setting. The default value of this property is Specified .
VA L UE DESC RIP T IO N
FDStrengthThreshold
Specify the threshold (by using a value between 0 and 1) above which the functional dependency strength should
be reported. The default value of this property is 0.95. This option is enabled only when Specified is selected as
the ThresholdSetting .
MaxNumberOfViolations
Specify the maximum number of functional dependency violations to report in the output. The default value of this
property is 100. This option is disabled when Exact is selected as the ThresholdSetting .
See Also
Data Profiling Task Editor (General Page)
Single Table Quick Profile Form (Data Profiling Task)
Value Inclusion Profile Request Options (Data
Profiling Task)
11/2/2020 • 7 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Request Proper ties pane of the Profile Requests page to set the options for the Value Inclusion
Profile Request selected in the requests pane. A Value Inclusion profile computes the overlap in the values
between two columns or sets of columns. Thus, it can also determine whether a column or set of columns is
appropriate to serve as a foreign key between the selected tables. This profile can also help you identify problems
in your data such as invalid values. For example, you use a value inclusion profile to profile the ProductID column
of a Sales table. The profile discovers that the column contains values that are not found in the ProductID column
of the Products table.
NOTE
The options described in this topic appear on the Profile Requests page of the Data Profiling Task Editor . For more
information about this page of the editor, see Data Profiling Task Editor (Profile Requests Page).
For more information about how to use the Data Profiling Task, see Setup of the Data Profiling Task. For more
information about how to use the Data Profile Viewer to analyze the output of the Data Profiling Task, see Data
Profile Viewer.
NOTE
If you select (*), this option might result in a large number of computations and decrease the performance of the task.
NOTE
When you use the (*) wildcard for ColumnName , CompareOptions is read-only and is set to the Default setting.
VA L UE DESC RIP T IO N
Binar ySor t Sorts and compares data based on the bit patterns defined
for each character. Binary sort order is case sensitive and
accent sensitive. Binary is also the fastest sorting order.
Dictionar ySor t Sorts and compares data based on the sorting and
comparison rules as defined in dictionaries for the associated
language or alphabet.
If you select Dictionar ySor t , you can also select any combination of the options listed in the following table. By
default, none of these additional options are selected.
VA L UE DESC RIP T IO N
General Options
RequestID
Type a descriptive name to identify this profile request. Typically, you do not have to change the autogenerated
value.
Options
InclusionThresholdSetting
Select the threshold setting to refine the output of the profile. The default value of this property is Specified . For
more information, see the section, "Understanding the Threshold Settings," earlier in this topic.
VA L UE DESC RIP T IO N
InclusionStrengthThreshold
Specify the threshold (by using a value between 0 and 1) above which the inclusion strength should be reported.
The default value of this property is 0.95. This option is enabled only when Specified is selected as the
InclusionThresholdSetting .
For more information, see the section, "Understanding the Threshold Settings," earlier in this topic.
SupersetColumnsKeyThresholdSetting
Specify the superset threshold. The default value of this property is Specified . For more information, see the
section, "Understanding the Threshold Settings," earlier in this topic.
VA L UE DESC RIP T IO N
SupersetColumnsKeyThreshold
Specify the threshold (by using a value between 0 and 1) above which the inclusion strength should be reported.
The default value of this property is 0.95. This option is enabled only when Specified is selected as the
SupersetColumnsKeyThresholdSetting .
For more information, see the section, "Understanding the Threshold Settings," earlier in this topic.
MaxNumberOfViolations
Specify the maximum number of inclusion violations to report in the output. The default value of this property is
100. This option is disabled when Exact is selected as the InclusionThresholdSetting .
See Also
Data Profiling Task Editor (General Page)
Single Table Quick Profile Form (Data Profiling Task)
Data Profiling Task Editor (General Page)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the General page of the Data Profiling Task Editor to configure the following options:
Specify the destination for the profile output.
Use the default settings to simplify the task of profiling a single table or view.
For more information about how to use the Data Profiling task, see Setup of the Data Profiling Task. For more
information about how to use the Data Profile Viewer to analyze the output of the Data Profiling task, see Data
Profile Viewer.
To open the General page of the Data Profiling Task Editor
1. In SQL Server Data Tools (SSDT), open the Integration Services package that has the Data Profiling task.
2. On the Control Flow tab, double-click the Data Profiling task.
3. In the Data Profiling Task Editor , click General .
Destination Options
IMPORTANT
The output file might contain sensitive data about your database and the data that database contains. For suggestions
about how to make this file more secure, see Access to Files Used by Packages.
DestinationType
Specify whether to save the data profile output to a file or a variable:
VA L UE DESC RIP T IO N
Destination
Specify which File connection manager or package variable contains the data profile output:
If the DestinationType option is set to FileConnection , the Destination option displays the available
File connection managers. Select one of these connection managers, or select <New File connection> to
create a new File connection manager.
If the DestinationType option is set to Variable , the Destination option displays the available package
variables in the Destination list. Select one of these variables, or select <New Variable> to create a new
variable.
Over writeDestination
Specify whether to overwrite the output file if it already exists. The default value is False . The value of this
property is used only when the DestinationType option is set to FileConnection. When the DestinationType
option is set to Variable, the task always overwrites the previous value of the variable.
IMPORTANT
If you try to run the Data Profiling task more than once without changing the output file name or changing the value of
the Over writeDestination property to True , the task fails with the message that the output file already exists.
Other Options
Quick Profile
Display the Single Table Quick Profile Form . This form simplifies the task of profiling a single table or view
by using default settings. For more information, see Single Table Quick Profile Form (Data Profiling Task).
Open Profile Viewer
Opens the Data Profile Viewer. The stand-alone Data Profile Viewer displays data profile output from the Data
Profiling task. You can view the data profile output after you have run the Data Profiling task inside the
Integration Services package and computed the data profiles.
NOTE
You can also open the Data Profile Viewer by running the DataProfileViewer.exe in the folder, <drive>:\Program Files (x86)
| Program Files\Microsoft SQL Server\110\DTS\Binn.
See Also
Single Table Quick Profile Form (Data Profiling Task)
Data Profiling Task Editor (Profile Requests Page)
Incorporate a Data Profiling Task in Package
Workflow
11/2/2020 • 12 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Data profiling and cleanup are not candidates for an automated process in their early stages. In SQL Server
Integration Services, the output of the Data Profiling task usually requires visual analysis and human judgment to
determine whether reported violations are meaningful or excessive. Even after recognizing data quality problems,
there still has to be a carefully thought-out plan that addresses the best approach for cleanup.
However, after criteria for data quality have been established, you might want to automate a periodic analysis and
cleanup of the data source. Consider these scenarios:
Checking data quality before an incremental load . Use the Data Profiling task to compute the Column
Null Ratio Profile of new data intended for the CustomerName column in a Customers table. If the
percentage of null values is greater than 20%, send an e-mail message that contains the profile output to
the operator and end the package. Otherwise, continue the incremental load.
Automating cleanup when the specified conditions are met . Use the Data Profiling task to compute
the Value Inclusion Profile of the State column against a lookup table of states, and of the ZIP Code/Postal
Code column against a lookup table of zip codes. If the inclusion strength of the state values is less than
80%, but the inclusion strength of the ZIP Code/Postal Code values is greater than 99%, this indicates two
things. First, the state data is bad. Second, the ZIP Code/Postal Code data is good. Launch a Data Flow task
that cleans up the state data by performing a lookup of the correct state value from the current Zip
Code/Postal Code value.
After you have a workflow into which you can incorporate the Data Flow task, you have to understand the steps
that are required to add this task. The next section describes the general process of incorporating the Data Flow
task. The final two sections describe how to connect the Data Flow task either directly to a data source or to
transformed data from the Data Flow.
NOTE
Some of the profile results that are displayed in the Data Profile Viewer are calculated values that are not directly
found in the output. For example, the output of the Column Null Ratio Profile contains the total number of rows and
the number of rows that contain null values. You have to query these two values, and then calculate the percentage
of rows that contain null values, to obtain the column null ratio.
Task input . The Data Profiling task reads its input from SQL Server tables. Therefore, you have to save data
that is in memory to staging tables if you want to profile data that has already been loaded and transformed
in the data flow.
The following sections apply this general workflow to profiling data that comes directly from an external data
source or that comes transformed from the Data Flow task. These sections also show how to handle the input and
output requirements of the Data Flow task.
NOTE
The AddressLine2 column was selected for this simple example because this column contains a high percentage of null
values.
1. In SQL Server Data Tools (SSDT), create a new Integration Services package.
2. Add an ADO.NET connection manager to the package. Configure this connection manager to use the NET
Data Provider for SQL Server (SqlClient) and to connect to an available instance of the
AdventureWorks2012 database.
By default, the connection manager has the following name: <server name>.AdventureWorks1.
3. Add a File connection manager to the package. Configure this connection manager to create the output file
for the Data Profiling task.
This example uses the file name, DataProfile1.xml. By default, the connection manager has the same name
as the file.
Configure the Package Variables
This example uses two package variables:
The ProfileConnectionName variable passes the name of the File connection manager to the Script task.
The AddressLine2NullRatio variable passes the calculated null ratio for this column out of the Script task to
the package.
To c o n fi g u r e t h e p a c k a g e v a r i a b l e s t h a t w i l l h o l d p r o fi l e r e su l t s
In the Variables window, add and configure the following two package variables:
Enter the name, ProfileConnectionName , for one of the variables and set the type of this variable
to String .
Enter the name, AddressLine2NullRatio , for the other variable and set the type of this variable to
Double .
Configure the Data Profiling Task
The Data Profiling task has to be configured in the following way:
To use the data that the ADO.NET connection manager supplies as input.
To perform a Column Null Ratio profile on the input data.
To save the profile results to the file that is associated with the File connection manager.
To c o n fi g u r e t h e D a t a P r o fi l i n g t a sk
Imports System
Imports Microsoft.SqlServer.Dts.Runtime
Imports System.Xml
Dts.TaskResult = Dts.Results.Success
End Sub
End Class
using System;
using Microsoft.SqlServer.Dts.Runtime;
using System.Xml;
string profileConnectionName;
string profilePath;
XmlDocument profileOutput = new XmlDocument();
XmlNamespaceManager profileNSM;
XmlNode nullCountNode;
int nullCount;
XmlNode tableNode;
int rowCount;
double nullRatio;
Dts.TaskResult = Dts.Results.Success;
NOTE
The sample code shown in this procedure demonstrates how to load the output of the Data Profiling task from a file.
To load the output of the Data Profiling task from a package variable instead, see the alternative sample code that
follows this procedure.
8. Close the script development environment, and then close the Script Task Editor.
Alternative Code-Reading the Profile Output from a Variable
The previous procedure shows how to load the output of the Data Profiling task from a file. However, an alternative
method would be to load this output from a package variable. To load the output from a variable, you have to
make the following changes to the sample code:
Call the LoadXml method of the XmlDocument class instead of the Load method.
In the Script Task Editor, add the name of the package variable that contains the profile output to the task's
ReadOnlyVariables list.
Pass the string value of the variable to the LoadXML method, as shown in the following code example. (This
example uses "ProfileOutput" as the name of the package variable that contains the profile output.)
string outputString;
outputString = Dts.Variables["ProfileOutput"].Value.ToString();
...
profileOutput.LoadXml(outputString);
In the precedence constraints that connect the Script task to downstream branches in the workflow, write
expressions that use the values of the variables to direct the workflow.
For example, you might set the Evaluation operation of the precedence constraint to Expression and
Constraint . Then, you might use @AddressLine2NullRatio < .90 as the value of the expression. This causes
the workflow to follow the selected path when the previous tasks succeed, and when the percentage of null
values in the selected column is less than 90%.
Connecting the Data Profiling Task to Transformed Data from the Data
Flow
Instead of profiling data directly from a data source, you can profile data that has already been loaded and
transformed in the data flow. However, the Data Profiling task works only against persisted data, not against in-
memory data. Therefore, you must first use a destination component to save the transformed data to a staging
table.
NOTE
When you configure the Data Profiling task, you have to select existing tables and columns. Therefore, you must create the
staging table at design time before you can configure the task. In other words, this scenario does not allow you to use a
temporary table that is created at run time.
After saving the data to a staging table, you can do the following actions:
Use the Data Profiling task to profile the data.
Use a Script task to read the results as described earlier in this topic.
Use those results to direct the subsequent workflow of the package.
The following procedure provides the general approach for using the Data Profiling task to profile data that has
been transformed by the data flow. Many of these steps are similar to the ones described earlier for profiling data
that comes directly from an external data source. You might want to review those earlier steps for more
information about how to configure the various components.
To use the Data Profiling task in the data flow
1. In SQL Server Data Tools (SSDT), create a package.
2. In the Data Flow, add, configure, and connect the appropriate sources and transformations.
3. In the Data Flow, add, configure, and connect a destination component that saves the transformed data to a
staging table.
4. In the Control Flow, add and configure a Data Profiling task that computes the desired profiles against the
transformed data in the staging table. Connect the Data Profiling task to the Data Flow task.
5. Configure package variables to hold the values that you want to retrieve from the profile results.
6. Add and configure a Script task. Connect the Script task to the Data Profiling task. In the Script task, write
code that reads the desired values from the output of the Data Profiling task and populates the package
variables.
7. In the precedence constraints that connect the Script task to downstream branches in the workflow, write
expressions that use the values of the variables to direct the workflow.
See Also
Setup of the Data Profiling Task
Data Profile Viewer
Execute Package Task
11/2/2020 • 10 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Execute Package task extends the enterprise capabilities of Integration Services by letting packages run other
packages as part of a workflow.
You can use the Execute Package task for the following purposes:
Breaking down complex package workflow. This task lets you break down workflow into multiple packages,
which are easier to read, test, and maintain. For example, if you are loading data into a star schema, you can
build a separate package to populate each dimension and the fact table.
Reusing parts of packages. Other packages can reuse parts of a package workflow. For example, you can
build a data extraction module that can be called from different packages. Each package that calls the
extraction module can perform different data scrubbing, filtering, or aggregation operations.
Grouping work units. Units of work can be encapsulated into separate packages and joined as transactional
components to the workflow of a parent package. For example, the parent package runs the accessory
packages, and based on the success or failure of the accessory packages, the parent package either
commits or rolls back the transaction.
Controlling package security. Package authors require access to only a part of a multipackage solution. By
separating a package into multiple packages, you can provide a greater level of security, because you can
grant an author access to only the relevant packages.
A package that runs other packages is generally referred to as the parent package, and the packages that a parent
workflow runs are called child packages.
Integration Services includes tasks that perform workflow operations, such as executing executables and batch
files. For more information, see Execute Process Task.
Running Packages
The Execute Package task can run child packages that are contained in the same project that contains the parent
package. You select a child package from the project by setting the ReferenceType property to Project
Reference , and then setting the PackageNameFromProjectReference property.
NOTE
The ReferenceType option is ready-only and set to External Reference if the project that contains the package has not
been converted to the project deployment model. Deploy Integration Services (SSIS) Projects and Packages.
The Execute Package task can also run packages stored in the SQL Server msdb database and packages stored in
the file system. The task uses an OLE DB connection manager to connect to SQL Server or a File connection
manager to access the file system. For more information, see OLE DB Connection Manager and Flat File
Connection Manager.
The Execute Package task can also run a database maintenance plan, which lets you manage both SSIS packages
and database maintenance plans in the same Integration Services solution. A database maintenance plan is similar
to an SSIS package, but a plan can include only database maintenance tasks, and it is always stored in the msdb
database.
If you choose a package stored in the file system, you must provide the name and location of the package. The
package can reside anywhere in the file system; it does not have to be in the same folder as the parent package.
The child package can be run in the process of the parent package, or it can be run in its own process. Running the
child package in its own process requires more memory, but it provides more flexibility. For example, if the child
process fails, the parent process can continue to run.
Alternatively, sometimes you want the parent and child packages to fail together as one unit, or you might not
want to incur the additional overhead of another process. For example, if a child process fails and subsequent
processing in the parent process of the package depends on success of the child process, the child package should
run in the process of the parent package.
By default, the ExecuteOutOfProcess property of the Execute Package task is set to False , and the child package
runs in the same process as the parent package. If you set this property to True , the child package runs in a
separate process. This may slow down the launching of the child package. In addition, if you set the property to
True , you cannot debug the package in a tools-only install. You must install Integration Services. For more
information, see Install Integration Services
Extending Transactions
The transaction that the parent package uses can extend to the child package; therefore, the work both packages
perform can be committed or rolled back. For example, the database inserts that the parent package performs can
be committed or rolled back, depending on the database inserts that the child package performs, and vice versa.
For more information, see Inherited Transactions.
NOTE
If the child package parameter is not sensitive and is mapped to a parent parameter that is sensitive, the child
package will fail to run.
The following mapping conditions are supported:
Sensitive, child package parameter is mapped to a sensitive, parent parameter
Sensitive, child package parameter is mapped to a non-sensitive, parent parameter
Non-sensitive, child package parameter is mapped to a non-sensitive, parent parameter
The parent package variable can be defined in the scope of the Execute Package task or in a parent container such
as the package. If multiple variables with the same name are available, the variable defined in the scope of the
Execute Package task is used, or the variable that is closest in scope to the task.
For more information, see Use the Values of Variables and Parameters in a Child Package.
Accessing Parent Package Variables
Child packages can access parent package variables by using the Script task. When you enter the name of the
parent package variable on the Script page in the Script Task Editor , don't include User : in the variable name.
Otherwise, the child package doesn't locate the variable when you run the parent package.
NOTE
Task names must be unique within a package.
Description
Type a description of the Execute Package task.
Set the Options on the Package Page
ReferenceType
Select Project Reference for child packages that are in the project. Select External Reference for child packages
that are located outside the package
NOTE
The ReferenceType option is ready-only and set to External Reference if the project that contains the package has not
been converted to the project deployment model. Deploy Integration Services (SSIS) Projects and Packages.
Password
If the child package is password protected, provide the password for the child package, or click the ellipsis button
(...) and create a new password for the child package.
ExecuteOutOfProcess
Specify whether the child package runs in the process of the parent package or in a separate process. By default,
the ExecuteOutOfProcess property of the Execute Package task is set to False , and the child package runs in the
same process as the parent package. If you set this property to true , the child package runs in a separate process.
This may slow down the launching of the child package. In addition, if set the property to true , you cannot debug
the package in a tools-only install; you must install the Integration Services product. For more information, see
Install Integration Services.
ReferenceType Dynamic Options
R e fe r e n c e T y p e = Ex t e r n a l R e fe r e n c e
Location
Select the location of the child package. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Connection
Select the type of storage location for the child package.
PackageNameReadOnly
Displays the package name.
R e fe r e n c e T y p e = P r o j e c t R e fe r e n c e
PackageNameFromProjectReference
Select a package contained in the project, to be the child package.
Location Dynamic Options
L o c a t i o n = SQ L Se r v e r
Connection
Select an OLE DB connection manager in the list, or click <New connection...> to create a new connection
manager.
Related Topics: OLE DB Connection Manager
PackageName
Type the name of the child package, or click the ellipsis (...) and then locate the package.
L o c a t i o n = F i l e sy st e m
Connection
Select a File connection manager in the list, or click <New connection...> to create a new connection manager.
Related Topics: File Connection Manager
PackageNameReadOnly
Displays the package name.
Set the Options on the Parameter Bindings Page
You can pass values from the parent package or the project, to the child package. The project must use the project
deployment model and the child package must be contained in the same project that contains the parent package.
For information about converting projects to the project deployment model, see Deploy Integration Services
(SSIS) Projects and Packages.
Child package parameter
Enter or select a name for the child package parameter.
Binding parameter or variable
Select the parameter or variable that contains the value that you want to pass to the child package.
Add
Click to map a parameter or variable to a child package parameter.
Remove
Click to remove a mapping between a parameter or variable and a child package parameter.
Execute Process Task
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Execute Process task runs an application or batch file as part of a SQL Server Integration Services package
workflow. Although you can use the Execute Process task to open any standard application, such as Microsoft Excel
or Microsoft Word, you typically use it to run business applications or batch files that work against a data source.
For example, you can use the Execute Process task to expand a compressed text file. Then the package can use the
text file as a data source for the data flow in the package. As another example, you can use the Execute Process task
to run a custom Visual Basic application that generates a daily sales report. Then you can attach the report to a
Send Mail task and forward the report to a distribution list.
Integration Services includes other tasks that perform workflow operations such as executing packages. For more
information, see Execute Package Task
LO G EN T RY DESC RIP T IO N
You can use an expression to set various Execute Process task properties.
When you use the StandardInputVariable property to configure the Execute Process task to provide input, call
the Console.ReadLine method from the application to read the input. For more information, see
Console.ReadLine Methodthe topic, , in the Microsoft .NET Framework Class Library.
When you use the Arguments property to configure the Execute Process task to provide input, do one of the
following steps to obtain the arguments:
If you use Microsoft Visual Basic to write the application, set the My.Application.CommandLineArgs
property. The following example sets the My.Application.CommandLineArgs property is to retrieve two
arguments:
For more information, see the topic, My.Application.CommandLineArgs Property, in the Visual Basic
reference.
If you use Microsoft Visual C# to write the application, use the Main method.
For more information, see the topic, Command-Line Arguments (C# Programming Guide), in the C#
Programming Guide.
The Execute Process task also includes the StandardOutputVariable and StandardErrorVariable properties for
specifying the variables that consume the standard output and error output of the application, respectively.
Additionally, you can configure the Execute Process task to specify a working directory, a time-out period, or a
value to indicate that the executable ran successfully. The task can also be configured to fail if the return code of the
executable does not match the value that indicates success, or if the executable is not found at the specified
location.
Description
Type a description of the Execute Process task.
See Also
Integration Services Tasks
Control Flow
Execute SQL Server Agent Job Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Execute SQL Server Agent Job task runs SQL Server Agent jobs. SQL Server Agent is a Microsoft Windows
service that runs jobs that have been defined in an instance of SQL Server. You can create jobs that execute
Transact-SQL statements and ActiveX scripts, perform Analysis Services and Replication maintenance tasks, or run
packages. You can also configure a job to monitor Microsoft SQL Server and fire alerts. SQL Server Agent jobs are
typically used to automate tasks that you perform repeatedly. For more information, see Implement Jobs.
By using the Execute SQL Server Agent Job task, a package can perform administrative tasks related to SQL Server
components. For example, a SQL Server Agent job can run a system stored procedure such as
sp_enum_dtspackages to obtain a list of packages in a folder.
NOTE
SQL Server Agent must be running before local or multiserver administrative jobs can run automatically.
This task encapsulates the sp_star t_job system procedure and passes the name of the SQL Server Agent job to
the procedure as an argument. For more information, see sp_start_job (Transact-SQL).
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Execute SQL task runs SQL statements or stored procedures from a package. The task can contain either a
single SQL statement or multiple SQL statements that run sequentially. You can use the Execute SQL task for the
following purposes:
Truncate a table or view in preparation for inserting data.
Create, alter, and drop database objects such as tables and views.
Re-create fact and dimension tables before loading data into them.
Run stored procedures. If the SQL statement invokes a stored procedure that returns results from a
temporary table, use the WITH RESULT SETS option to define metadata for the result set.
Save the rowset returned from a query into a variable.
The Execute SQL task can be used in combination with the Foreach Loop and For Loop containers to run multiple
SQL statements. These containers implement repeating control flows in a package and they can run the Execute
SQL task repeatedly. For example, using the Foreach Loop container, a package can enumerate files in a folder
and run an Execute SQL task repeatedly to execute the SQL statement stored in each file.
C O N N EC T IO N T Y P E C O N N EC T IO N M A N A GER
NOTE
Valid SQL statements written outside the Execute SQL task may not be parsed successfully by the Execute SQL task.
NOTE
The Execute SQL Task uses the RecognizeAll ParseMode enumeration value. For more information, see
ManagedBatchParser Namespace.
NOTE
You can use parameters in an Execute SQL task only if the data provider supports them.
NOTE
Stored procedures do not time out if they emulate sleep functionality by providing time for connections to be made and
transactions to complete that is greater than the number of seconds specified by TimeOut . However, stored procedures
that execute queries are always subject to the time restriction specified by TimeOut .
CodePage
Specify the code page to use when translating Unicode values in variables. The default value is the code page of
the local computer.
NOTE
When the Execute SQL task uses an ADO or ODBC connection manager, the CodePage property is not available. If your
solution requires the use of a code page, use an OLE DB or an ADO.NET connection manager with the Execute SQL task.
TypeConversionMode
When you set this property to Allowed , the Execute SQL Task will attempt to convert output parameter and
query results to the data type of the variable the results are assigned to. This applies to the Single row result
set type.
ResultSet
Specify the result type expected by the SQL statement being run. Choose among Single row , Full result set ,
XML , or None .
ConnectionType
Choose the type of connection manager to use to connect to the data source. Available connection types include
OLE DB , ODBC , ADO , ADO.NET and SQLMOBILE .
Related Topics: OLE DB Connection Manager, ODBC Connection Manager, ADO Connection Manager, ADO.NET
Connection Manager, SQL Server Compact Edition Connection Manager
Connection
Choose the connection from a list of defined connection managers. To create a new connection, select <New
connection...>.
SQLSourceType
Select the source type of the SQL statement that the task runs.
Depending on the connection manager type that Execute SQL task uses, you must use specific parameter
markers in parameterized SQL statements.
This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Quer yIsStoredProcedure
Indicates whether the specified SQL statement to be run is a stored procedure. This property is read/write only if
the task uses the ADO connection manager. Otherwise the property is read-only and its value is false .
BypassPrepare
Indicate whether the SQL statement is prepared. true skips preparation; false prepares the SQL statement
before running it. This option is available only with OLE DB connections that support preparation.
Related Topics: Prepared Execution
Browse
Locate a file that contains a SQL statement by using the Open dialog box. Select a file to copy the contents of the
file as a SQL statement into the SQLStatement property.
Build Quer y
Create an SQL statement using the Quer y Builder dialog box, a graphical tool used to create queries. This
option is available when the SQLSourceType option is set to Direct input .
Parse Quer y
Validate the syntax of the SQL statement.
SQLSourceType Dynamic Options
SQLSourceType = Direct input
SQLStatement
Type the SQL statement to execute in the option box, or click the browse button (...) to type the SQL statement in
the Enter SQL Quer y dialog box, or click Build Quer y to compose the statement using the Quer y Builder
dialog box.
Related Topics: Query Builder
SQLSourceType = File connection
FileConnection
Select an existing File connection manager, or click <New connection...> to create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
SQLSourceType = Variable
SourceVariable
Select an existing variable, or click <New variable...> to create a new variable.
Related Topics: Integration Services (SSIS) Variables, Add Variable
NOTE
You can use parameters in an Execute SQL task only if the data provider supports them.
Parameters in SQL commands, including queries and stored procedures, are mapped to user-defined variables
that are created within the scope of the Execute SQL task, a parent container, or within the scope of the package.
The values of variables can be set at design time or populated dynamically at run time. You can also map
parameters to system variables. For more information, see Integration Services (SSIS) Variables and System
Variables.
However, working with parameters and return codes in an Execute SQL task is more than just knowing what
parameter types the task supports and how these parameters will be mapped. There are additional usage
requirements and guidelines to successfully use parameters and return codes in the Execute SQL task. The
remainder of this topic covers these usage requirements and guidelines:
Using parameters names and markers
Using parameters with date and time data types
Using parameters in WHERE clauses
Using parameters with stored procedures
Getting values of return codes
Parameter names and markers
Depending on the connection type that the Execute SQL task uses, the syntax of the SQL command uses different
parameter markers. For example, the ADO.NET connection manager type requires that the SQL command uses a
parameter marker in the format @varParameter , whereas OLE DB connection type requires the question mark
(?) parameter marker.
The names that you can use as parameter names in the mappings between variables and parameters also vary
by connection manager type. For example, the ADO.NET connection manager type uses a user-defined name
with a @ prefix, whereas the OLE DB connection manager type requires that you use the numeric value of a 0-
based ordinal as the parameter name.
The following table summarizes the requirements for SQL commands for the connection manager types that the
Execute SQL task can use.
C O N N EC T IO N T Y P E PA RA M ET ER M A RK ER PA RA M ET ER N A M E EXA M P L E SQ L C O M M A N D
ADO connection managers require that the SQL command use question marks (?) as parameter markers.
However, you can use any user-defined name, except for integer values, as parameter names.
To provide values to parameters, variables are mapped to parameter names. Then, the Execute SQL task uses the
ordinal value of the parameter name in the parameter list to load values from variables to parameters.
Use parameters with EXCEL, ODBC, and OLE DB Connection Managers
EXCEL, ODBC, and OLE DB connection managers require that the SQL command use question marks (?) as
parameter markers and 0-based or 1-based numeric values as parameter names. If the Execute SQL task uses
the ODBC connection manager, the parameter name that maps to the first parameter in the query is named 1;
otherwise, the parameter is named 0. For subsequent parameters, the numeric value of the parameter name
indicates the parameter in the SQL command that the parameter name maps to. For example, the parameter
named 3 maps to the third parameter, which is represented by the third question mark (?) in the SQL command.
To provide values to parameters, variables are mapped to parameter names and the Execute SQL task uses the
ordinal value of the parameter name to load values from variables to parameters.
Depending on the provider that the connection manager uses, some OLE DB data types may not be supported.
For example, the Excel driver recognizes only a limited set of data types. For more information about the
behavior of the Jet provider with the Excel driver, see Excel Source.
Use parameters with OLE DB Connection Managers
When the Execute SQL task uses the OLE DB connection manager, the BypassPrepare property of the task is
available. You should set this property to true if the Execute SQL task uses SQL statements with parameters.
When you use an OLE DB connection manager, you cannot use parameterized subqueries because the Execute
SQL Task cannot derive parameter information through the OLE DB provider. However, you can use an
expression to concatenate the parameter values into the query string and to set the SqlStatementSource
property of the task.
Use parameters with date and time data types
Use date and time parameters with ADO.NET and ADO Connection Managers
When reading data of the SQL Server types, time and datetimeoffset , an Execute SQL task that uses either an
ADO.NET or ADO connection manager has the following additional requirements:
For time data, an ADO.NET connection manager requires this data to be stored in a parameter whose
parameter type is Input or Output , and whose data type is string .
For datetimeoffset data, an ADO.NET connection manager requires this data to be stored in one of the
following parameters:
A parameter whose parameter type is Input and whose data type is string .
A parameter whose parameter type is Output or ReturnValue , and whose data type is
datetimeoffset , string , or datetime2 . If you select a parameter whose data type is either string
or datetime2 , Integration Services converts the data to either string or datetime2.
An ADO connection manager requires that either time or datetimeoffset data be stored in a parameter
whose parameter type is Input or Output , and whose data type is adVarWchar .
For more information about SQL Server data types and how they map to Integration Services data types, see
Data Types (Transact-SQL) and Integration Services Data Types.
Use date and time parameters with OLE DB Connection Managers
When using an OLE DB connection manager, an Execute SQL task has specific storage requirements for data of
the SQL Server data types, date , time , datetime , datetime2 , and datetimeoffset . You must store this data in
one of the following parameter types:
An input parameter of the NVARCHAR data type.
An output parameter of with the appropriate data type, as listed in the following table.
O UT P UT PA RA M ET ER T Y P E DAT E DATA T Y P E
DBDATE date
DBTIME2 time
DBTIMESTAMPOFFSET datetimeoffset
If the data is not stored in the appropriate input or output parameter, the package fails.
Use date and time parameters with ODBC Connection Managers
When using an ODBC connection manager, an Execute SQL task has specific storage requirements for data with
one of the SQL Server data types, date , time , datetime , datetime2 , or datetimeoffset . You must store this
data in one of the following parameter types:
An input parameter of the SQL_WVARCHAR data type
An output parameter with the appropriate data type, as listed in the following table.
O UT P UT PA RA M ET ER T Y P E DAT E DATA T Y P E
SQL_DATE date
SQL_SS_TIME2 time
-or-
SQL_TIMESTAMP
SQL_SS_TIMESTAMPOFFSET datetimeoffset
If the data is not stored in the appropriate input or output parameter, the package fails.
Use parameters in WHERE clauses
SELECT, INSERT, UPDATE, and DELETE commands frequently include WHERE clauses to specify filters that define
the conditions each row in the source tables must meet to qualify for an SQL command. Parameters provide the
filter values in the WHERE clauses.
You can use parameter markers to dynamically provide parameter values. The rules for which parameter
markers and parameter names can be used in the SQL statement depend on the type of connection manager
that the Execute SQL uses.
The following table lists examples of the SELECT command by connection manager type. The INSERT, UPDATE,
and DELETE statements are similar. The examples use SELECT to return products from the Product table in
AdventureWorks2012 that have a ProductID greater than and less than the values specified by two
parameters.
C O N N EC T IO N T Y P E SEL EC T SY N TA X
EXCEL, ODBC, and OLEDB SELECT* FROM Production.Product WHERE ProductId > ?
AND ProductID < ?
The examples would require parameters that have the following names:
The EXCEL and OLED DB connection managers use the parameter names 0 and 1. The ODBC connection
type uses 1 and 2.
The ADO connection type could use any two parameter names, such as Param1 and Param2, but the
parameters must be mapped by their ordinal position in the parameter list.
The ADO.NET connection type uses the parameter names @parmMinProductID and
@parmMaxProductID.
Use parameters with stored procedures
SQL commands that run stored procedures can also use parameter mapping. The rules for how to use
parameter markers and parameter names depends on the type of connection manager that the Execute SQL
uses, just like the rules for parameterized queries.
The following table lists examples of the EXEC command by connection manager type. The examples run the
uspGetBillOfMaterials stored procedure in AdventureWorks2012 . The stored procedure uses the
@StartProductID and @CheckDate input parameters.
C O N N EC T IO N T Y P E EXEC SY N TA X
For more information about ODBC call syntax, see the topic,
Procedure Parameters, in the ODBC Programmer's Reference
in the MSDN Library.
To use output parameters, the syntax requires that the OUTPUT keyword follow each parameter marker. For
example, the following output parameter syntax is correct: EXEC myStoredProcedure ? OUTPUT .
For more information about using input and output parameters with Transact-SQL stored procedures, see
EXECUTE (Transact-SQL).
Map query parameters to variables
This section describes how to use a parameterized SQL statement in the Execute SQL task and create mappings
between variables and the parameters in the SQL statement.
1. In SQL Server Data Tools (SSDT), open the Integration Services package you want to work with.
2. In Solution Explorer, double-click the package to open it.
3. Click the Control Flow tab.
4. If the package does not already include an Execute SQL task, add one to the control flow of the package.
For more information, see Add or Delete a Task or a Container in a Control Flow.
5. Double-click the Execute SQL task.
6. Provide a parameterized SQL command in one of the following ways:
Use direct input and type the SQL command in the SQLStatement property.
Use direct input, click Build Quer y , and then create an SQL command using the graphical tools
that the Query Builder provides.
Use a file connection and then reference the file that contains the SQL command.
Use a variable and then reference the variable that contains the SQL command.
The parameter markers that you use in parameterized SQL statements depend on the connection type
that the Execute SQL task uses.
C O N N EC T IO N T Y P E PA RA M ET ER M A RK ER
ADO ?
ODBC ?
The following table lists examples of the SELECT command by connection manager type. Parameters
provide the filter values in the WHERE clauses. The examples use SELECT to return products from the
Product table in AdventureWorks2012 that have a ProductID greater than and less than the values
specified by two parameters.
C O N N EC T IO N T Y P E SEL EC T SY N TA X
C O N N EC T IO N T Y P E PA RA M ET ER N A M E
ODBC 1, 2, 3, ...
IMPORTANT
The data type of the parameter must be compatible with the data type of the variable.
13. Repeat steps 8 through 11 for each parameter in the SQL statement.
IMPORTANT
The order of parameter mappings must be the same as the order in which the parameters appear in the SQL
statement.
14. Click OK .
C O N N EC T IO N T Y P E EXEC SY N TA X
For more information about ODBC call syntax, see the topic,
Procedure Parameters, in the ODBC Programmer's Reference
in the MSDN Library.
myStoredProcedure
In the syntax shown in the previous table, the Execute SQL task uses the Direct Input source type to run the
stored procedure. The Execute SQL task can also use the File Connection source type to run a stored
procedure. Regardless of whether the Execute SQL task uses the Direct Input or File Connection source type,
use a parameter of the ReturnValue type to implement the return code.
For more information about using return codes with Transact-SQL stored procedures, see RETURN (Transact-
SQL).
Single row Any type that is compatible with the Not applicable
type column in the result set.
Dim dt As Data.DataTable
Dim ds As Data.DataSet =
CType(Dts.Variables("Recordset").Value,
DataSet) dt = ds.Tables(0)
The variable can be defined in the scope of the Execute SQL task or the package. If the variable has package
scope, the result set is available to other tasks and containers within the package, and is available to any
packages run by the Execute Package or Execute DTS 2000 Package tasks.
When you map a variable to a Single row result set, non-string values that the SQL statement returns are
converted to strings when the following conditions are met:
The TypeConversionMode property is set to true. You set the property value in the Properties window
or by using the Execute SQL Task Editor .
The conversion will not result in data truncation.
LO G EN T RY DESC RIP T IO N
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In the current release of SQL ServerIntegration Services, the SQL statement in an Execute SQL task can contain a
MERGE statement. This MERGE statement enables you to accomplish multiple INSERT, UPDATE, and DELETE
operations in a single statement.
To use the MERGE statement in a package, follow these steps:
Create a Data Flow task that loads, transforms, and saves the source data to a temporary or staging table.
Create an Execute SQL task that contains the MERGE statement.
Connect the Data Flow task to the Execute SQL task, and use the data in the staging table as the input for the
MERGE statement.
NOTE
Although a MERGE statement typically requires a staging table in this scenario, the performance of the MERGE
statement usually exceeds that of the row-by-row lookup performed by the Lookup transformation. MERGE is also
useful when the large size of a lookup table would test the memory that is available to the Lookup transformation for
caching its reference table.
For a sample destination component that supports the use of the MERGE statement, see the CodePlex community
sample, MERGE Destination.
Using MERGE
Typically, you use the MERGE statement when you want to apply changes that include inserts, updates, and
deletions from one table to another table. Prior to SQL Server 2008, this process required both a Lookup
transformation and multiple OLE DB Command transformations. The Lookup transformation performed a row-by-
row lookup to determine whether each row was new or changed. The OLE DB Command transformations then
performed the necessary INSERT, UPDATE, and DELETE operations. Beginning in SQL Server 2008, a single MERGE
statement can replace both the Lookup transformation and the corresponding OLE DB Command transformations.
MERGE with Incremental Loads
The change data capture functionality that is new in SQL Server 2008 makes it easier to perform incremental loads
reliably to a data warehouse. As an alternative to using parameterized OLE DB Command transformations to
perform the inserts and the updates, you can use the MERGE statement to combine both operations.
For more information, see Apply the Changes to the Destination.
MERGE in Other Scenarios
In the following scenarios, you can use the MERGE statement either outside or inside an Integration Services
package. However, an Integration Services package is often required to load this data from multiple heterogeneous
sources, and then to combine and cleanse the data. Therefore, you might consider using the MERGE statement in a
package for convenience and ease of maintenance.
T r ac k Bu yi n g Habi t s
The FactBuyingHabits table in the data warehouse tracks the last date on which a customer bought a given product.
The table consists of ProductID, CustomerID and PurchaseDate columns. Every week, the transactional database
generates a PurchaseRecords table that includes the purchases made during that week. The objective is to use a
single MERGE statement to merge the information in the PurchaseRecords table into the FactBuyingHabits table.
For product-customer pairs that do not exist, the MERGE statement inserts new rows. For product-customer pairs
that exist, the MERGE statement updates the most recent date-of-purchase.
Tra c k P ri c e Hi s t o ry
The DimBook table represents the list of books in the inventory of a book seller and identifies the price history of
each book. This table has these columns: ISBN, ProductID, Price, Shelf, and IsCurrent. This table also has one row for
each price the book has had. One of these rows contains the current price. To indicate which row contains the
current price, the value of the IsCurrent column for that row is set to 1.
Every week, the database generates a WeeklyChanges table that contains price changes for the week and new
books that were added during the week. By using a single MERGE statement, you can apply the changes in the
WeeklyChanges table to the DimBook table. The MERGE statement inserts new rows for newly-added books, and
updates the IsCurrent column to 0 for rows of existing books whose prices have changed. The MERGE statement
also inserts new rows for books whose prices have changed, and for these new rows, sets the value of the IsCurrent
column to 1.
Merge a Table with New Data Against the Old Table
The database models the properties of an object by using an "open schema," that is, a table contains name-value
pairs for each property. The Properties table has three columns: EntityID, PropertyID, and Value. A NewProperties
table that is a newer version of the table has to be synchronized with the Properties table. To synchronize these two
tables, you can use a single MERGE statement to perform the following operations:
Delete properties from the Properties table if they are absent from the NewProperties table.
Update values for properties that are in the Properties table with new values found in the NewProperties
table.
Insert new properties for properties that are in the NewProperties table but are not found in the Properties
table.
This approach is useful in scenarios that resemble replication scenarios, where the objective is to keep data in two
tables on two servers synchronized.
Track Inventory
The Inventory database has a ProductsInventory table that has ProductID and StockOnHand columns. A Shipments
table with ProductID, CustomerID, and Quantity columns tracks shipments of products to customers. The
ProductInventory table has to be updated daily based on information in the Shipments table. A single MERGE
statement can reduce the inventory in the ProductInventory table based on the shipments made. If the inventory
for a product has been reduced to 0, that MERGE statement can also delete that product row from the
ProductInventory table.
Execute T-SQL Statement Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Execute T-SQL Statement task runs Transact-SQL statements. For more information, see Transact-SQL Reference
(Database Engine) and Integration Services (SSIS) Queries.
This task is similar to the Execute SQL task. However, the Execute T-SQL Statement task supports only the Transact-
SQL version of the SQL language and you cannot use this task to run statements on servers that use other dialects
of the SQL language. If you need to run parameterized queries, save the query results to variables, or use property
expressions, you should use the Execute SQL task instead of the Execute T-SQL Statement task. For more
information, see Execute SQL Task.
See Also
Integration Services Tasks
Control Flow
MERGE in Integration Services Packages
Expression Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Expression Task creates and evaluates expressions that set variable values at runtime, using the Expression
Builder. When you edit the task, the Expression Builder is launched.
Expression Examples
The expression language includes functions and operators. For examples that demonstrate how to use the functions
and operators, see the Expression Examples sections in the functions and operators topics. Links to the topics are
in Functions (SSIS Expression)and Operators (SSIS Expression).
For examples of more complex expressions, see Examples of Advanced Integration Services Expressions.
For examples of using expressions to set properties, see the Sample Proper ty Expressions section in Use
Property Expressions in Packages.
Related Tasks
Use an Expression in a Data Flow Component
Related Content
Technical article, SSIS Expression Cheat Sheet, on pragmaticworks.com
File System Task
11/2/2020 • 8 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The File System task performs operations on files and directories in the file system. For example, by using the File
System task, a package can create, move, or delete directories and files. You can also use the File System task to set
attributes on files and directories. For example, the File System task can make files hidden or read-only.
All File System task operations use a source, which can be a file or a directory. For example, the file that the task
copies or the directory it deletes is a source. The source can be specified by using a File connection manager that
points to the directory or file or by providing the name of a variable that contains the source path. For more
information, see File Connection Manager and Integration Services (SSIS) Variables.
The operations that copy and move file and directories and rename files use a destination and a source. The
destination is specified by using a File connection manager or a variable. File system task operations can be
configured to permit overwriting of destination files and directories. The operation that creates a new directory can
be configured to use an existing directory that has the specified name instead of failing when the directory already
exists.
Set attributes Sets attributes on files and folders. Attributes include Archive,
Hidden, Normal, ReadOnly, and System. Normal is the lack of
attributes, and it cannot be combined with other attributes. All
other attributes can be used in combination.
The File System task operates on a single file or directory. Therefore, this task does not support the use of wildcard
characters to perform the same operation on multiple files. To have the File System task repeat an operation on
multiple files or directories, put the File System task in a Foreach Loop container, as described in the following
steps:
Configure the Foreach Loop container On the Collection page of the Foreach Loop Editor, set the
enumerator to Foreach File Enumerator and enter the wildcard expression as the enumerator
configuration for Files . On the Variable Mappings page of the Foreach Loop Editor, map a variable that
you want to use to pass the file names one at a time to the File System task.
Add and configure a File System task Add a File System task to the Foreach Loop container. On the
General page of the File System Task Editor, set the SourceVariable or DestinationVariable property to
the variable that you defined in the Foreach Loop container.
LO G EN T RY DESC RIP T IO N
FileSystemOperation Reports the operation that the task performs. The log entry is
written when the file system operation starts and includes
information about the source and destination.
Expressions Page
For more information about how to set these properties in SSIS Designer, see the following topic:
Set the Properties of a Task or Container
For more information about how to set these properties programmatically, see the following topic:
FileSystemTask
Related Tasks
Integration Services includes a task that downloads and uploads data files and manages directories on servers. For
more information, see FTP Task.
NOTE
To override the variables you selected for the SourceConnection and DestinationConnection properties, enter an
expression for the Source and Destination properties. You enter expressions on the Expressions page of the File System
Task Editor . For example, to set the path of the files that the task uses as a destination, you may want to use variable A
under certain conditions and use variable B under other conditions.
NOTE
The File System task operates on a single file or directory. Therefore, this task does not support the use of wildcard characters
to perform the same operation on multiple files or directories. To have the File System task repeat an operation on multiple
files or directories, put the File System task in a Foreach Loop container. For more information, see File System Task.
VA L UE DESC RIP T IO N
Over writeDestination
Specify whether the operation can overwrite files in the destination directory.
Name
Provide a unique name for the File System task. This name is used as the label in the task icon.
NOTE
Task names must be unique within a package.
Description
Type a description of the File System task.
Operation
Select the file-system operation to perform. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Copy director y Copy a directory. Selecting this value displays the dynamic
options for a source and destination.
VA L UE DESC RIP T IO N
Copy file Copy a file. Selecting this value displays the dynamic options
for a source and destination.
Create director y Create a directory. Selecting this value displays the dynamic
options for a source and a destination directory.
Delete director y Delete a directory. Selecting this value displays the dynamic
options for a source.
Delete director y content Delete the content of a directory. Selecting this value displays
the dynamic options for a source.
Delete file Delete a file. Selecting this value displays the dynamic options
for a source.
Move director y Move a directory. Selecting this value displays the dynamic
options for a source and destination.
Move file Move a file. Selecting this value displays the dynamic options
for a source and destination. When moving a file, do not
include a file name in the directory path that you provide as
the destination.
Rename file Rename a file. Selecting this value displays the dynamic
options for a source and destination. When renaming a file,
include the new file name in the directory path that you
provide for the destination.
Set attributes Set the attributes of a file or directory. Selecting this value
displays the dynamic options for a source and operation.
IsSourcePathVariable
Indicate whether the destination path is stored in a variable. This property has the options listed in the following
table.
VA L UE
See Also
Integration Services Tasks
Control Flow
FTP Task
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The FTP task downloads and uploads data files and manages directories on servers. For example, a package can
download data files from a remote server or an Internet location as part of an Integration Services package
workflow. You can use the FTP task for the following purposes:
Copying directories and data files from one directory to another, before or after moving data, and applying
transformations to the data.
Logging in to a source FTP location and copying files or packages to a destination directory.
Downloading files from an FTP location and applying transformations to column data before loading the
data into a database.
At run time, the FTP task connects to a server by using an FTP connection manager. The FTP connection manager is
configured separately from the FTP task, and then is referenced in the FTP task. The FTP connection manager
includes the server settings, the credentials for accessing the FTP server, and options such as the time-out and the
number of retries for connecting to the server. For more information, see FTP Connection Manager.
IMPORTANT
The FTP connection manager supports only anonymous authentication and basic authentication. It does not support
Windows Authentication.
When accessing a local file or a local directory, the FTP task uses a File connection manager or path information
stored in a variable. In contrast, when accessing a remote file or a remote directory, the FTP task uses a directly
specified path on the remote server, as specified in the FTP connection manager, or path information stored in a
variable. For more information, see File Connection Manager and Integration Services (SSIS) Variables.
This means that the FTP task can receive multiple files and delete multiple remote files; but the task can send only
one file and delete only one local file if it uses a connection manager, because a File connection manager can
access only one file. To access multiple local files, the FTP task must use a variable to provide the path information.
For example, a variable that contains "C:\Test*.txt" provides a path that supports deleting or sending all the
files that have a .txt extension in the Test directory.
To send multiple files and access multiple local files and directories, you can also execute the FTP task multiple
times by including the task in a Foreach Loop. The Foreach Loop can enumerate across files in a directory using the
For Each File enumerator. For more information, see Foreach Loop Container.
The FTP task supports the ? and * wildcard characters in paths. This lets the task access multiple files. However, you
can use wildcard characters only in the part of the path that specifies the file name. For example,
C:\MyDirectory\*.txt is a valid path, but C:\*\MyText.txt is not.
The FTP operations can be configured to stop the File System task when the operation fails, or to transfer files in
ASCII mode. The operations that send and receive files copy can be configured to overwrite destination files and
directories.
Send files Sends a file from the local computer to the FTP server.
Receive files Saves a file from the FTP server to the local computer.
LO G EN T RY DESC RIP T IO N
FTPConnectingToSer ver Indicates that the task initiated a connection to the FTP server.
FTPOperation Reports the beginning of and the type of FTP operation that
the task performs.
Related Tasks
You can set properties through SSIS Designer or programmatically.
For information about how to set these properties in SSIS Designer, see Set the Properties of a Task or Container.
For more information about programmatically setting these properties, see FtpTask.
IMPORTANT
The FTP connection manager supports only anonymous authentication and basic authentication. It does not support
Windows Authentication.
Related Topics : FTP Connection Manager, FTP Connection Manager Editor
StopOnFailure
Indicate whether the FTP task terminates if an FTP operation fails.
Name
Provide a unique name for the FTP task. This name is used as the label in the task icon.
NOTE
Task names must be unique within a package.
Description
Type a description of the FTP task.
VA L UE DESC RIP T IO N
Over writeFileAtDestination
Specify whether a file at the destination can be overwritten.
IsLocalPathVariable
Indicate whether the local path is stored in a variable. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Operation
Select the FTP operation to perform. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Send files Send files. Selecting this value displays the dynamic options,
LocalVariable , LocalPathRemoteVariable and
RemotePath .
VA L UE DESC RIP T IO N
Receive files Receive files. Selecting this value displays the dynamic options,
LocalVariable , LocalPathRemoteVariable and
RemotePath .
Create local director y Create a local directory. Selecting this value displays the
dynamic options, LocalVariable and LocalPath .
Create remote director y Create a remote directory. Selecting this value displays the
dynamic options, RemoteVariable and RemotelPath .
Remove local director y Removes a local directory. Selecting this value displays the
dynamic options, LocalVariable and LocalPath .
Remove remote director y Remove a remote directory. Selecting this value displays the
dynamic options, RemoteVariable and RemotePath .
Delete local files Delete local files. Selecting this value displays the dynamic
options, LocalVariable and LocalPath .
Delete remote files Delete remote files. Selecting this value displays the dynamic
options, RemoteVariable and RemotePath .
IsTransferASCII
Indicate whether files transferred to and from the remote FTP server should be transferred in ASCII mode.
IsRemotePathVariable Dynamic Options
IsRemotePathVariable = True
RemoteVariable
Select an existing user-defined variable, or click <New variable...> to create a user-defined variable.
Related Topics: Integration Services (SSIS) Variables, Add Variable
IsRemotePathVariable = False
RemotePath
Select an existing FTP connection manager, or click <New connection...> to create a connection manager.
Related Topics: FTP Connection Manager, FTP Connection Manager Editor
IsLocalPathVariable Dynamic Options
IsLocalPathVariable = True
LocalVariable
Select an existing user-defined variable, or click <New variable...> to create a variable.
Related Topics: Integration Services (SSIS) Variables, Add Variable
IsLocalPathVariable = False
LocalPath
Select an existing File connection manager, or click <New connection...> to create a connection manager.
Related Topics : Flat File Connection Manager
See Also
Integration Services Tasks
Control Flow
Hadoop File System Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Hadoop File System Task enables an SSIS package to copy files from, to, or within a Hadoop cluster.
To add a Hadoop File System Task, drag and drop it to the designer. Then double-click on the task, or right-click and
click Edit , to open the Hadoop File System Task Editor dialog box.
Options
Configure the following options in the Hadoop File System Task Editor dialog box.
Hadoop File Type Specify whether the HDFS file system object is a file or
directory.
Over write Destination Specify whether to overwrite the target file if it already exists.
F IEL D DESC RIP T IO N
Local File Connection Specify an existing File Connection Manager or create a new
one. This connection manager indicates where the source files
are hosted.
See Also
Hadoop Connection Manager
File Connection Manager
Hadoop Hive Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Hadoop Hive Task to run Hive script on a Hadoop cluster.
To add a Hadoop Hive Task, drag and drop it to the designer. Then double-click on the task, or right-click and click
Edit , to open the Hadoop Hive Task Editor dialog box.
Options
Configure the following options in the Hadoop Hive Task Editor dialog box.
SourceType Specify the source type of the query. Available values are
ScriptFile and DirectInput .
See Also
Hadoop Connection Manager
Hadoop Pig Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Hadoop Pig Task to run Pig script on a Hadoop cluster.
To add a Hadoop Pig Task, drag and drop it to the designer. Then double-click on the task, or right-click and click
Edit , to see the Hadoop Pig Task Editor dialog box.
Options
Configure the following options in the Hadoop Pig Task Editor dialog box.
SourceType Specify the source type of the query. Available values are
ScriptFile and DirectInput .
See Also
Hadoop Connection Manager
History Cleanup Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The History Cleanup task deletes entries in the following history tables in the SQL Server msdb database.
backupfile
backupfilegroup
backupmediafamily
backupmediaset
backupset
restorefile
restorefilegroup
restorehistory
By using the History Cleanup task, a package can delete historical data related to backup and restore activities, SQL
Server Agent jobs, and database maintenance plans.
This task encapsulates the sp_delete_backuphistory system stored procedure and passes the specified date to the
procedure as an argument. For more information, see sp_delete_backuphistory (Transact-SQL).
See Also
Integration Services Tasks
Control Flow
Maintenance Cleanup Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Maintenance Cleanup task removes files related to maintenance plans, including database backup files and
reports created by maintenance plans. For more information, see Maintenance Plans and Back Up and Restore of
SQL Server Databases.
By using the Maintenance Cleanup task, a package can remove the backup files or maintenance plan reports on the
specified server. The Maintenance Cleanup task includes an option to remove a specific file or remove a group of
files in a folder. Optionally you can specify the extension of the files to delete.
When you configure the Maintenance Cleanup task to remove backup files, the default file name extension is BAK.
For report files, the default file name extension is TXT. You can update the extensions to suit your needs; the only
limitation is that extensions must be less than 256 characters long.
Typically, you want to remove old files that are no longer needed, and the Maintenance Cleanup task can be
configured to delete files that have reached a specified age. For example, the task can be configured to delete files
that are older than four weeks. You can specify the age of files to delete by using days, weeks, months, or years. If
you do not specify the minimum age of files to delete, all files of the specified type are deleted.
In contrast to earlier versions of the Maintenance Cleanup task, the SQL Server version of the task does not
automatically delete files in the subdirectories of the specified directory. This constraint reduces the surface area of
any attack that could exploit the functionality of the Maintenance Cleanup task to delete files maliciously. To delete
the first-level subfolders, you must explicitly elect to do this by checking the Include first-level subfolders
option in the Maintenance Cleanup Task dialog box.
Related Tasks
For details about how to set these properties in SSIS Designer, see Set the Properties of a Task or Container.
See Also
Integration Services Tasks
Control Flow
Message Queue Task
11/2/2020 • 11 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Message Queue task allows you to use Message Queuing (also known as MSMQ) to send and receive
messages between SQL Server Integration Services packages, or to send messages to an application queue that is
processed by a custom application. These messages can take the form of simple text, files, or variables and their
values.
By using the Message Queue task, you can coordinate operations throughout your enterprise. Messages can be
queued and delivered later if the destination is unavailable or busy; for example, the task can queue messages for
the offline laptop computer of sales representatives, who receive their messages when they connect to the network.
You can use the Message Queue task for the following purposes:
Delaying task execution until other packages check in. For example, after nightly maintenance at each of your
retail sites, a Message Queue task sends a message to your corporate computer. A package running on the
corporate computer contains Message Queue tasks, each waiting for a message from a particular retail site.
When a message from a site arrives, a task uploads data from that site. After all the sites have checked in, the
package computes summary totals.
Sending data files to the computer that processes them. For example, the output from a restaurant cash
register can be sent in a data file message to the corporate payroll system, where data about each waiter's
tips is extracted.
Distributing files throughout your enterprise. For example, a package can use a Message Queue task to send
a package file to another computer. A package running on the destination computer then uses a Message
Queue task to retrieve and save the package locally.
When sending or receiving messages, the Message Queue task uses one of four message types: data file, string,
string message to variable, or variable. The string message to variable message type can be used only when
receiving messages.
The task uses an MSMQ connection manager to connect to a message queue. For more information, see MSMQ
Connection Manager. For more information about Message Queuing, see the MSDN Library.
The Message Queue task requires that the Integration Services service be installed. Some SQL Server components
that you may select for installation on the Components to Install page or the Feature Selection page of the
SQL Server Installation Wizard install a partial subset of Integration Services components. These components are
useful for specific tasks, but the functionality of Integration Services will be limited. For example, the SQL Server
Data Tools (SSDT) option installs the Integration Services components required to design a package, but the
Integration Services service is not installed, and therefore the Message Queue task is not functional. To ensure a
complete installation of Integration Services, you must select Integration Services on the Components to Install
page. For more information about installing and running the Message Queue task, see Install Integration Services.
NOTE
The Message Queue task fails to comply with Federal Information Processing Standard (FIPS) 140-2 when the computer's
operating system is configured in FIPS mode and the task uses encryption. If the Message Queue task does not use
encryption, the task can run successfully.
Message Types
You can configure the message types that the Message Queue task provides in the following ways:
Data file message specifies that a file contains the message. When receiving messages, you can configure
the task to save the file, overwrite an existing file, and specify the package from which the task can receive
messages.
String message specifies the message as a string. When receiving messages, you can configure the task to
compare the received string with a user-defined string and take action depending on the comparison. String
comparison can be exact, case-sensitive or case-insensitive, or use a substring.
String message to variable specifies the source message as a string that is sent to a destination variable.
You can configure the task to compare the received string with a user-defined string using an exact, case-
insensitive, or substring comparison. This message type is available only when the task is receiving
messages.
Variable specifies that the message contains one or more variables. You can configure the task to specify the
names of the variables included in the message. When receiving messages, you can configure the task to
specify both the package from which it can receive messages and the variable that is the destination of the
message.
Sending Messages
When configuring the Message Queue task to send messages, you can use one of the encryption algorithms that
are currently supported by the Message Queuing technology, RC2 and RC4, to encrypt the message. Both of these
encryption algorithms are now considered cryptographically weak compared to newer algorithms, which Message
Queuing technology do not yet support. Therefore, you should consider your cryptography needs carefully when
sending messages using the Message Queue task.
Receiving Messages
When receiving messages, the Message Queue task can be configured in the following ways:
Bypassing the message, or removing the message from the queue.
Specifying a time-out.
Failing if a time-out occurs.
Overwriting an existing file, if the message is stored in a Data file .
Saving the message file to a different file name, if the message uses the Data file message type.
LO G EN T RY DESC RIP T IO N
MSMQAfterOpen Indicates that the task finished opening the message queue.
MSMQBeforeOpen Indicates that the task began to open the message queue.
Related Tasks
For more information about how to set these properties in SSIS Designer, see Set the Properties of a Task or
Container.
NOTE
Task names must be unique within a package.
Description
Type a description of the Message Queue task.
Use2000Format
Indicate whether to use the 2000 format of Message Queuing (also known as MSMQ). The default is False .
MSMQConnection
Select an existing MSMQ connection manager or click <New connection...> to create a new connection manager.
Related Topics : MSMQ Connection Manager, MSMQ Connection Manager Editor
Message
Specify whether the Message Queue task sends or receive messages. If you select Send message , the Send page is
listed in the left pane of the dialog box; if you select Receive message , the Receive page is listed. By default, this
value is set to Send message .
Message Queue Task Editor (Send Page)
Use the Send page of the Message Queue Task Editor dialog box to configure a Message Queue task to send
messages from a Microsoft SQL Server Integration Services package.
Options
UseEncr yption
Indicate whether to encrypt the message. The default is False .
Encr yptionAlgorithm
If you choose to use encryption, specify the name of the encryption algorithm to use. The Message Queue task can
use the RC2 and RC4 algorithms. The default is RC2 .
NOTE
The RC4 algorithm is only supported for backward compatibility. New material can only be encrypted using RC4 or RC4_128
when the database is in compatibility level 90 or 100. (Not recommended.) Use a newer algorithm such as one of the AES
algorithms instead. In the current release of SQL Server, material encrypted using RC4 or RC4_128 can be decrypted in any
compatibility level.
IMPORTANT
These are the encryption algorithms that the Message Queuing (also known as MSMQ) technology supports. Both of these
encryption algorithms are now considered cryptographically weak compared to newer algorithms, which Message Queuing
does not yet support. Therefore, you should consider your cryptography needs carefully when sending messages using the
Message Queue task.
MessageType
Select the message type. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Data file message The message is stored in a file. Selecting the value displays the
dynamic option, DataFileMessage .
String message The message is stored in the Message Queue task. Selecting
the value displays the dynamic option, StringMessage .
VA L UE DESC RIP T IO N
Data file message The message is stored in a file. Selecting the value displays the
dynamic option, DataFileMessage .
String message The message is stored in the Message Queue task. Selecting
the value displays the dynamic option, StringMessage .
VA L UE DESC RIP T IO N
No filter The task does not filter messages. Selecting the value displays
the dynamic option, IdentifierReadOnly .
VA L UE DESC RIP T IO N
From package The message receives only messages from the specified
package. Selecting the value displays the dynamic option,
Identifier .
IdentifierReadOnly
This option is read-only. It may be blank or contain the GUID of a package when the Filter property was previously
set.
Fi l t er = Fr o m pac kage
Identifier
If you choose to apply a filter, type the unique identifier of the package from which messages can be received, or
click the ellipsis button (...) and then specify the package.
Related Topics: Select a Package
MessageType = Variable message
Filter
Specify whether to apply a filter to messages. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
No filter The task does not filter messages. Selecting the value displays
the dynamic option, IdentifierReadOnly .
From package The message receives only messages from the specified
package. Selecting the value displays the dynamic option,
Identifier .
Variable
Type the variable name, or click <New variable...> and then configure a new variable.
Related Topics: Add Variable
Filter Dynamic Options
F i l t e r = N o fi l t e r
IdentifierReadOnly
This option is blank.
Fi l t er = Fr o m pac kage
Identifier
If you choose to apply a filter, type the unique identifier of the package from which messages can be received, or
click the ellipsis button (...) and then specify the package.
Related Topics: Select a Package
MessageType = String message
Compare
Specify whether to apply a filter to messages. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
CompareString
Unless the Compare option is set to None , provide the string to which the message is compared.
MessageType = String message to variable
Compare
Specify whether to apply a filter to messages. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Exact match The message must match exactly the string in the
CompareString option.
Ignore case The message must match the string in the CompareString
option but the comparison is not case sensitive.
CompareString
Unless the Compare option is set to None , provide the string to which the message is compared.
Variable
Type the name of the variable to hold the received message, or click <New variable...> and then configure a new
variable.
Related Topics: Add Variable
Select Variables
Use the Select Variables dialog box to specify the variables to use in a send message operation in the Message
Queue task. The Available Variables list includes system and user-defined variables that are in the scope of the
Message Queue task or its parent container. The task uses the variables in the Selected Variables list.
Options
Available Variables
Select one or more variables.
Selected Variables
Select one or more variables.
Right Arrows
Move selected variables to the Selected Variables list.
Left Arrows
Move selected variables back to the Available Variables list.
New Variable
Create a new variable.
Related Topics: Add Variable
See Also
Integration Services Tasks
Control Flow
Message Queue Task
11/2/2020 • 11 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Message Queue task allows you to use Message Queuing (also known as MSMQ) to send and receive
messages between SQL Server Integration Services packages, or to send messages to an application queue that is
processed by a custom application. These messages can take the form of simple text, files, or variables and their
values.
By using the Message Queue task, you can coordinate operations throughout your enterprise. Messages can be
queued and delivered later if the destination is unavailable or busy; for example, the task can queue messages for
the offline laptop computer of sales representatives, who receive their messages when they connect to the
network. You can use the Message Queue task for the following purposes:
Delaying task execution until other packages check in. For example, after nightly maintenance at each of
your retail sites, a Message Queue task sends a message to your corporate computer. A package running on
the corporate computer contains Message Queue tasks, each waiting for a message from a particular retail
site. When a message from a site arrives, a task uploads data from that site. After all the sites have checked
in, the package computes summary totals.
Sending data files to the computer that processes them. For example, the output from a restaurant cash
register can be sent in a data file message to the corporate payroll system, where data about each waiter's
tips is extracted.
Distributing files throughout your enterprise. For example, a package can use a Message Queue task to
send a package file to another computer. A package running on the destination computer then uses a
Message Queue task to retrieve and save the package locally.
When sending or receiving messages, the Message Queue task uses one of four message types: data file, string,
string message to variable, or variable. The string message to variable message type can be used only when
receiving messages.
The task uses an MSMQ connection manager to connect to a message queue. For more information, see MSMQ
Connection Manager. For more information about Message Queuing, see the MSDN Library.
The Message Queue task requires that the Integration Services service be installed. Some SQL Server components
that you may select for installation on the Components to Install page or the Feature Selection page of the
SQL Server Installation Wizard install a partial subset of Integration Services components. These components are
useful for specific tasks, but the functionality of Integration Services will be limited. For example, the SQL Server
Data Tools (SSDT) option installs the Integration Services components required to design a package, but the
Integration Services service is not installed, and therefore the Message Queue task is not functional. To ensure a
complete installation of Integration Services, you must select Integration Services on the Components to Install
page. For more information about installing and running the Message Queue task, see Install Integration Services.
NOTE
The Message Queue task fails to comply with Federal Information Processing Standard (FIPS) 140-2 when the computer's
operating system is configured in FIPS mode and the task uses encryption. If the Message Queue task does not use
encryption, the task can run successfully.
Message Types
You can configure the message types that the Message Queue task provides in the following ways:
Data file message specifies that a file contains the message. When receiving messages, you can configure
the task to save the file, overwrite an existing file, and specify the package from which the task can receive
messages.
String message specifies the message as a string. When receiving messages, you can configure the task to
compare the received string with a user-defined string and take action depending on the comparison. String
comparison can be exact, case-sensitive or case-insensitive, or use a substring.
String message to variable specifies the source message as a string that is sent to a destination variable.
You can configure the task to compare the received string with a user-defined string using an exact, case-
insensitive, or substring comparison. This message type is available only when the task is receiving
messages.
Variable specifies that the message contains one or more variables. You can configure the task to specify
the names of the variables included in the message. When receiving messages, you can configure the task
to specify both the package from which it can receive messages and the variable that is the destination of
the message.
Sending Messages
When configuring the Message Queue task to send messages, you can use one of the encryption algorithms that
are currently supported by the Message Queuing technology, RC2 and RC4, to encrypt the message. Both of these
encryption algorithms are now considered cryptographically weak compared to newer algorithms, which Message
Queuing technology do not yet support. Therefore, you should consider your cryptography needs carefully when
sending messages using the Message Queue task.
Receiving Messages
When receiving messages, the Message Queue task can be configured in the following ways:
Bypassing the message, or removing the message from the queue.
Specifying a time-out.
Failing if a time-out occurs.
Overwriting an existing file, if the message is stored in a Data file .
Saving the message file to a different file name, if the message uses the Data file message type.
LO G EN T RY DESC RIP T IO N
MSMQAfterOpen Indicates that the task finished opening the message queue.
MSMQBeforeOpen Indicates that the task began to open the message queue.
Related Tasks
For more information about how to set these properties in SSIS Designer, see Set the Properties of a Task or
Container.
NOTE
Task names must be unique within a package.
Description
Type a description of the Message Queue task.
Use2000Format
Indicate whether to use the 2000 format of Message Queuing (also known as MSMQ). The default is False .
MSMQConnection
Select an existing MSMQ connection manager or click <New connection...> to create a new connection manager.
Related Topics : MSMQ Connection Manager, MSMQ Connection Manager Editor
Message
Specify whether the Message Queue task sends or receive messages. If you select Send message , the Send page
is listed in the left pane of the dialog box; if you select Receive message , the Receive page is listed. By default, this
value is set to Send message .
Message Queue Task Editor (Send Page)
Use the Send page of the Message Queue Task Editor dialog box to configure a Message Queue task to send
messages from a Microsoft SQL Server Integration Services package.
Options
UseEncr yption
Indicate whether to encrypt the message. The default is False .
Encr yptionAlgorithm
If you choose to use encryption, specify the name of the encryption algorithm to use. The Message Queue task can
use the RC2 and RC4 algorithms. The default is RC2 .
NOTE
The RC4 algorithm is only supported for backward compatibility. New material can only be encrypted using RC4 or RC4_128
when the database is in compatibility level 90 or 100. (Not recommended.) Use a newer algorithm such as one of the AES
algorithms instead. In the current release of SQL Server, material encrypted using RC4 or RC4_128 can be decrypted in any
compatibility level.
IMPORTANT
These are the encryption algorithms that the Message Queuing (also known as MSMQ) technology supports. Both of these
encryption algorithms are now considered cryptographically weak compared to newer algorithms, which Message Queuing
does not yet support. Therefore, you should consider your cryptography needs carefully when sending messages using the
Message Queue task.
MessageType
Select the message type. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Data file message The message is stored in a file. Selecting the value displays the
dynamic option, DataFileMessage .
String message The message is stored in the Message Queue task. Selecting
the value displays the dynamic option, StringMessage .
VA L UE DESC RIP T IO N
Data file message The message is stored in a file. Selecting the value displays the
dynamic option, DataFileMessage .
String message The message is stored in the Message Queue task. Selecting
the value displays the dynamic option, StringMessage .
VA L UE DESC RIP T IO N
No filter The task does not filter messages. Selecting the value displays
the dynamic option, IdentifierReadOnly .
VA L UE DESC RIP T IO N
From package The message receives only messages from the specified
package. Selecting the value displays the dynamic option,
Identifier .
IdentifierReadOnly
This option is read-only. It may be blank or contain the GUID of a package when the Filter property was previously
set.
Fi l t er = Fr o m pac kage
Identifier
If you choose to apply a filter, type the unique identifier of the package from which messages can be received, or
click the ellipsis button (...) and then specify the package.
Related Topics: Select a Package
MessageType = Variable message
Filter
Specify whether to apply a filter to messages. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
No filter The task does not filter messages. Selecting the value displays
the dynamic option, IdentifierReadOnly .
From package The message receives only messages from the specified
package. Selecting the value displays the dynamic option,
Identifier .
Variable
Type the variable name, or click <New variable...> and then configure a new variable.
Related Topics: Add Variable
Filter Dynamic Options
F i l t e r = N o fi l t e r
IdentifierReadOnly
This option is blank.
Fi l t er = Fr o m pac kage
Identifier
If you choose to apply a filter, type the unique identifier of the package from which messages can be received, or
click the ellipsis button (...) and then specify the package.
Related Topics: Select a Package
MessageType = String message
Compare
Specify whether to apply a filter to messages. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
CompareString
Unless the Compare option is set to None , provide the string to which the message is compared.
MessageType = String message to variable
Compare
Specify whether to apply a filter to messages. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Exact match The message must match exactly the string in the
CompareString option.
Ignore case The message must match the string in the CompareString
option but the comparison is not case sensitive.
CompareString
Unless the Compare option is set to None , provide the string to which the message is compared.
Variable
Type the name of the variable to hold the received message, or click <New variable...> and then configure a new
variable.
Related Topics: Add Variable
Select Variables
Use the Select Variables dialog box to specify the variables to use in a send message operation in the Message
Queue task. The Available Variables list includes system and user-defined variables that are in the scope of the
Message Queue task or its parent container. The task uses the variables in the Selected Variables list.
Options
Available Variables
Select one or more variables.
Selected Variables
Select one or more variables.
Right Arrows
Move selected variables to the Selected Variables list.
Left Arrows
Move selected variables back to the Available Variables list.
New Variable
Create a new variable.
Related Topics: Add Variable
See Also
Integration Services Tasks
Control Flow
Select a Package
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Select a Package dialog box to specify the package from which the Message Queue task can receive
messages.
Static Options
Location
Specify the location of the package. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
SQL Server Set the location to an instance of SQL Server. Selecting this
value displays the dynamic options, Ser ver , Use Windows
Authentication , Use SQL Ser ver Authentication , User
name , and Password .
DTSX file Set the location to a DTSX file. Selecting this value displays the
dynamic option, File name .
See Also
Message Queue Task
Notify Operator Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Notify Operator task sends notification messages to SQL Server Agent operators. A SQL Server Agent operator
is an alias for a person or group that can receive electronic notifications. For more information about SQL Server
operators, see Operators.
By using the Notify Operator task, a package can notify one or more operators via e-mail, pager, or net send . Each
operator can be notified by different methods. For example, OperatorA is notified by e-mail and pager, and
OperatorB is notified by pager and net send . The operators who receive notifications from the task must be
members of the OperatorNotify collection on the Notify Operator task.
The Notify Operator task is the only database maintenance task that does not encapsulate a Transact-SQL statement
or a DBCC command.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Rebuild Index task rebuilds indexes in SQL Server database tables and views. For more information about
managing indexes, see Reorganize and Rebuild Indexes.
By using the Rebuild Index task, a package can rebuild indexes in a single database or multiple databases. If the task
rebuilds only the indexes in a single database, you can choose the views and tables whose indexes the task rebuilds.
This task encapsulates an ALTER INDEX REBUILD statement with the following index rebuild options:
Specify a FILLFACTOR percentage or use the original FILLFACTOR amount.
Set SORT_IN_TEMPDB = ON to store the intermediate sort result used to rebuild the index in tempdb. When
the intermediate sort result is set to OFF, the result is stored in the same database as the index.
Set PAD_INDEX = ON to allocate the free space specified by FILLFACTOR to the intermediate-level pages of
the index.
Set IGNORE_DUP_KEY = ON to allow a multirow insert operation that includes records that violate unique
constraints to insert the records that do not violate the unique constraints.
Set ONLINE = ON to not hold table locks so that queries or updates to the underlying table can proceed
during re-indexing.
NOTE
Online index operations are not available in every edition of MicrosoftSQL Server. For a list of features that are
supported by the editions of SQL Server, see Features Supported by the Editions of SQL Server 2016.
Specify a value for MAXDOP to limit the number of processors used in a parallel plan execution.
Specify WAIT_AT_LOW_PRIORITY, MAX_DURATION, and ABORT_AFTER_WAIT to control how long the index
operation waits for low priority locks.
For more information about the ALTER INDEX statement and index rebuild options, see ALTER INDEX (Transact-
SQL).
IMPORTANT
The time the task takes to create the Transact-SQL statement that the task runs is proportionate to the number of indexes
the task rebuilds. If the task is configured to rebuild indexes in all the tables and views in a database with a large number of
indexes, or to rebuild indexes in multiple databases, the task can take a considerable amount of time to generate the
Transact-SQL statement.
Related Tasks
For more about how to set these properties in SSIS Designer, see Set the Properties of a Task or Container.
See Also
Integration Services Tasks
Control Flow
Reorganize Index Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Reorganize Index task reorganizes indexes in SQL Server database tables and views. For more information
about managing indexes, see Reorganize and Rebuild Indexes.
By using the Reorganize Index task, a package can reorganize indexes in a single database or multiple databases. If
the task reorganizes only the indexes in a single database, you can choose the views or the tables whose indexes
the task reorganizes. The Reorganize Index task also includes an option to compact large object data. Large object
data is data with the image , text , ntext , varchar(max) , nvarchar(max) , varbinar y(max) , or xml data type. For
more information, see Data Types (Transact-SQL).
The Reorganize Index task encapsulates the Transact-SQL ALTER INDEX statement. If you choose to compact large
object data, the statement uses the REORGANIZE WITH (LOB_COMPACTION = ON) clause, otherwise
LOB_COMPACTION is set to OFF. For more information, see ALTER INDEX (Transact-SQL).
IMPORTANT
The time the task takes to create the Transact-SQL statement that the task runs is proportionate to the number of indexes
the task reorganizes. If the task is configured to reorganize indexes in all the tables and views in a database that holds a large
number of indexes, or to reorganize indexes in multiple databases, the task can take a considerable amount of time to
generate the Transact-SQL statement.
Related Tasks
For more information about how to set these properties in SSIS Designer, see Set the Properties of a Task or
Container.
See Also
Integration Services Tasks
Control Flow
Script Task
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Script task provides code to perform functions that are not available in the built-in tasks and transformations
that SQL Server Integration Services provides. The Script task can also combine functions in one script instead of
using multiple tasks and transformations. You use the Script task for work that must be done once in a package (or
once per enumerated object), instead than once per data row.
You can use the Script task for the following purposes:
Access data by using other technologies that are not supported by built-in connection types. For example, a
script can use Active Directory Service Interfaces (ADSI) to access and extract user names from Active
Directory.
Create a package-specific performance counter. For example, a script can create a performance counter that
is updated while a complex or poorly performing task runs.
Identify whether specified files are empty or how many rows they contain, and then based on that
information affect the control flow in a package. For example, if a file contains zero rows, the value of a
variable set to 0, and a precedence constraint that evaluates the value prevents a File System task from
copying the file.
If you have to use the script to do the same work for each row of data in a set, you should use the Script
component instead of the Script task. For example, if you want to assess the reasonableness of a postage amount
and skip data rows that have very high or low amounts, you would use a Script component. For more information,
see Script Component.
If more than one package uses a script, consider writing a custom task instead of using the Script task. For more
information, see Developing a Custom Task.
After you decide that the Script task is the appropriate choice for your package, you have to both develop the script
that the task uses and configure the task itself.
LO G EN T RY DESC RIP T IO N
For more information about the properties that you can set in SSIS Designer, see the following topics:
Expressions Page
For more information about how to set these properties in SSIS Designer, see the following topic:
Set the Properties of a Task or Container
Configuring the Script Task Programmatically
For more information about programmatically setting these properties, see the following topic:
ScriptTask
NOTE
Task names must be unique within a package.
Description
Type a description of the Script task.
NOTE
In SQL Server 2008 Integration Services (SSIS) and later versions, all scripts are precompiled. In earlier versions, you set a
PrecompileScriptIntoBinar yCode property to specify that the script was precompiled.
To learn more about the Script task, see Script Task and Configuring the Script Task in the Script Task Editor. To
learn about programming the Script task, see Extending the Package with the Script Task.
Options
ScriptLanguage
Select the scripting language for the task, either Microsoft Visual Basic or Microsoft Visual C#.
After you have created a script for the task, you cannot change the value of the ScriptLanguage property.
To set the default scripting language for the Script task, use the Scripting language option on General page of
the Options dialog box. For more information, see .
General Page
Entr yPoint
Specify the method that the Integration Services runtime calls as the entry point into the code of the Script task.
The specified method must be in the ScriptMain class of the Microsoft Visual Studio Tools for Applications (VSTA)
project The ScriptMain class is the default class generated by the script templates.
If you change the name of the method in the VSTA project, you must change the value of the Entr yPoint property.
ReadOnlyVariables
Type a comma-separated list of read-only variables that are available to the script, or click the ellipsis (...) button
and select the variables in the Select variables dialog box.
NOTE
Variable names are case sensitive.
ReadWriteVariables
Type a comma-separated list of read/write variables that are available to the script, or click the ellipsis (...) button
and select the variables in the Select variables dialog box.
NOTE
Variable names are case sensitive.
Edit Script
Opens the VSTA IDE where you can create or modify the script.
Related Content
Technical article, How to send email with delivery notification in C#, on shareourideas.com
Select Variables Page
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Select variables dialog box to select one or more variables for the ReadOnlyVariables and
ReadWriteVariables properties when you configure a Script task or a Script component.
To open the Select Variables dialog box, on the Script page of the Script Transformation Editor dialog box,
under Custom Proper ties , locate either the ReadOnlyVariables or ReadWriteVariables property, and then
click the ellipsis (...) button associated with that property.
Options
Select box
Selects a specific variable, selects all the variables, or clears the selection of all variables.
Name
Specifies the name of a variable.
Type
Specifies the data type of a variable.
See Also
Script Task Editor (Script Page)
Send Mail Task
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Send Mail task sends an e-mail message. By using the Send Mail task, a package can send messages if tasks in
the package workflow succeed or fail, or send messages in response to an event that the package raises at run time.
For example, the task can notify a database administrator about the success or failure of the Backup Database task.
You can configure the Send Mail task in the following ways:
Provide the message text for the e-mail message.
Provide a subject line for the e-mail message.
Set the priority level of the message. The task supports three priority levels: normal, low, and high.
Specify the recipients on the To, Cc, and Bcc lines. If the task specifies multiple recipients, they are separated
by semicolons.
NOTE
The To, Cc, and Bcc lines are limited to 256 characters each in accordance with Internet standards.
Include attachments. If the task specifies multiple attachments, they are separated by the pipe (|) character.
NOTE
If an attachment file does not exist when the package runs, an error occurs.
IMPORTANT
The SMTP connection manager supports only anonymous authentication and Windows Authentication. It does not
support basic authentication.
The message text can be a string that you provide, a connection to a file that contains the text, or the name of a
variable that contains the text. The task uses a File connection manager to connect to a file. For more information,
see Flat File Connection Manager.
The task uses an SMTP connection manager to connect to a mail server. For more information, see SMTP
Connection Manager.
Related Tasks
For information about how to set these properties in SSIS Designer, click Set the Properties of a Task or Container.
Related Content
Technical article, How to send email with delivery notification in C#, on shareourideas.com
VA L UE DESC RIP T IO N
Direct input Set the source to the message text. Selecting this value
displays the dynamic option, MessageSource .
File connection Set the source to the file that contains the message text.
Selecting this value displays the dynamic option,
MessageSource .
Variable Set the source to a variable that contains the message text.
Selecting this value displays the dynamic option,
MessageSource .
Priority
Set the priority of the message.
Attachments
Provide the file names of attachments to the e-mail message, delimited by the pipe (|) character.
NOTE
The To, Cc, and Bcc lines are limited to 256 characters in accordance with Internet standards.
See Also
Integration Services Tasks
Control Flow
Shrink Database Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Shrink Database task reduces the size of SQL Server database data and log files.
By using the Shrink Database task, a package can shrink files for a single database or multiple databases.
Shrinking data files recovers space by moving pages of data from the end of the file to unoccupied space closer to
the front of the file. When enough free space is created at the end of the file, data pages at end of the file can
deallocated and returned to the file system.
WARNING
Data that is moved to shrink a file can be scattered to any available location in the file. This causes index fragmentation and
can slow the performance of queries that search a range of the index. To eliminate the fragmentation, consider rebuilding the
indexes on the file after shrinking.
Commands
The Shrink Database task encapsulates a DBCC SHRINKDATABASE command, including the following arguments
and options:
database_name
target_percent
NOTRUNCATE or TRUNCATEONLY.
If the Shrink Database task shrinks multiple databases, the task runs multiple SHRINKDATABASE commands, one
for each database. All instances of the SHRINKDATABASE command use the same argument values, except for the
database_name argument. For more information, see DBCC SHRINKDATABASE (Transact-SQL).
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Transfer Database task transfers a SQL Server database between two instances of SQL Server. In contrast to the
other tasks that only transfer SQL Server objects by copying them, the Transfer Database task can either copy or
move a database. This task can also be used to copy a database within the same server.
Events
The Transfer Database task does not report incremental progress of the error message transfer; it reports only 0%
and 100 % completion.
Execution Value
The execution value, defined in the ExecutionValue property of the task, returns the value 1, because in contrast to
other transfer tasks, the Transfer Database task can transfer only one database.
By assigning a user-defined variable to the ExecValueVariable property of the Transfer Database task, information
about the error message transfer can be made available to other objects in the package. For more information, see
Integration Services (SSIS) Variables and Use Variables in Packages.
Log Entries
The Transfer Database task includes the following custom log entries:
SourceSQLServer This log entry lists the name of the source server.
DestSQLServer This log entry lists the name of the destination server.
SourceDB This log entry lists the name of the database that is transferred.
In addition, a log entry for the OnInformation event is written when the destination database is overwritten.
Description
Type a description of the Transfer Database task.
NOTE
If you locate the database files by using the browse button, the file location is entered using the local drive notation: for
example, c:\. You must replace this with the network share notation, including the computer name and share name. If the
default administrative share is used, you must use the $ notation, and have administrative access to the share.
DestinationOver write
Specify whether the database on the destination server can be overwritten.
This property has the options listed in the following table:
VA L UE DESC RIP T IO N
Cau t i on
The data in the destination server database will be overwritten if you specify True for DestinationOver write ,
which may result in data loss. To avoid this, back up the destination server database to another location before
executing the Transfer Database task.
Action
Specify whether the task will Copy or Move the database to the destination server.
Method
Specify whether the task will be executed while the database on the source server is in online or offline mode.
To transfer a database using offline mode, the user that runs the package must be a member of the sysadmin fixed
server role.
To transfer a database using the online mode, the user that runs the package must be a member of the sysadmin
fixed server role, or the database owner (dbo ) of the selected database.
SourceDatabaseName
Select the name of the database to be copied or moved.
SourceDatabaseFiles
Click the browse button to select the database files.
ReattachSourceDatabase
Specify whether the task will attempt to reattach the source database if a failure occurs.
This property has the options listed in the following table:
VA L UE DESC RIP T IO N
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Transfer Error Messages task transfers one or more SQL Server user-defined error messages between
instances of SQL Server. User-defined messages are messages with an identifier that is equal to or greater than
50000. Messages with an identifier less than 50000 are system error messages, and cannot be transferred by using
the Transfer Error Messages task.
The Transfer Error Messages task can be configured to transfer all error messages, or only the specified error
messages. User-defined error messages may be available in a number of different languages and the task can be
configured to transfer only messages in selected languages. A us_english version of the message that uses code
page 1033 must exist on the destination server before you can transfer other language versions of the message to
that server.
The sysmessages table in the master database contains all the error messages-both system and user-defined-that
SQL Server uses.
The user-defined messages to be transferred may already exist on the destination. An error message is defined as a
duplicate error message if the identifier and the language are the same. The Transfer Error Messages task can be
configured to handle existing error messages in the following ways:
Overwrite existing error messages.
Fail the task when duplicate messages exist.
Skip duplicate error messages.
At run time, the Transfer Error Messages task connects to the source and destination servers by using one or two
SMO connection managers. The SMO connection manager is configured separately from the Transfer Error
Messages task, and then is referenced in the Transfer Error Messages task. The SMO connection manager specifies
the server and the authentication mode to use when accessing the server. For more information, see SMO
Connection Manager.
The Transfer Error Messages task supports a SQL Server source and destination. There are no restrictions on which
version to use as a source or destination.
Events
The task raises an information event that reports the number of error messages that have been transferred.
The Transfer Error Messages task does not report incremental progress of the error message transfer; it reports
only 0% and 100 % completion.
Execution Value
The execution value, defined in the ExecutionValue property of the task, returns the number of error messages
that have been transferred. By assigning a user-defined variable to the ExecValueVariable property of the Transfer
Error Message task, information about the error message transfer can be made available to other objects in the
package. For more information, see Integration Services (SSIS) Variables and Use Variables in Packages.
Log Entries
The Transfer Error Messages task includes the following custom log entries:
TransferErrorMessagesTaskStartTransferringObjects This log entry reports that the transfer has started. The
log entry includes the start time.
TransferErrorMessagesTaskFinishedTransferringObjects This log entry reports that the transfer has finished.
The log entry includes the end time.
In addition, a log entry for the OnInformation event reports the number of error messages that were transferred,
and a log entry for the OnWarning event is written for each error message on the destination that is overwritten.
Related Tasks
For more information about how to set these properties in SSIS Designer, click the following topic:
Set the Properties of a Task or Container
NOTE
Task names must be unique within a package.
Description
Type a description of the Transfer Error Messages task.
VA L UE DESC RIP T IO N
ErrorMessagesList
Click the browse button (...) to select the error messages to copy.
NOTE
You must specify the SourceConnection before you can select error messages to copy.
ErrorMessageLanguagesList
Click the browse button (...) to select the languages for which to copy user-defined error messages to the
destination server. A us_english (code page 1033) version of the message must exist on the destination server
before you can transfer other language versions of the message to that server.
NOTE
You must specify the SourceConnection before you can select error messages to copy.
See Also
Integration Services Tasks
Control Flow
Transfer Jobs Task
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Transfer Jobs task transfers one or more SQL Server Agent jobs between instances of SQL Server.
The Transfer Jobs task can be configured to transfer all jobs, or only specified jobs. You can also indicate whether
the transferred jobs are enabled at the destination.
The jobs to be transferred may already exist on the destination. The Transfer Jobs task can be configured to handle
existing jobs in the following ways:
Overwrite existing jobs.
Fail the task when duplicate jobs exist.
Skip duplicate jobs.
At run time, the Transfer Jobs task connects to the source and destination servers by using one or two SMO
connection managers. The SMO connection manager is configured separately from the Transfer Jobs task, and then
is referenced in the Transfer Jobs task. The SMO connection manager specifies the server and the authentication
mode to use when accessing the server. For more information, see SMO Connection Manager.
Events
The Transfer Jobs task raises an information event that reports the number of jobs transferred and a warning event
when a job is overwritten. The task does not report incremental progress of the job transfer; it reports only 0% and
100% completion.
Execution Value
The execution value, defined in the ExecutionValue property of the task, returns the number of jobs that are
transferred. By assigning a user-defined variable to the ExecValueVariable property of the Transfer Jobs task,
information about the job transfer can be made available to other objects in the package. For more information, see
Integration Services (SSIS) Variables and Use Variables in Packages.
Log Entries
The Transfer Jobs task includes the following custom log entries:
TransferJobsTaskStarTransferringObjects This log entry reports that the transfer has started. The log entry
includes the start time.
TransferJobsTaskFinishedTransferringObjects This log entry reports that the transfer has finished. The log
entry includes the end time.
In addition, a log entry for the OnInformation event reports the number of jobs that were transferred and a log
entry for the OnWarning event is written for each job on the destination that is overwritten.
Related Tasks
For more information about how to set these properties in SSIS Designer, click the following topic:
Set the Properties of a Task or Container
NOTE
Only members of the sysadmin fixed server role or one of the SQL Server Agent fixed database roles on the destination
server can successfully create jobs there. To access jobs on the source server, users must be a member of at least the
SQL AgentUserRole fixed database role there. For more information about SQL Server Agent fixed database roles and their
permissions, see SQL Server Agent Fixed Database Roles.
Options
Name
Type a unique name for the Transfer Jobs task. This name is used as the label in the task icon.
NOTE
Task names must be unique within a package.
Description
Type a description of the Transfer Jobs task.
Options
SourceConnection
Select a SMO connection manager in the list, or click <New connection...> to create a new connection to the
source server.
DestinationConnection
Select a SMO connection manager in the list, or click <New connection...> to create a new connection to the
destination server.
TransferAllJobs
Select whether the task should copy all or only the specified SQL Server Agent jobs from the source to the
destination server.
This property has the options listed in the following table:
VA L UE DESC RIP T IO N
JobsList
Click the browse button (...) to select the jobs to copy. At least one job must be selected.
NOTE
Specify the SourceConnection before selecting jobs to copy.
VA L UE DESC RIP T IO N
FailTask Task fails if jobs of the same name already exist on the
destination server.
Over write Task overwrites jobs of the same name on the destination
server.
Skip Task skips jobs of the same name that exist on the destination
server.
EnableJobsAtDestination
Select whether the jobs copied to the destination server should be enabled.
This property has the options listed in the following table:
VA L UE DESC RIP T IO N
See Also
Integration Services Tasks
Control Flow
Transfer Logins Task
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Transfer Logins task transfers one or more logins between instances of SQL Server.
Events
The task raises an information event that reports the number of logins transferred and a warning event when a
login is overwritten.
The Transfer Logins task does not report incremental progress of the login transfer; it reports only 0% and 100 %
completion.
Execution Value
The execution value, defined in the ExecutionValue property of the task, returns the number of logins transferred.
By assigning a user-defined variable to the ExecValueVariable property of the Transfer Logins task, information
about the login transfer can be made available to other objects in the package. For more information, see
Integration Services (SSIS) Variables and Use Variables in Packages.
Log Entries
The Transfer Logins task includes the following custom log entries:
TransferLoginsTaskStarTransferringObjects This log entry reports the transfer has started. The log entry
includes the start time.
TransferLoginsTaskFinishedTransferringObjects This log entry reports the transfer has completed. The log
entry includes the end time.
In addition, a log entry for the OnInformation event reports the number of logins that were transferred, and a log
entry for the OnWarning event is written for each login on the destination that is overwritten.
NOTE
Task names must be unique within a package.
Description
Type a description of the Transfer Logins task.
Options
SourceConnection
Select a SMO connection manager in the list, or click <New connection...> to create a new connection to the
source server.
DestinationConnection
Select a SMO connection manager in the list, or click <New connection...> to create a new connection to the
destination server.
LoginsToTransfer
Select the SQL Server logins to copy from the source to the destination server. This property has the options listed
in the following table:
VA L UE DESC RIP T IO N
AllLogins All SQL Server logins on the source server will be copied to
the destination server.
LoginsList
Select the logins on the source server to be copied to the destination server. This option is only available when
SelectedLogins is selected for LoginsToTransfer .
DatabasesList
Select the databases on the source server that contain logins to be copied to the destination server. This option is
only available when AllLoginsFromSelectedDatabases is selected for LoginsToTransfer .
IfObjectExists
Select how the task should handle logins of the same name that already exist on the destination server.
This property has the options listed in the following table:
VA L UE DESC RIP T IO N
FailTask Task fails if logins of the same name already exist on the
destination server.
Over write Task overwrites logins of the same name on the destination
server.
Skip Task skips logins of the same name that exist on the
destination server.
CopySids
Select whether the security identifiers associated with the logins should be copied to the destination server.
CopySids must be set to True if the Transfer Logins task is used along with the Transfer Database task. Otherwise,
the copied logins will not be recognized by the transferred database.
Transfer Master Stored Procedures Task
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Transfer Master Stored Procedures task transfers one or more user-defined stored procedures between master
databases on instances of SQL Server. To transfer a stored procedure from the master database, the owner of the
procedure must be dbo.
The Transfer Master Stored Procedures task can be configured to transfer all stored procedures or only specified
stored procedures. This task does not copy system stored procedures.
The master stored procedures to be transferred may already exist on the destination. The Transfer Master Stored
Procedures task can be configured to handle existing stored procedures in the following ways:
Overwrite existing stored procedures.
Fail the task when duplicate stored procedures exist.
Skip duplicate stored procedures.
At run time, the Transfer Master Stored Procedures task connects to the source and destination servers by using
two SMO connection managers. The SMO connection managers are configured separately from the Transfer
Master Stored Procedures task, and then referenced in the Transfer Master Stored Procedures task. The SMO
connection managers specify the server and the authentication mode to use when accessing the server. For more
information, see SMO Connection Manager.
Events
The task raises an information event that reports the number of stored procedures transferred and a warning event
when a stored procedure is overwritten.
The Transfer Master Stored Procedures task does not report incremental progress of the login transfer; it reports
only 0% and 100 % completion.
Execution Value
The execution value, defined in the ExecutionValue property of the task, returns the number of stored procedures
transferred. By assigning a user-defined variable to the ExecValueVariable property of the Transfer Master Stored
Procedures task, information about the stored procedure transfer can be made available to other objects in the
package. For more information, see Integration Services (SSIS) Variables and Use Variables in Packages.
Log Entries
The Transfer Master Stored Procedures task includes the following custom log entries:
TransferStoredProceduresTaskStartTransferringObjects This log entry reports that the transfer has started.
The log entry includes the start time.
TransferSStoredProceduresTaskFinishedTransferringObjects This log entry reports that the transfer has
finished. The log entry includes the end time.
In addition, a log entry for the OnInformation event reports the number of stored procedures that were
transferred, and a log entry for the OnWarning event is written for each stored procedure on the destination that
is overwritten.
Related Tasks
For more information about how to set these properties in SSIS Designer, click the following topic:
Set the Properties of a Task or Container
NOTE
This task transfers only user-defined stored procedures owned by dbo from a master database on the source server to a
master database on the destination server. Users must be granted the CREATE PROCEDURE permission in the master
database on the destination server or be members of the sysadmin fixed server role on the destination server to create
stored procedures there.
Options
Name
Type a unique name for the Transfer Master Stored Procedures task. This name is used as the label in the task icon.
NOTE
Task names must be unique within a package.
Description
Type a description of the Transfer Master Stored Procedures task.
Transfer Master Stored Procedures Task Editor (Stored Procedures Page)
Use the Stored Procedures page of the Transfer Master Stored Procedures Task Editor dialog box to specify
properties for copying one or more user-defined stored procedures from the master database in one instance of
SQL Server instance to a master database in another instance of SQL Server.
NOTE
This task transfers only user-defined stored procedures owned by dbo from a master database on the source server to a
master database on the destination server. Users must be granted the CREATE PROCEDURE permission in the master
database on the destination server or be members of the sysadmin fixed server role on the destination server to create
stored procedures there.
Options
SourceConnection
Select a SMO connection manager in the list, or click <New connection...> to create a new connection to the
source server.
DestinationConnection
Select a SMO connection manager in the list, or click <New connection...> to create a new connection to the
destination server.
IfObjectExists
Select how the task should handle user-defined stored procedures of the same name that already exist in the
master database on the destination server.
This property has the options listed in the following table:
VA L UE DESC RIP T IO N
FailTask Task fails if stored procedures of the same name already exist
in the master database on the destination server.
Over write Task overwrites stored procedures of the same name in the
master database on the destination server.
Skip Task skips stored procedures of the same name that exist in
the master database on the destination server.
TransferAllStoredProcedures
Select whether all user-defined stored procedures in the master database on the source server should be copied to
the destination server.
VA L UE DESC RIP T IO N
StoredProceduresList
Select which user-defined stored procedures in the master database on the source server should be copied to the
destination master database. This option is only available when TransferAllStoredProcedures is set to False .
See Also
Transfer SQL Server Objects Task
Integration Services Tasks
Control Flow
Transfer SQL Server Objects Task
11/2/2020 • 10 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Transfer SQL Server Objects task transfers one or more types of objects in a SQL Server database between
instances of SQL Server. For example, the task can copy tables and stored procedures. Depending on the version of
SQL Server that is used as a source, different types of objects are available to copy. For example, only a SQL Server
database includes schemas and user-defined aggregates.
Objects to Transfer
Server roles, roles, and users from the specified database can be copied, as well as the permissions for the
transferred objects. By copying the associated users, roles, and permissions together with the objects, you can
make the transferred objects immediately operable on the destination server.
The following table lists the type of objects that can be copied.
O B JEC T
Tables
Views
Stored Procedures
User-Defined Functions
Defaults
Partition Functions
Partition Schemes
Schemas
Assemblies
User-Defined Aggregates
User-Defined Types
User-defined types (UDTs) that were created in an instance of SQL Server have dependencies on common language
runtime (CLR) assemblies. If you use the Transfer SQL Server Objects task to transfer UDTs, you must also
configure the task to transfer dependent objects. To transfer dependent objects, set the
IncludeDependentObjects property to True .
Table Options
When copying tables, you can indicate the types of table-related items to include in the copy process. The following
types of items can be copied together with the related table:
Indexes
Triggers
Full-text indexes
Primary keys
Foreign keys
You can also indicate whether the script that the task generates is in Unicode format.
Destination Options
You can configure the Transfer SQL Server Objects task to include schema names, data, extended properties of
transferred objects, and dependent objects in the transfer. If data is copied, it can replace or append existing data.
Some options apply only to SQL Server. For example, only SQL Server supports schemas.
Security Options
The Transfer SQL Server Objects task can include SQL Server database-level users and roles from the source, SQL
Server logins, and the permissions for transferred objects. For example, the transfer can include the permissions on
the transferred tables.
Events
The task raises an information event that reports the object transferred and a warning event when an object is
overwritten. An information event is also raised for actions such as the truncation of database tables.
The Transfer SQL Server Objects task does not report incremental progress of the object transfer; it reports only
0% and 100 % completion.
Execution Value
The execution value, stored in the ExecutionValue property of the task, returns the number of objects transferred.
By assigning a user-defined variable to the ExecValueVariable property of the Transfer SQL Server Objects task,
information about the object transfer can be made available to other objects in the package. For more information,
see Integration Services (SSIS) Variables and Use Variables in Packages.
Log Entries
The Transfer SQL Server Objects task includes the following custom log entries:
TransferSqlServerObjectsTaskStartTransferringObjects This log entry reports that the transfer has started.
The log entry includes the start time.
TransferSqlServerObjectsTaskFinishedTransferringObjects This log entry reports that the transfer has
completed. The log entry includes the end time.
In addition, a log entry for an OnInformation event reports the number of objects of the object types that have
been selected for transfer, the number of objects that were transferred, and actions such as the truncation of tables
when data is transferred with tables. A log entry for the OnWarning event is written for each object on the
destination that is overwritten.
NOTE
The user who creates the Transfer SQL Server Objects task must have adequate permissions on the source server objects to
select them for copying, and permission to access the destination server database where the objects will be transferred.
Options
Name
Type a unique name for the Transfer SQL Server Objects task. This name is used as the label in the task icon.
NOTE
Task names must be unique within a package.
Description
Type a description of the Transfer SQL Server Objects task.
NOTE
The user who creates the Transfer SQL Server Objects task must have sufficient permissions on the source server objects to
select them for copying, and permission to access the destination server database where the objects will be transferred.
Static Options
SourceConnection
Select a SMO connection manager in the list, or click <New connection...> to create a new connection to the
source server.
SourceDatabase
Select a database on the source server from which objects will be copied.
DestinationConnection
Select a SMO connection manager in the list, or click <New connection...> to create a new connection to the
destination server.
DestinationDatabase
Select a database on the destination server to which objects will be copied.
DropObjectsFirst
Select whether the selected objects will be dropped first on the destination server before copying.
IncludeExtendedProper ties
Select whether extended properties will be included when objects are copied from the source to the destination
server.
CopyData
Select whether data will be included when objects are copied from the source to the destination server.
ExistingData
Specify how data will be copied to the destination server. This property has the options listed in the following table:
VA L UE DESC RIP T IO N
CopySchema
Select whether the schema is copied during the Transfer SQL Server Objects task.
NOTE
CopySchema is only available for SQL Server.
UseCollation
Select whether the transfer of objects should include the collation specified on the source server.
IncludeDependentObjects
Select whether copying the selected objects will cascade to include other objects that depend on the objects
selected for copying.
CopyAllObjects
Select whether the task will copy all objects in the specified source database or only selected objects. Setting this
option to False gives you the option to select the objects to transfer, and displays the dynamic options in the
section, CopyAllObjects .
ObjectsToCopy
Expand ObjectsToCopy to specify which objects should be copied from the source database to the destination
database.
NOTE
ObjectsToCopy is only available when CopyAllObjects is set to False .
The options to copy the following types of objects are supported only on SQL Server:
Assemblies
Partition functions
Partition schemes
Schemas
User-defined aggregates
User-defined types
XML schema collections
CopyDatabaseUsers
Specify whether database users should be included in the transfer.
CopyDatabaseRoles
Specify whether database roles should be included in the transfer.
CopySqlSer verLogins
Specify whether SQL Server logins should be included in the transfer.
CopyObjectLevelPermissions
Specify whether object-level permissions should be included in the transfer.
CopyIndexes
Specify whether indexes should be included in the transfer.
CopyTriggers
Specify whether triggers should be included in the transfer.
CopyFullTextIndexes
Specify whether full-text indexes should be included in the transfer.
CopyPrimar yKeys
Specify whether primary keys should be included in the transfer.
CopyForeignKeys
Specify whether foreign keys should be included in the transfer.
GenerateScriptsInUnicode
Specify whether the generated transfer scripts are in Unicode format.
Dynamic Options
CopyAllObjects = False
CopyAllTables
Select whether the task will copy all tables in the specified source database or only the selected tables.
TablesList
Click to open the Select Tables dialog box.
CopyAllViews
Select whether the task will copy all views in the specified source database or only the selected views.
ViewsList
Click to open the Select Views dialog box.
CopyAllStoredProcedures
Select whether the task will copy all user-defined stored procedures in the specified source database or only the
selected procedures.
StoredProceduresList
Click to open the Select Stored Procedures dialog box.
CopyAllUserDefinedFunctions
Select whether the task will copy all user-defined functions in the specified source database or only the selected
UDFs.
UserDefinedFunctionsList
Click to open the Select User Defined Functions dialog box.
CopyAllDefaults
Select whether the task will copy all defaults in the specified source database or only the selected defaults.
DefaultsList
Click to open the Select Defaults dialog box.
CopyAllUserDefinedDataTypes
Select whether the task will copy all user-defined data types in the specified source database or only the selected
user-defined data types.
UserDefinedDataTypesList
Click to open the Select User-Defined Data Types dialog box.
CopyAllPar titionFunctions
Select whether the task will copy all user-defined partition functions in the specified source database or only the
selected partition functions. Supported only on SQL Server.
Par titionFunctionsList
Click to open the Select Par tition Functions dialog box.
CopyAllPar titionSchemes
Select whether the task will copy all partition schemes in the specified source database or only the selected
partition schemes. Supported only on SQL Server.
Par titionSchemesList
Click to open the Select Par tition Schemes dialog box.
CopyAllSchemas
Select whether the task will copy all schemas in the specified source database or only the selected schemas.
Supported only on SQL Server.
SchemasList
Click to open the Select Schemas dialog box.
CopyAllSqlAssemblies
Select whether the task will copy all SQL assemblies in the specified source database or only the selected SQL
assemblies. Supported only on SQL Server.
SqlAssembliesList
Click to open the Select SQL Assemblies dialog box.
CopyAllUserDefinedAggregates
Select whether the task will copy all user-defined aggregates in the specified source database or only the selected
user-defined aggregates. Supported only on SQL Server.
UserDefinedAggregatesList
Click to open the Select User-Defined Aggregates dialog box.
CopyAllUserDefinedTypes
Select whether the task will copy all user-defined types in the specified source database or only the selected UDTs.
Supported only on SQL Server.
UserDefinedTypes
Click to open the Select User-Defined Types dialog box.
CopyAllXmlSchemaCollections
Select whether the task will copy all XML Schema collections in the specified source database or only the selected
XML schema collections. Supported only on SQL Server.
XmlSchemaCollectionsList
Click to open the Select XML Schema Collections dialog box.
See Also
Integration Services Error and Message Reference
Integration Services Tasks
Transf er SQ L Server O bjects Task Edit or ( General Page)
Expressions Page
Data Formats for Bulk Import or Bulk Export (SQL Server)
Security Considerations for a SQL Server Installation
Select Objects to Transfer
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use this dialog box to select objects to transfer from one instance of SQL Server to another by using an Integration
Services transfer task.
To specify that all objects should be transferred, select the check box in the title row of the objects grid.
To choose specific objects for transfer, select the check box in the first column for the row in the grid where the
object is listed.
See Also
Integration Services Error and Message Reference
Transfer Jobs Task Editor (General Page)
Transfer Logins Task Editor (Logins Page)
Transfer SQL Server Objects Task Editor (Objects Page)
Transfer Master Stored Procedures Task Editor (Stored Procedures Page)
Transfer Error Messages Task Editor (Messages Page)
Update Statistics Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Update Statistics task updates information about the distribution of key values for one or more statistics
groups (collections) in the specified table or indexed view. For more information, see Statistics.
By using the Update Statistics task, a package can update statistics for a single database or multiple databases. If the
task updates only the statistics in a single database, you can choose the views or the tables whose statistics the task
updates. You can configure the update to update all statistics, column statistics only, or index statistics only.
This task encapsulates an UPDATE STATISTICS statement, including the following arguments and clauses:
The table_name or view_name argument.
If the update applies to all statistics, the WITH ALL clause is implied.
If the update applies only to columns, the WITH COLUMN clause is included.
If the update applies only to indexes, the WITH INDEX clause is included.
If the Update Statistics task updates statistics in multiple databases, the task runs multiple UPDATE STATISTICS
statements, one for each table or view. All instances of UPDATE STATISTICS use the same clause, but different
table_name or view_name values. For more information, see CREATE STATISTICS (Transact-SQL) and UPDATE
STATISTICS (Transact-SQL).
IMPORTANT
The time the task takes to create the Transact-SQL statement that the task runs is proportionate to the number of statistics
the task updates. If the task is configured to update statistics in all the tables and views in a database with a large number of
indexes, or to update statistics in multiple databases, the task can take a considerable amount of time to generate the
Transact-SQL statement.
Related Tasks
For more information about how to set these properties in SSIS Designer, click the following topic:
Set the Properties of a Task or Container
See Also
Integration Services Tasks
Control Flow
Web Service Task
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Web Service task executes a Web service method. You can use the Web Service task for the following
purposes:
Writing to a variable the values that a Web service method returns. For example, you could obtain the
highest temperature of the day from a Web service method, and then use that value to update a variable
that is used in an expression that sets a column value.
Writing to a file the values that a Web service method returns. For example, a list of potential customers can
be written to a file and the file then used as a data source in a package that cleans the data before it is
written to a database.
WSDL File
The Web Service task uses an HTTP connection manager to connect to the Web service. The HTTP connection
manager is configured separately from the Web Service task, and is referenced in the task. The HTTP connection
manager specifies the server proxy settings such as the server URL, credentials for accessing the Web services
server, and time-out length. For more information, see HTTP Connection Manager.
IMPORTANT
The HTTP connection manager supports only anonymous authentication and basic authentication. It does not support
Windows Authentication.
The HTTP connection manager can point to a Web site or to a Web Service Description Language (WSDL) file. The
URL of the HTTP connection manager that points to a WSDL file includes the ?WSDL parameter: for example,
https://MyServer/MyWebService/MyPage.asmx?WSDL .
The WSDL file must be available locally to configure the Web Service task using the Web Ser vice Task Editor
dialog box that SSIS Designer provides.
If the HTTP connection manager points to a Web site, the WSDL file must be copied manually to a local
computer.
If the HTTP connection manager points to a WSDL file, the file can be downloaded from the Web site to a
local file by the Web Service task.
The WSDL file lists the methods that the Web service offers, the input parameters that the methods require, the
responses that the methods return, and how to communicate with the Web service.
If the method uses input parameters, the Web Service task requires parameter values. For example, a Web service
method that recommends the length of skis you should purchase based on your height requires that your height
be submitted in an input parameter. The parameter values can be provided either by strings that are defined in the
task, or by variables defined in the scope of the task or a parent container. The advantage of using variables is that
they let you dynamically update the parameter values by using package configurations or scripts. For more
information, see Integration Services (SSIS) Variables and Package Configurations.
Many Web service methods do not use input parameters. For example, a Web service method that gets the names
of presidents who were born in the current month would not require an input parameter because the Web service
can determine the current month locally.
The results of the Web service method can be written to a variable or to a file. You use the File connection
manager either to specify the file or to provide the name of the variable to write the results to. For more
information, see File Connection Manager and Integration Services (SSIS) Variables.
LO G EN T RY DESC RIP T IO N
IMPORTANT
The HTTP connection manager supports only anonymous authentication and basic authentication. It does not support
Windows Authentication.
Related Topics: HTTP Connection Manager, HTTP Connection Manager Editor (Server Page)
WSDLFile
Type the fully qualified path of a WSDL file that is local to the computer, or click the browse button (...) and locate
this file.
If you have already manually downloaded the WSDL file to the computer, select this file. However, if the WSDL file
has not yet been downloaded, follow these steps:
Create an empty file that has the ".wsdl" file name extension.
Select this empty file for the WSDLFile option.
Set the value of Over writeWSDLFile to True to enable the empty file to be overwritten with the actual
WSDL file.
Click Download WSDL to download the actual WSDL file and overwrite the empty file.
NOTE
The Download WSDL option is not enabled until you provide the name of an existing local file in the WSDLFile
box.
Over writeWSDLFile
Indicate whether the WSDL file for the Web Service task can be overwritten.
If you intend to download the WSDL file by using the Download WSDL button, set this value to True .
Name
Provide a unique name for the Web Service task. This name is used as the label in the task icon.
NOTE
Task names must be unique within a package.
Description
Type a description of the Web Service task.
Download WSDL
Download the WSDL file.
This button is not enabled until you provide the name of an existing local file in the WSDLFile box.
NOTE
The Web Service task supports parameters of the following data types only: primitive types such as integers and strings;
arrays and sequences of primitive types; and enumerations.
Variable
Select the check boxes to use variables to provide inputs.
Value
If the Variable check-boxes are selected, select the variables in the list to provide the inputs; otherwise, type the
values to use in the inputs.
VA L UE DESC RIP T IO N
File Connection Store the results in a file. Selecting this value displays the
dynamic option, File .
Variable Store the results in a variable. Selecting this value displays the
dynamic option, Variable .
Related Content
Video, How to: Call a Web Service by Using the Web Service Task (SQL Server Video), on technet.microsoft.com.
WMI Data Reader Task
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The WMI Data Reader task runs queries using the Windows Management Instrumentation (WMI) Query Language
that returns information from WMI about a computer system. You can use the WMI Data Reader task for the
following purposes:
Query the Windows event logs on a local or remote computer and write the information to a file or variable.
Obtain information about the presence, state, or properties of hardware components, and then use this
information to determine whether other tasks in the control flow should run.
Get a list of applications and determine what version of each application is installed.
You can configure the WMI Data Reader task in the following ways:
Specify the WMI connection manager to use.
Specify the source of the WQL query. The query can be stored in a task property, or the query can be stored
outside the task, in a variable or a file.
Define the format of the WQL query results. The task supports a table, property name/value pair, or
property value format.
Specify the destination of the query. The destination can be a variable or a file.
Indicate whether the query destination is overwritten, kept, or appended.
If the source or destination is a file, the WMI Data Reader task uses a File connection manager to connect to the file.
For more information, see Flat File Connection Manager.
The WMI Data Reader task uses a WMI connection manager to connect to the server from which it reads WMI
information. For more information, see WMI Connection Manager.
WQL Query
WQL is a dialect of SQL with extensions to support WMI event notification and other WMI-specific features. For
more information about WQL, see the Windows Management Instrumentation documentation in the MSDN
Library.
NOTE
WMI classes vary between versions of Windows.
The following WQL query returns entries in the Application log event.
The following WQL query returns a list of the quick fix engineering (QFE) updates to the operating system.
LO G EN T RY DESC RIP T IO N
Related Tasks
For more information about how to set these properties in SSIS Designer, click the following topic:
Set the Properties of a Task or Container
NOTE
Task names must be unique within a package.
Description
Type a description of the WMI Data Reader task.
WMI Data Reader Task Editor (WMI Options Page)
Use the WMI Options page of the WMI Data Reader Task Editor dialog box to specify the source of the
Windows Management Instrumentation Query Language (WQL) query and the destination of the query result.
For more information about WMI Query Language (WQL), see the Windows Management Instrumentation topic,
Querying with WQL, in the MSDN Library.
Static Options
WMIConnectionName
Select a WMI connection manager in the list, or click <New WMI Connection...> to create a new connection
manager.
Related Topics: WMI Connection Manager, WMI Connection Manager Editor
WQLQuer ySourceType
Select the source type of the WQL query that the task runs. This property has the options listed in the following
table.
VA L UE DESC RIP T IO N
Direct input Set the source to a WQL query. Selecting this value displays
the dynamic option WQLQuer ySourceType .
File connection Select a file that contains the WQL query. Selecting this value
displays the dynamic option WQLQuer ySourceType .
Variable Set the source to a variable that defines the WQL query.
Selecting this value displays the dynamic option
WQLQuer ySourceType .
OutputType
Specify whether the output should be a data table, property value, or property name and value.
Over writeDestination
Specifies whether to keep, overwrite, or append to the original data in the destination file or variable.
DestinationType
Select the destination type of the WQL query that the task runs. This property has the options listed in the
following table.
VA L UE DESC RIP T IO N
File connection Select a file to save the results of the WQL query in. Selecting
this value displays the dynamic option, DestinationType .
Variable Set the variable to store the results of the WQL query in.
Selecting this value displays the dynamic option,
DestinationType .
See Also
Integration Services Tasks
Control Flow
WMI Event Watcher Task
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The WMI Event Watcher task watches for a Windows Management Instrumentation (WMI) event using a
Management Instrumentation Query Language (WQL) event query to specify events of interest. You can use the
WMI Event Watcher task for the following purposes:
Wait for notification that files have been added to a folder and then initiate the processing of the file.
Run a package that deletes files when the available memory on a server drops lower than a specified
percentage.
Watch for installation of an application, and then run a package that uses the application.
Integration Services includes a task that reads WMI information.
For more information about this task, click the following topic:
WMI Data Reader Task
WQL Queries
WQL is a dialect of SQL with extensions to support WMI event notification and other WMI-specific features. For
more information about WQL, see the Windows Management Instrumentation documentation in the MSDN
Library.
NOTE
WMI classes vary between versions of Windows.
The following query watches for notification that the CPU use is more than 40 percent.
The following query watches for notification that a file has been added to a folder.
LO G EN T RY DESC RIP T IO N
WMIEventWatcherEventOccurred Indicates that an event occurred that the task was monitoring.
LO G EN T RY DESC RIP T IO N
WMIEventWatcherWatchingForWMIEvents Indicates that the task began to execute the WQL query. The
entry includes the query.
NOTE
Task names must be unique within a package.
Description
Type a description of the WMI Event Watcher task.
VA L UE DESC RIP T IO N
Direct input Set the source to a WQL query. Selecting this value displays
the dynamic option, WQLQuer ySource .
File connection Select a file that contains the WQL query. Selecting this value
displays the dynamic option, WQLQuer ySource .
Variable Set the source to a variable that defines WQL query. Selecting
this value displays the dynamic option, WQLQuer ySource .
ActionAtEvent
Specify whether the WMI event logs the event and initiates an SSIS action, or only logs the event.
AfterEvent
Specify whether the task succeeds or fails after it receives the WMI event, or if the task continues watching for the
event to occur again.
ActionAtTimeout
Specify whether the task logs a WMI query time-out and initiates an SSIS event in response, or only logs the time-
out.
AfterTimeout
Specify whether the task succeeds or fails in response to a time-out, or if the task continues watching for another
time-out to recur.
NumberOfEvents
Specify the number of events to watch for.
Timeout
Specify the number of seconds to wait for the event to occur. A value of 0 means that no time-out is in effect.
WQLQuerySource Dynamic Options
WQLQuerySource = Direct input
WQLQuer ySource
Provide a query, or click the ellipsis button (...) and enter a query using the WQL Quer y dialog box.
WQLQuerySource = File connection
WQLQuer ySource
Select a File connection manager in the list, or click <New connection...> to create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
WQLQuerySource = Variable
WQLQuer ySource
Select a variable in the list, or click <New variable...> to create a new variable.
Related Topics: Integration Services (SSIS) Variables, Add Variable
XML Task
11/2/2020 • 19 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The XML task is used to work with XML data. Using this task, a package can retrieve XML documents, apply
operations to the documents by using Extensible Stylesheet Language Transformations (XSLT) style sheets and
XPath expressions, merge multiple documents, or validate, compare, and save the updated documents to files and
variables.
This task enables an Integration Services package to dynamically modify XML documents at run time. You can use
the XML task for the following purposes:
Reformat an XML document. For example, the task can access a report that resides in an XML file and
dynamically apply an XSLT style sheet to customize the document presentation.
Select sections of an XML document. For example, the task can access a report that resides in an XML file
and dynamically apply an XPath expression to select a section of the document. The operation can also get
and process values in the document.
Merge documents from many sources. For example, the task can download reports from multiple sources
and dynamically merge them into one comprehensive XML document.
Validate an XML document and optionally get detailed error output. For more info, see Validate XML with the
XML Task.
You can include XML data in a data flow by using an XML source to extract values from an XML document. For
more information, see XML Source.
XML Operations
The first action the XML task performs is to retrieve a specific XML document. This action is built into the XML task
and occurs automatically. The retrieved XML document is used as the source of data for the operation that the XML
task performs.
The XML operations Diff, Merge, and Patch require two operands. The first operand specifies the source XML
document. The second operand also specifies an XML document, the contents of which depend on the
requirements of the operation. For example, the Diff operation compares two documents; therefore, the second
operand specifies another, similar XML document to which the source XML document is compared.
The XML task can use a variable or a File connection manager as its source, or include the XML data in a task
property.
If the source is a variable, the specified variable contains the path of the XML document.
If the source is a File connection manager, the specified File connection manager provides the source information.
The File connection manager is configured separately from the XML task, and is referenced in the XML task. The
connection string of the File connection manager specifies the path of the XML file. For more information, see File
Connection Manager.
The XML task can be configured to save the result of the operation to a variable or to a file. If saving to a file, the
XML task uses a File connection manager to access the file. You can also save the results of the Diffgram generated
by the Diff operation to files and variables.
Predefined XML Operations
The XML task includes a predefined set of operations for working with XML documents. The following table
describes these operations.
Patch Applies the output from the Diff operation, called a Diffgram
document, to an XML document, to create a new parent
document that includes content from the Diffgram document.
Diff Operation
The Diff operation can be configured to use a different comparison algorithm depending on whether the
comparison must be fast or precise. The operation can also be configured to automatically select a fast or precise
comparison based on the size of the documents being compared.
The Diff operation includes a set of options that customize the XML comparison. The following table describes the
options.
O P T IO N DESC RIP T IO N
Merge Operation
When you use an XPath statement to identify the merge location in the source document, this statement is
expected to return a single node. If the statement returns multiple nodes, only the first node is used. The contents
of the second document are merged under the first node that the XPath query returns.
XPath Operation
The XPath operation can be configured to use different types of XPath functionality.
Select the Evaluation option to implement XPath functions such as sum().
Select the Node list option to return the selected nodes as an XML fragment.
Select the Values option to return the inner text value of all the selected nodes, concatenated into a string.
Validation Operation
The Validation operation can be configured to use either a Document Type Definition (DTD) or XML Schema
definition (XSD) schema.
Enable ValidationDetails to get detailed error output. For more info, see Validate XML with the XML Task.
NOTE
The Diff and Patch operations include an option to ignore the XML declaration in the second-operand XML data, making it
possible to use documents that have other encodings in these operations.
To verify that the XML document can be used, review the XML declaration. The declaration must explicitly specify
UTF-8, which indicates 8-bit Unicode encoding.
The following tag shows the Unicode 8-bit encoding.
<?xml version="1.0" encoding="UTF-8"?>
Related Tasks
Set the Properties of a Task or Container
VA L UE DESC RIP T IO N
Patch Applies the output from the Diff operation to create a new
document. Selecting this option displays the dynamic options
in section, Patch .
SourceType
Select the source type of the XML document. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Variable Set the source to a variable that contains the XML document.
Source
If Source is set to Direct input , provide the XML code or click the ellipsis button (...) and then provide the XML by
using the Document Source Editor dialog box.
If Source is set to File connection , select a File connection manager, or click <New connection...> to create a
new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
If Source is set to Variable , select an existing variable, or click <New variable...> to create a new variable.
Related Topics : Integration Services (SSIS) Variables, Add Variable.
OperationType Dynamic Options
OperationType = Validate
Specify options for the Validate operation.
SaveOperationResult
Specify whether the XML task saves the output of the Validate operation.
Over writeDestination
Specify whether to overwrite the destination file or variable.
Destination
Select an existing File connection manager, or click <New connection...> to create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
DestinationType
Select the destination type of the XML document. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Variable Set the source to a variable that contains the XML document.
ValidationType
Select the validation type. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
FailOnValidationFail
Specify whether the operation fails if the document fails to validate.
ValidationDetails
Provides rich error output when the value of this property is true. For more info, see Validate XML with the XML
Task.
ValidationType Dynamic Options
ValidationType = XSD
SecondOperandType
Select the source type of the second XML document. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Variable Set the source to a variable that contains the XML document.
SecondOperand
If SecondOperandType is set to Direct input , provide the XML code or click the ellipsis button (...) and then
provide the XML by using the Source Editor dialog box.
If SecondOperandType is set to File connection , select a File connection manager, or click <New
connection...> to create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
If XPathStringSourceType is set to Variable , select an existing variable, or click <New variable...> to create a
new variable.
Related Topics : Integration Services (SSIS) Variables, Add Variable.
OperationType = XSLT
Specify options for the XSLT operation.
SaveOperationResult
Specify whether the XML task saves the output of the XSLT operation.
Over writeDestination
Specify whether to overwrite the destination file or variable.
Destination
If DestinationType is set to File connection , select a File connection manager, or click <New connection...> to
create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
If DestinationType is set to Variable , select an existing variable, or click <New variable...> to create a new
variable.
Related Topics : Integration Services (SSIS) Variables, Add Variable.
DestinationType
Select the destination type of the XML document. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Variable Set the source to a variable that contains the XML document.
SecondOperandType
Select the source type of the second XML document. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Variable Set the source to a variable that contains the XML document.
SecondOperand
If SecondOperandType is set to Direct input , provide the XML code or click the ellipsis button (...) and then
provide the XML by using the Source Editor dialog box.
If SecondOperandType is set to File connection , select a File connection manager, or click <New
connection...> to create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
If XPathStringSourceType is set to Variable , select an existing variable, or click <New variable...> to create a
new variable.
Related Topics : Integration Services (SSIS) Variables, Add Variable.
OperationType = XPATH
Specify options for the XPath operation.
SaveOperationResult
Specify whether the XML task saves the output of the XPath operation.
Over writeDestination
Specify whether to overwrite the destination file or variable.
Destination
If DestinationType is set to File connection , select a File connection manager, or click <New connection...> to
create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
If DestinationType is set to Variable , select an existing variable, or click <New variable...> to create a new
variable.
Related Topics : Integration Services (SSIS) Variables, Add Variable.
DestinationType
Select the destination type of the XML document. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Variable Set the source to a variable that contains the XML document.
SecondOperandType
Select the source type of the second XML document. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Variable Set the source to a variable that contains the XML document.
SecondOperand
If SecondOperandType is set to Direct input , provide the XML code or click the ellipsis button (...) and then
provide the XML by using the Source Editor dialog box.
If SecondOperandType is set to File connection , select a File connection manager, or click <New
connection...> to create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
If XPathStringSourceType is set to Variable , select an existing variable, or click <New variable...> to create a
new variable.
Related Topics : Integration Services (SSIS) Variables, Add Variable.
PutResultInOneNode
Specify whether the result is written to a single node.
XPathOperation
Select the XPath result type. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Values Return the inner text value of all selected nodes, concatenated
into a string.
OperationType = Merge
Specify options for the Merge operation.
XPathStringSourceType
Select the source type of the XML document. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Variable Set the source to a variable that contains the XML document.
XPathStringSource
If XPathStringSourceType is set to Direct input , provide the XML code or click the ellipsis button (...) and then
provide the XML by using the Document Source Editor dialog box.
If XPathStringSourceType is set to File connection , select a File connection manager, or click <New
connection...> to create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
If XPathStringSourceType is set to Variable , select an existing variable, or click <New variable...> to create a
new variable.
Related Topics : Integration Services (SSIS) Variables, Add Variable
When you use an XPath statement to identify the merge location in the source document, this statement is
expected to return a single node. If the statement returns multiple nodes, only the first node is used. The contents
of the second document are merged under the first node that the XPath query returns.
SaveOperationResult
Specify whether the XML task saves the output of the Merge operation.
Over writeDestination
Specify whether to overwrite the destination file or variable.
Destination
If DestinationType is set to File connection , select a File connection manager, or click <New connection...> to
create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
If DestinationType is set to Variable , select an existing variable, or click <New variable...> to create a new
variable.
Related Topics : Integration Services (SSIS) Variables, Add Variable.
DestinationType
Select the destination type of the XML document. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Variable Set the source to a variable that contains the XML document.
SecondOperandType
Select the destination type of the second XML document. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Variable Set the source to a variable that contains the XML document.
SecondOperand
If SecondOperandType is set to Direct input , provide the XML code or click the ellipsis button (...) and then
provide the XML by using the Document Source Editor dialog box.
If SecondOperandType is set to File connection , select a File connection manager, or click <New
connection...> to create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
If SecondOperandType is set to Variable , select an existing variable, or click <New variable...> to create a new
variable.
Related Topics : Integration Services (SSIS) Variables, Add Variable
OperationType = Diff
Specify options for the Diff operation.
DiffAlgorithm
Select the Diff algorithm to use when comparing documents. This property has the options listed in the following
table.
VA L UE DESC RIP T IO N
Auto Let the XML task determine whether to use the fast or precise
algorithm.
Diff Options
Set the Diff options to apply to the Diff operation. The options are listed in the following table.
VA L UE DESC RIP T IO N
Note: If this option is set to True , two elements that have the
same local name but different namespaces are considered
identical.
VA L UE DESC RIP T IO N
Note: If you set this option to True , two elements that have
the same local name, but different namespace URIs and
prefixes, are considered identical.
FailOnDifference
Specify whether the task fails if the Diff operation fails.
SaveDiffGram
Specify whether to save the comparison result, a DiffGram document.
SaveOperationResult
Specify whether the XML task saves the output of the Diff operation.
Over writeDestination
Specify whether to overwrite the destination file or variable.
Destination
If DestinationType is set to File connection , select a File connection manager, or click <New connection...> to
create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
If DestinationType is set to Variable , select an existing variable, or click <New variable...> to create a new
variable.
Related Topics : Integration Services (SSIS) Variables, Add Variable.
DestinationType
Select the destination type of the XML document. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Variable Set the source to a variable that contains the XML document.
SecondOperandType
Select the destination type of the XML document. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Variable Set the source to a variable that contains the XML document.
SecondOperand
If SecondOperandType is set to Direct input , provide the XML code or click the ellipsis button (...) and then
provide the XML by using the Document Source Editor dialog box.
If SecondOperandType is set to File connection , select a File connection manager, or click <New
connection...> to create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
If SecondOperandType is set to Variable , select an existing variable, or click <New variable...> to create a new
variable.
Related Topics : Integration Services (SSIS) Variables, Add Variable
OperationType = Patch
Specify options for the Patch operation.
SaveOperationResult
Specify whether the XML task saves the output of the Patch operation.
Over writeDestination
Specify whether to overwrite the destination file or variable.
Destination
If DestinationType is set to File connection , select a File connection manager, or click <New connection...> to
create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
If DestinationType is set to Variable , select an existing variable, or click <New variable...> to create a new
variable.
Related Topics : Integration Services (SSIS) Variables, Add Variable.
DestinationType
Select the destination type of the XML document. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Variable Set the source to a variable that contains the XML document.
SecondOperandType
Select the destination type of the XML document. This property has the options listed in the following table.
VA L UE DESC RIP T IO N
Variable Set the source to a variable that contains the XML document.
SecondOperand
If SecondOperandType is set to Direct input , provide the XML code or click the ellipsis button (...) and then
provide the XML by using the Document Source Editor dialog box.
If SecondOperandType is set to File connection , select a File connection manager, or click <New
connection...> to create a new connection manager.
Related Topics: File Connection Manager, File Connection Manager Editor
If SecondOperandType is set to Variable , select an existing variable, or click <New variable...> to create a new
variable.
Related Topics : Integration Services (SSIS) Variables, Add Variable
Related Content
CodePlex sample, Process XML Data Package Sample, on www.codeplex.com
Validate XML with the XML Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Validate XML documents and get rich error output by enabling the ValidationDetails property of the XML Task.
The following screenshot shows the XML Task Editor with the settings required for XML validation with rich
error output.
Before the ValidationDetails property was available, XML validation by the XML Task returned only a true or
false result, with no information about errors or their locations. Now, when you set ValidationDetails to True, the
output file contains detailed information about every error including the line number and the position. You can
use this information to understand, locate, and fix errors in XML documents.
The XML validation functionality scales easily for large XML documents and large numbers of errors. Since the
output file itself is in XML format, you can query and analyze the output. For example, if the output contains a
large number of errors, you can group the errors by using a Transact-SQL query, as described in this topic.
NOTE
SQL Server Integration Services ( SSIS) introduced the ValidationDetails property in SQL Server 2012 (11.x) Service Pack
2. The property is also available in SQL Server 2014 (12.x) and in SQL Server 2016 (13.x).
<root xmlns:ns="https://schemas.microsoft.com/xmltools/2002/xmlvalidation">
<metadata>
<result>false</result>
<errors>2</errors>
<warnings>0</warnings>
<startTime>2015-05-28T10:45:09.538</startTime>
<endTime>2015-05-28T10:45:09.558</endTime>
<xmlFile>C:\Temp\TestData.xml</xmlFile>
<xsdFile>C:\Temp\TestSchema.xsd</xsdFile>
</metadata>
<messages>
<error line="5" position="26">The 'ApplicantRole' element is invalid - The value 'wer3' is invalid
according to its datatype 'ApplicantRoleType' - The Enumeration constraint failed.</error>
<error line="16" position="28">The 'Phone' element is invalid - The value 'we3056666666' is invalid
according to its datatype 'phone' - The Pattern constraint failed.</error>
</messages>
</root>
Here is the result in Management Studio of the second sample query shown in the preceding text.
See Also
XML Task
XML Task Editor (General Page)
Precedence Constraints
11/2/2020 • 12 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Precedence constraints link executables, containers, and tasks in packages in a control flow, and specify
conditions that determine whether executables run. An executable can be a For Loop, Foreach Loop, or
Sequence container; a task; or an event handler. Event handlers also use precedence constraints to link their
executables into a control flow.
A precedence constraint links two executables: the precedence executable and the constrained executable. The
precedence executable runs before the constrained executable, and the execution result of the precedence
executable may determine whether the constrained executable runs. The following diagram shows two
executables linked by a precedence constraint.
In a linear control flow, that is, one without branching, precedence constraints alone govern the sequence in
which tasks run. If a control flow branches, the Integration Services run-time engine determines the execution
order among the tasks and containers that immediately follow the branching. The run-time engine also
determines execution order among unconnected workflows in a control flow.
The nested-container architecture of Integration Services enables all containers, except for the task host
container that encapsulates only a single task, to include other containers, each with its own control flow. The
For Loop, Foreach Loop, and Sequence containers can include multiple tasks and other containers, which in
turn can include multiple tasks and containers. For example, a package with a Script task and a Sequence
container has a precedence constraint that links the Script task and the Sequence container. The Sequence
container includes three Script tasks, and its precedence constraints link the three Script tasks into a control
flow. The following diagram shows the precedence constraints in a package with two levels of nesting.
Because the package is at the top of the SSIS container hierarchy, multiple packages cannot be linked by
precedence constraints; however, you can add an Execute Package task to a package and indirectly link another
package into the control flow.
You can configure precedence constraints in the following ways:
Specify an evaluation operation. The precedence constraint uses a constraint value, an expression, both,
or either to determine whether the constrained executable runs.
If the precedence constraint uses an execution result, you can specify the execution result to be success,
failure, or completion.
If the precedence constraint uses an evaluation result, you can provide an expression that evaluates to a
Boolean.
Specify whether the precedence constraint is evaluated singly or together with other constraints that
apply to the constrained executable.
Evaluation Operations
Integration Services provides the following evaluation operations:
A constraint that uses only the execution result of the precedence executable to determine whether the
constrained executable runs. The execution result of the precedence executable can be completion,
success, or failure. This is the default operation.
An expression that is evaluated to determine whether the constrained executable runs. If the expression
evaluates to true, the constrained executable runs.
An expression and a constraint that combines the requirements of execution results of the precedence
executable and the return results of evaluating the expression.
An expression or a constraint that uses either the execution results of the precedence executable or the
return results of evaluating the expression.
SSIS Designer uses color to identify the type of precedence constraint. The Success constraint is green, the
Failure constraint is red, and the Completion constraint is blue. To display text labels in SSIS designer that show
the type of the constraint, you must configure the accessibility features of SSIS Designer.
The expression must be a valid SSIS expression, and it can include functions, operators, and system and custom
variables. For more information, see Integration Services (SSIS) Expressions and Integration Services (SSIS)
Variables.
Execution Results
The precedence constraint can use the following execution results alone or in combination with an expression.
Completion requires only that the precedence executable has completed, without regard to outcome, in
order for the constrained executable to run.
Success requires that the precedence executable must complete successfully for the constrained
executable to run.
Failure requires that the precedence executable fail for the constrained executable to run.
NOTE
Only precedence constraints that are members of the same Precedence Constraint collection can be grouped in a
logical AND condition. For example, you cannot combine precedence constraints from two Foreach Loop containers.
NOTE
Variable names are case-sensitive.
8. If multiple tasks or containers are connected to the constrained executable, select Logical AND to
specify that the execution results of all preceding executables must evaluate to true . Select Logical OR
to specify that only one execution result must evaluate to true .
9. Click OK to close the Precedence Constraint Editor .
10. To save the updated package, click Save Selected Items on the File menu.
NOTE
The precedence constraint line is green for Success , highlighted for Failure , and blue for Completion .
Expression
If using the operations Expression , Expression and Constraint , or Expression or Constraint , type an
expression or launch the Expression Builder to create the expression. The expression must evaluate to a
Boolean.
Test
Validate the expression.
Logical AND
Select to specify that multiple precedence constraints on the same executable must be evaluated together. All
constraints must evaluate to True .
NOTE
This type of precedence constraint appears as a solid green, highlighted or blue line.
Logical OR
Select to specify that multiple precedence constraints on the same executable must be evaluated together. At
least one constraint must evaluate to True .
NOTE
This type of precedence constraint appears as a dotted green, highlighted, or blue line.
Executables can also be linked by using multiple precedence constraints that contain different expressions. For
example, in the following illustration, tasks B and C are linked to task A by precedence constraints that use
execution results and expressions. Both of the constraint values are set to Success. One precedence constraint
includes the expression @X >== @Z , and the other precedence constraint includes the expression @X < @Z .
Depending on the values of variable X and variable Z , either task C or task B runs.
You can add or modify an expression by using the Precedence Constraint Editor in SSIS Designer and the
Properties window that SQL Server Data Tools (SSDT) provides. However, the Properties window does not
provide verification of the expression syntax.
If a precedence constraint includes an expression, an icon appears on the design surface of the Control Flow
tab, next to the precedence constraint, and the ToolTip on the icon displays the expression.
Add an expression to a precedence constraint
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you
want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Control Flow tab.
4. On the design surface of the Control Flow tab, double-click the precedence constraint. The
Precedence Constraint Editor opens.
5. Select Expression , Expression and Constraint , or Expression or Constraint in the Evaluation
operation list.
6. Type an expression in the Expression text box or launch the Expression Builder to create an expression.
7. To validate the expression syntax, click Test .
8. To save the updated package, click Save Selected Items on the File menu.
Combine execution values and expressions
The following table describes the effects of combining an execution value constraint and an expression in a
precedence constraint.
C O N ST RA IN T EVA L UAT ES C O N ST RA IN ED
EVA L UAT IO N O P ERAT IO N TO EXP RESSIO N EVA L UAT ES TO EXEC UTA B L E RUN S
LogicalAnd Property
If a task or a container has multiple constraints, the LogicalAnd property specifies whether a precedence
constraint is evaluated singly or in concert with other constraints.
You can set the LogicalAnd property using the Precedence Constraint Editor in SSIS Designer, or in the
Properties window that SQL Server Data Tools (SSDT) provides.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SQL Server Integration Services provides three different types of data flow components: sources,
transformations, and destinations. Sources extract data from data stores such as tables and views in relational
databases, files, and Analysis Services databases. Transformations modify, summarize, and clean data.
Destinations load data into data stores or create in-memory datasets.
NOTE
When you use custom providers, you need to update the ProviderDescriptors.xml file with the metadata column
values.
Additionally, Integration Services provides paths that connect the output of one component to the input of
another component. Paths define the sequence of components, and let you add annotations to the data flow
or view the source of the column.
You connect data flow components by connecting the output of sources and destinations to the input of
transformations and destinations. When constructing a data flow you typically connect the second and
subsequent components as you add them to the data flow. After you connect the component, the input
columns are available for use in configuring the component. When no input columns are available, you will
have to complete the configuration of the component after it is connected to the data flow. For more
information, see Integration Services Paths and Connect Components with Paths.
The following diagram shows a data flow that has a source, a transformation with one input and one output,
and a destination. The diagram includes the inputs, outputs, and error outputs in addition to the input, output,
and external columns.
Data Flow Implementation
Adding a Data Flow task to the control flow of a package is the first step in implementing a data flow in a
package. A package can include multiple Data Flow tasks, each with its own data flow. For example, if a
package requires that data flows be run in a specified sequence, or that other tasks be performed between
the data flows, you must use a separate Data Flow task for each data flow.
After the control flow includes a Data Flow task, you can begin to build the data flow that a package uses. For
more information, see Data Flow Task.
Creating a data flow includes the following steps:
Adding one or more sources to extract data from files and databases, and add connection managers to
connect to the sources.
Adding the transformations that meet the business requirements of the package. A data flow is not
required to include transformations.
Some transformations require a connection manager. For example, the Lookup transformation uses a
connection manager to connect to the database that contains the lookup data.
Connecting data flow components by connecting the output of sources and transformations to the
input of transformations and destinations.
Adding one or more destinations to load data into data stores such as files and databases, and adding
connection managers to connect to the data sources.
Configuring error outputs on components to handle problems.
At run time, row-level errors may occur when data flow components convert data, perform a lookup,
or evaluate expressions. For example, a data column with a string value cannot be converted to an
integer, or an expression tries to divide by zero. Both operations cause errors, and the rows that
contain the errors can be processed separately using an error flow. For more information about how to
use error flows in package data flow, see Error Handling in Data.
Include annotations to make the data flow self-documenting. For more information, see Use
Annotations in Packages.
NOTE
When you create a new package, you can also use a wizard to help you configure connection managers, sources, and
destinations correctly. For more information, see Create Packages in SQL Server Data Tools.
When the Data Flow tab is active, the Toolbox contains the sources, transformations, and destinations that
you can add to the data flow.
Expressions
A number of the data flow components-sources, transformations, and destinations-support the use of
property expressions in some of their properties. A property expression is an expression that replaces the
value of the property when the package is loaded. At run time, the package uses the updated property values.
The expressions are built using the Integration Services expression syntax and can include Integration
Services functions, operators, identifiers, and variables. For more information, see Integration Services (SSIS)
Expressions, Integration Services (SSIS) Expressions, and Use Property Expressions in Packages.
If you construct a package in SQL Server Data Tools (SSDT), the properties of any data flow components that
support property expressions are exposed on the Data Flow task to which they belong. To add, change, and
remove the property expressions of data flow components, click the Data Flow task, and then use the
Properties window or the editor for the task to add, change, or delete property expressions. Property
expressions for the Data Flow task itself are managed in the Properties window.
If the data flow contains any components that use expressions, the expressions are also exposed in the
Properties window. To view expressions, select the Data Flow task to which the component belongs. You can
view properties by categories, or in alphabetical order. If you use the categorized view in the Properties
window, any expressions that are not used in a specific property are listed in the Misc category. If you use the
alphabetical view, expressions are listed in order of the name of the data flow component.
Sources
In Integration Services, a source is the data flow component that makes data from different external data
sources available to the other components in the data flow. You can extract data from flat files, XML files,
Microsoft Excel workbooks, and files that contain raw data. You can also extract data by accessing tables and
views in databases and by running queries.
A data flow can include a single source or multiple sources.
The source for a data flow typically has one regular output. The regular output contains output columns,
which are columns the source adds to the data flow.
The regular output references external columns. An external column is a column in the source. For example,
the MadeFlag column in the Product table of the AdventureWorks database is an external column that
can be added to the regular output. Metadata for external columns includes such information as the name,
data type, and length of the source column.
An error output for a source contains the same columns as the regular output, and also contains two
additional columns that provide information about errors. The Integration Services object model does not
restrict the number of regular outputs and error outputs that sources can have. Most of the sources that
Integration Services includes, except the Script component, have one regular output, and many of the sources
have one error output. Custom sources can be coded to implement multiple regular outputs and error
outputs.
All the output columns are available as input columns to the next data flow component in the data flow.
You can also write custom sources. For more information, see Developing a Custom Data Flow Component
and Developing Specific Types of Data Flow Components.
The following sources have properties that can be updated by property expressions:
ADO NET Source
XML Source
Sources Available for Download
The following table lists additional sources that you can download from the Microsoft website.
For a demonstration on how to leverage the performance gains of the Microsoft Connector for Oracle by
Attunity, see Performance of Microsoft Connector for Oracle by Attunity (SQL Server Video).
Transformations
The capabilities of transformations vary broadly. Transformations can perform tasks such as updating,
summarizing, cleaning, merging, and distributing data. You can modify values in columns, look up values in
tables, clean data, and aggregate column values.
The inputs and outputs of a transformation define the columns of incoming and outgoing data. Depending on
the operation performed on the data, some transformations have a single input and multiple outputs, while
other transformations have multiple inputs and a single output. Transformations can also include error
outputs, which provide information about the error that occurred, together with the data that failed: For
example, string data that could not be converted to an integer data type. The Integration Services object
model does not restrict the number of inputs, regular outputs, and error outputs that transformations can
contain. You can create custom transformations that implement any combination of multiple inputs, regular
outputs, and error outputs.
The input of a transformation is defined as one or more input columns. Some Integration Services
transformations can also refer to external columns as input. For example, the input to the OLE DB Command
transformation includes external columns. An output column is a column that the transformation adds to the
data flow. Both regular outputs and error outputs contain output columns. These output columns in turn act
as input columns to the next component in the data flow, either another transformation or a destination.
The following transformations have properties that can be updated by property expressions:
Conditional Split Transformation
Derived Column Transformation
Fuzzy Grouping Transformation
Fuzzy Lookup Transformation
OLE DB Command Transformation
Percentage Sampling Transformation
Pivot Transformation
Row Sampling Transformation
Sort Transformation
Unpivot Transformation
For more information, see Integration Services Transformations.
Destinations
A destination is the data flow component that writes the data from a data flow to a specific data store, or
creates an in-memory dataset. You can load data into flat files, process analytic objects, and provide data to
other processes. You can also load data by accessing tables and views in databases and by running queries.
A data flow can include multiple destinations that load data into different data stores.
An Integration Services destination must have at least one input. The input contains input columns, which
come from another data flow component. The input columns are mapped to columns in the destination.
Many destinations also have one error output. The error output for a destination contains output columns,
which typically contain information about errors that occur when writing data to the destination data store.
Errors occur for many different reasons. For example, a column may contain a null value, whereas the
destination column cannot be set to null.
The Integration Services object model does not restrict the number of regular inputs and error outputs that
destinations can have, and you can create custom destinations that implement multiple inputs and error
outputs.
You can also write custom destinations. For more information, see Developing a Custom Data Flow
Component and Developing Specific Types of Data Flow Components.
The following destinations have properties that can be updated by property expressions:
Flat File Destination
SQL Server Compact Edition Destination
Destinations Available for Download
The following table lists additional destinations that you can download from the Microsoft website.
For a demonstration on how to leverage the performance gains of the Microsoft Connector for Oracle by
Attunity, see Performance of Microsoft Connector for Oracle by Attunity (SQL Server Video).
Connection Managers
Many data flow components connect to data sources, and you must add the connection managers that the
components require to the package before the component can be configured correctly. You can add the
connection managers as you construct the data flow, or before you start to construct the data flow. For more
information, see Integration Services (SSIS) Connections and Create Connection Managers.
External Metadata
When you create a data flow in a package using SSIS Designer, the metadata from the sources and
destinations is copied to the external columns on sources and destinations, serving as a snapshot of the
schema. When Integration Services validates the package, SSIS Designer compares this snapshot against the
schema of the source or destination, and posts errors and warnings, depending on the changes.
The Integration Services project provides an offline mode. When you work offline no connections are made
to the sources or destinations the package uses, and the metadata of external columns is not updated.
Paths
Paths connect data flow components. In SSIS Designer, you can view and modify the path properties, view the
output metadata for the path start point, and attach data viewers to a path.
For more information, see Integration Services Paths and Debugging Data Flow.
Related Tasks
Add or Delete a Component in a Data Flow
Connect Components in a Data Flow
Related Content
Video, Performance of Microsoft Connector for Oracle by Attunity (SQL Server Video), on
technet.microsoft.com.
Data in Data Flows
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services provides a set of data types that are used in data flows.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data
Factory
When data enters a data flow in a package, the source that extracts the data converts the data to an
Integration Services data type. Numeric data is assigned a numeric data type, string data is assigned
a character data type, and dates are assigned a date data type. Other data, such as GUIDs and Binary
Large Object Blocks (BLOBs), are also assigned appropriate Integration Services data types. If data
has a data type that is not convertible to an Integration Services data type, an error occurs.
Some data flow components convert data types between the Integration Services data types and the
managed data types of the Microsoft .NET Framework. For more information about the mapping
between Integration Services and managed data types, see Working with Data Types in the Data
Flow.
The following table lists the Integration Services data types. Some of the data types in the table have
precision and scale information that applies to them. For more information about precision and
scale, see Precision, Scale, and Length (Transact-SQL).
If the sign for the hour offset is zero, the minute offset
can be any value from negative 0.59 to positive 0.59.
DATA T Y P E ST RIN G F O RM AT
DT_DBDATE yyyy-mm-dd
DT_DBTIME hh:mm:ss
DT_DBTIME2 hh:mm:ss[.fffffff]
In the format for DT_FILETIME and DT_DBTIMESTAMP fff is a value between 0 and 999 that represents
fractional seconds.
In the date format for DT_DBTIMESTAMP2, DT_DBTIME2, and DT_DBTIMESTAMPOFFSET, fffffff is a
value between 0 and 9999999 that represents fractional seconds.
The date format for DT_DBTIMESTAMPOFFSET also includes a time zone element. There is a space
between the time element and the time zone element.
Converting Date/Time Data Types
You can change the data type on a column with date/time data to extract the date or the time part of
the data. The following tables list the results of changing from one date/time data type to another
date/time data type.
Converting from DT_FILETIME
C O N VERT DT _F IL ET IM E TO RESULT
DT_FILETIME No change.
DT_DATE No change.
DT_DATE Sets the time fields in the DT_DATE data type to zero.
DT_DBDATE No change.
DT_DBTIMESTAMPOFFSET Sets the time fields and the time zone field in the
DT_DBTIMESTAMPOFFSET data type to zero.
DT_FILETIME Sets the date field in the DT_FILETIME data type to the
current date.
DT_DATE Sets the date field in the DT_DATE data type to the
current date.
DT_DBDATE Sets the date field in the DT_DBDATE data type to the
current date.
DT_DBTIME No change.
C O N VERT DT _DBT IM E TO RESULT
DT_DBTIMESTAMPOFFSET Sets the date field and the time zone field in the
DT_DBTIMESTAMPOFFSET data type to the current
date and to zero, respectively.
DT_FILETIME Sets the date field in the DT_FILETIME data type to the
current date.
DT_DATE Sets the date field of the DT_DATE data type to the
current date.
DT_DBDATE Sets the date field of the DT_DBDATE data type to the
current date.
DT_DBTIMESTAMPOFFSET Sets the date field and the time zone field in the
DT_DBTIMESTAMPOFFSET data type to the current
date and to zero, respectively.
DT_DBTIMESTAMP No change.
IMPORTANT
These mappings are not intended to represent strict equivalency, but only to provide guidance. In certain
situations, you may need to use a different data type than the one shown in this table.
NOTE
You can use the SQL Server data types to estimate the size of corresponding Integration Services date and
time data types.
SQ L SERVER O RA C L E
SQ L SERVER DB 2 DB 2
( SQ LO L EDB ; ( SQ L C L IEN T ( O RA C L EC L I
DATA T Y P E SQ L N C L I10) ) JET EN T ) ( DB 2O L EDB ) ( IB M DA DB 2)
DT_DATE
DT_DECIMA
L
DT_FILETIM
E
DT_I1
DT_UI2
DT_UI4
DT_UI8
For information on mapping data types in the data flow, see Working with Data Types in the Data
Flow.
Related Content
Blog entry, Performance Comparison between Data Type Conversion Techniques in SSIS 2008, on
blogs.msdn.com.
See Also
Data in Data Flows
Parsing Data
11/2/2020 • 9 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Data flows in packages extract and load data between heterogeneous data stores, which may use a variety of
standard and custom data types. In a data flow, Integration Services sources do the work of extracting data,
parsing string data, and converting data to an Integration Services data type. Subsequent transformations may
parse data to convert it to a different data type, or create column copies with different data types. Expressions
used in components may also cast arguments and operands to different data types. Finally, when the data is
loaded into a data store, the destination may parse the data to convert it to a data type that the destination uses.
For more information, see Integration Services Data Types.
Fast Parse
Fast parse provides a fast, simple set of routines for parsing data. These routines are not locale-sensitive and they
support only a subset of date, time, and integer formats.
Requirements and limitations
By implementing fast parse, a package forfeits its ability to interpret date, time, and numeric data in locale-specific
formats and many frequently used ISO 8601 basic and extended formats, but the package enhances its
performance. For example, fast parse supports only the most commonly used date format representations such
as YYYYMMDD and YYYY-MM-DD, does not perform locale-specific parsing, does not recognize special characters
in currency data, and cannot convert hexadecimal or scientific representation of integers.
Fast parse is available only when you use the Flat File source or the Data Conversion transformation. The increase
in performance can be significant, and you should consider using fast parse in these data flow components if you
can.
If the data flow in the package requires locale-sensitive parsing, standard parse is recommended instead of fast
parse. For example, fast parse does not recognize locale-sensitive data that includes decimal symbols such as the
comma, date formats other than year-month-date formats, and currency symbols.
Truncated representations that imply one or more date parts, such as a century, a year, or a month, are not
recognized by fast parse. For example, fast parse recognizes neither the '-YYMM ' format, which specifies a year
and month in an implied century, nor '--MM ', which specifies a month in an implied year. However, some
representations with reduced precision are recognized. For example, fast parse recognizes the 'hhmm;' format,
which indicates hour and minute only, and 'YYYY ', which indicates year only.
Fast parse is specified at the column level. In the Flat File source and the Data Conversion transformation, you can
specify Fast parse on output columns. Inputs and outputs can include both locale-sensitive and locale-insensitive
columns.
Numeric data formats (Fast Parse)
Fast parse provides a fast, simple, locale-insensitive set of routines for parsing data. Fast parse supports only a
limited set of formats for integer data types.
Integer data type
The integer data types that Integration Services provides are DT_I1, DT_UI1, DT_I2, DT_UI2, DT_I4, DT_UI4, DT_I8,
and DT_UI8. For more information, see Integration Services Data Types.
Fast parse supports the following formats for integer data types:
Zero or more leading and trailing spaces or tab stops. For example, the value " 123 " is valid. A value that is
all spaces evaluates to zero.
A leading plus sign, minus sign, or neither. For example, the values +123, -123, and 123 are valid.
One or more Hindu-Arabic numerals (0-9). For example, the value 345 is valid. Other language numerals
are not supported.
Non-supported data formats include the following:
Special characters. For example, the currency character $ is not supported, and the value $20 cannot be
parsed.
White-space characters such as line feed, carriage returns, and non-breaking spaces. For example, the value
" 123" cannot be parsed.
Hexadecimal representations of integers. For example, the value 2EE cannot be parsed.
Scientific notation representation of integers. For example, the value 1E+10 cannot be parsed.
The following formats are output data formats for integers:
A minus sign for negative numbers and nothing for positive ones.
No white spaces.
One or more Hindu-Arabic numerals (0-9).
F O RM AT DESC RIP T IO N
Fast parse does not support the following formats for date data:
Alphabetical month values. For example, the date format Oct-31-2003 is not valid.
Ambiguous formats such as DD-MM-YYYY and MM-DD-YYYY. For example, the dates 03-04-1995 and 04-
03-1995 are not valid.
Basic and extended truncated formats for a four-digit calendar year and a three-digit day within a year,
YYYYDDD and YYYY-DDD.
Basic and extended formats for a four-digit year, a two-digit number for the week of the year, and a one-
digit number for the day of the week, YYYYWwwD and YYYY-Www-D
Basic and extended truncated formats for a year and week date are a four-digit year and a two-digit
number for the week, YYYWww and YYYY-Www
Fast parse outputs the data as DT_DBDATE. Date values in truncated formats are padded. For example, YYYY
becomes YYYY0101.
For more information, see Integration Services Data Types.
Time data type
Fast parse supports the following string formats for time data:
Time formats that include leading white spaces. For example, the value " 10:24" is valid.
24-hour format. Fast parse does not support the AM and PM notation.
ISO 8601 time formats, as listed in the following table:
F O RM AT DESC RIP T IO N
000000
0000
00
240000
24:00:00
2400
24
Time formats that specify a time zone, as listed in the following table:.
F O RM AT DESC RIP T IO N
The formats for all time and date/time data can include a time zone element. However, the system ignores
the time zone value except when the data is of type DT_DBTIMESTAMPOFFSET. For more information, see
Integration Services Data Types.
In formats that include a time zone element, there is no space between the time element and the time zone
element, as shown in the following example:
HH:MI:SS[+HH:MI]
The brackets in the previous example indicate that the time zone value is optional.
Time formats that include a decimal fraction, as listed in the following table:
F O RM AT DESC RIP T IO N
NOTE
The fraction separator for the time formats in the previous table can be a decimal or a comma.
Time values that include a leap second, as shown in the following examples:
23:59:60[.0000000]
235960[.0000000]
Fast parse outputs the strings as DT_DBTIME and DT_DBTIME2. Time values in truncated formats are padded. For
example, HH:MI becomes HH:MM:00.000.
For more information, see Integration Services Data Types.
Date/Time data type
Fast parse supports the following string formats for date/time data:
Formats that include leading white spaces. For example, the value " 2003-01-10T203910" is valid.
Combinations of valid date formats and valid time formats separated by an uppercase T, and valid time
zone formats, such as YYYYMMDDT[HHMISS][+HH:MI]. The time and time zone values are not required.
For example, "2003-10-14" is valid.
Fast parse does not support time intervals. For example, a time interval identified by a start and end date and
time in the format YYYYMMDDThhmmss/YYYYMMDDThhmmss cannot be parsed.
Fast parse outputs the strings as DT_DATE, DT_DBTIMESTAMP, DT_DBTIMESTAMP2, and DT_DBTIMESTAMPOFFSET.
Date/time values in truncated formats are padded. The following table lists the values that are added for missing
date and time parts.
DAT E/ T IM E PA RT PA DDIN G
Standard Parse
Standard parse is a locale-sensitive set of parsing routines that support all the data type conversions provided by
the Automation data type conversion APIs that are available in Oleaut32.dll and Ole2dsip.dll. Standard parse is
equivalent to the OLE DB parsing APIs.
Standard parse provides support for data type conversion of international data, and it should be used if the data
format is not supported by Fast parse. For more information about the Automation data type conversion API, see
"Data Type Conversion APIs" in the MSDN Library.
Comparing String Data
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
String comparisons are an important part of many of the transformations performed by Integration Services,
and string comparisons are also used in the evaluation of expressions in variables and property expressions. For
example, the Sort transformation compares values in a dataset to sort data in ascending or descending order.
Setting Locale
Integration Services does not use the code page to infer locale-specific rules for sorting data or interpreting date,
time, and decimal data. Instead, the transformation reads the locale that is set by the LocaleId property on the
data flow component, Data Flow task, container, or package. By default, the locale of a transformation is inherited
from its Data Flow task, which in turn inherits from the package. If the Data Flow task is in a container such as the
For Loop container, it inherits its locale from the container.
You can also specify a locale for a Flat File connection manager and a Multiple Flat Files connection manager.
Ignore kana type Specifies whether the comparison distinguishes between the
two types of Japanese kana characters: hiragana and
katakana. If this option is set, the string comparison ignores
kana type.
Sort punctuation as symbols Specifies whether the comparison sorts all punctuation
symbols, except the hyphen and apostrophe, before the
alphanumeric characters. For example, if this option is set,
".ABC" sorts before "ABC".
The Sort, Aggregate, Fuzzy Grouping and Fuzzy Lookup transformations include these options for comparing
data.
The FullySensitive comparison flag displays in the Advanced Editor dialog box for the Fuzzy Grouping and
Fuzzy Lookup transformations. Selecting the FullySensitive comparison flag means that all the comparison
options apply.
See Also
Integration Services Data Types
Fast Parse
Standard Parse
Add or Delete a Component in a Data Flow
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Data flow components are sources, destinations, and transformations in a data flow. Before you can add
components to a data flow, the control flow in the package must include a Data Flow task.
The following procedures describe how to add or delete a component in the data flow of a package.
To add a component to a data flow
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Control Flow tab, and then double-click the Data Flow task that contains the data flow to which
you want to add a component.
4. In the Toolbox, expand Data Flow Sources , Data Flow Transformations , or Data Flow Destinations ,
and then drag a data flow item to the design surface of the Data Flow tab.
5. To save the updated package, click Save Selected Items on the File menu.
To delete a component from a data flow
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Control Flow tab, and then double-click the Data Flow task that contains the data flow from
which you want to delete a component.
4. Right-click the data flow component, and then click Delete .
5. Confirm the delete operation.
6. To save the updated package, click Save Selected Items on the File menu.
See Also
Connect Components in a Data Flow
Debugging Data Flow
Data Flow
Set the Properties of a Data Flow Component
11/2/2020 • 15 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data
Factory
To set the properties of data flow components, which include sources, destinations, and
transformations, use one of the following features:
The component editors that Integration Services provides. These editors include only the
custom properties of each data flow component.
The Proper ties window lists the component-level custom properties of each element, as well
as the properties common to all data flow elements.
The Advanced Editor dialog box provides access to custom properties for each component.
The Advanced Editor dialog box also provides access to the properties common to all data
flow components-the properties of inputs, outputs, error outputs, columns, and external
columns.
6. To save the updated package, on the File menu, click Save Selected Items .
NOTE
In SQL Server, data flow components that support multiple inputs cannot use the Advanced
Editor .
NOTE
The Connection Managers tab is available only to data flow components that use
connection managers to connect to data sources such as files and databases
To view and modify component-level properties, click the Component Proper ties
tab.
To view and modify mappings between external columns and the available output, click
the Column Mappings tab.
NOTE
The Column Mappings tab is available only when viewing or editing sources or
destinations.
To view a list of the available input columns and to update the names of output
columns, click the Input Columns tab.
NOTE
The Input Columns tab is available only when working with transformations or destinations.
For more information, see Integration Services Transformations.
To view and modify the properties of inputs, outputs, and error outputs, and the
properties of the columns they contain, click the Input and Output Proper ties tab.
NOTE
Sources have no inputs. Destinations have no outputs, except for an optional error output.
Input properties
In the Integration Services object model, transformations and destinations have inputs. An input of a
component in the data flow implements the IDTSInput100 interface.
The following table describes the properties of the inputs of components in a data flow. Some
properties have read-only values that are assigned at run time by the data flow engine.
Destinations and some transformations do not support error outputs, and the ErrorRowDisposition
and TruncationRowDisposition properties of these components are read-only.
Input column properties
In the Integration Services object model, an input contains a collection of input columns. An input
column of a component in the data flow implements the IDTSInputColumn100 interface.
The following table describes the properties of the input columns of components in a data flow.
Some properties have read-only values that are assigned at run time by the data flow engine.
Input columns also have the data type properties described under "Data Type Properties."
Output properties
In the Integration Services object model, sources and transformations have outputs. An output of a
component in the data flow implements the IDTSOutput100 interface.
The following table describes the properties of the outputs of components in a data flow. Some
properties have read-only values that are assigned at run time by the data flow engine.
NOTE
When you remove the focus from the Condition column or the Expression column, the
expression text might be highlighted to indicate that the expression syntax is incorrect.
NOTE
If the expression is not valid, an alert appears describing the syntax errors in the expression.
SqlCommand property
XMLSchemaDefinition property
SqlCommandParam property
BatchSize property
CommandTimeout property
BulkInsertFirstRow property
BulkInsertLastRow property
BulkInsertOrder property
Timeout property
Connect Components in a Data Flow
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This procedure describes how to connect the output of components in a data flow to other components within the
same data flow.
You construct the data flow in a package on the design surface of the Data Flow tab in the SSIS Designer. If a data
flow contains two data flow components, you can connect them by connecting the output of a source or
transformation to the input of a transformation or destination. The connector between two data flow components
is called a path.
The following diagram shows a simple data flow with a source component, two transformations, a destination
component, and the paths that connect them.
After two components are connected, you can view the metadata of the data that moves through the path and the
properties of the path in Data Flow Path Editor . For more information, see Integration Services Paths.
You can also add data viewers to paths. A data viewer makes it possible to view data moving between data flow
components when the package is run.
Connect components in a data flow
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Control Flow tab, and then double-click the Data Flow task that contains the data flow in which
you want to connect components.
4. On the design surface of the Data Flow tab, select the transformation or source that you want to connect.
5. Drag the green output arrow of a transformation or a source to a transformation or to a destination. Some
data flow components have error outputs that you can connect in the same way.
NOTE
Some data flow components can have multiple outputs and you can connect each output to a different
transformation or destination.
6. To save the updated package, click Save Selected Items on the File menu.
See Also
Add or Delete a Component in a Data Flow
Debugging Data Flow Data Flow
Integration Services Paths
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A path connects two components in a data flow by connecting the output of one data flow component to the
input of another component. A path has a source and a destination. For example, if a path connects an OLE DB
source and a Sort transformation, the OLE DB source is the source of the path, and the Sort transformation is the
destination of the path. The source is the component where the path starts, and the destination is the component
where the path ends.
If you run a package in SSIS Designer, you can view the data in a data flow by attaching data viewers to a path. A
data viewer can be configured to display data in a grid. A data viewer is a useful debugging tool. For more
information, see Debugging Data Flow.
Set the properties of a path with the Data Flow Path Editor
Paths connect two data flow components. Before you can set path properties, the data flow must contain at least
two connected data flow components.
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you
want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Data Flow tab, and then double-click a path.
4. In Data Flow Path Editor , click General . You can then edit the default name of the path and provide a
description of the path. You can also modify the PathAnnotation property.
5. Click OK .
6. To save the updated package, click Save Selected Items on the File menu.
General Page - Data Flow Path Editor
Use the Data Flow Path Editor dialog box to set path properties, view column metadata, and manage the data
viewers attached to the path.
Use the General node of the Data Flow Path Editor dialog box to name and describe the path, and to specify
the options for path annotation.
Options
Name
Provide a unique name for the path.
ID
The lineage identifier of the path. This property is read-only.
IdentificationString
The string that identifies the path. Automatically generated from the name entered above.
Description
Describe the path.
PathAnnotation
Specify the type of annotation to use. Choose Never to disable annotations, AsNeeded to enable annotation on
demand, SourceName to automatically annotate using the value of the SourceName option, and PathName
to automatically annotate using the value of the Name property.
DestinationName
Displays the input that is the end of the path.
SourceName
Displays the output that is the start of the path.
NOTE
A minus (-) prefix indicates the column is sorted in descending order.
Comparison Flags
Lists the comparison flags that apply to the column.
Source Component
Lists the data flow component that is the source of the column.
Copy to Clipboard
Copy the column metadata to the clipboard. By default, all metadata rows are copied as sorted in the order
currently displayed.
Path properties
The data flow objects in the Microsoft SQL Server Integration Services object model have common properties
and custom properties at the level of the component, inputs and outputs, and input columns and output
columns. Many properties have read-only values that are assigned at run time by the data flow engine.
This topic lists and describes the custom properties of the paths that connect data flow objects.
Custom properties of a path
In the Integration Services object model, a path that connects components in the data flow implements the
IDTSPath100 interface.
The following table describes the configurable properties of the paths in a data flow. The data flow engine also
assigns values to additional read-only properties that are not listed here.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
When an input path is disconnected or if there are any unmapped columns in the path, an error icon is displayed
beside the corresponding data path. To simplify the resolution of column reference errors, the Resolve References
editor allows you to link unmapped output columns with unmapped input columns for all paths in the execution
tree. The Resolve References editor will also highlight the paths to indicate which paths are being resolved.
NOTE
It is possible to edit a component even when its input path is disconnected
After all column references have been resolved, if there are no other data path errors, no error icons will be
displayed beside the data paths.
Options
Unmapped Output Columns (Source)
Columns from the upstream path that are not currently mapped
Mapped Columns (Source)
Columns from the upstream path that are mapped to columns from the downstream path
Mapped Columns (Destination)
Columns from the upstream path that are mapped to columns from the downstream path
Unmapped Input Columns (Destination)
Columns from the downstream path that are not currently mapped
Delete Unmapped Input Columns
Check Delete Unmapped Input Columns to ignore unmapped columns at the destination of the data path. The
Preview Changes button displays a list of the changes that will occur when you press the OK button.
Data Viewer
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
If a path is configured to use a data viewer, the Data Viewer displays the data buffer by buffer as data moves
between two data flow components.
Options
Green arrow
Click to display the data in the next buffer. If the data can be moved in a single buffer, this option is not available.
Detach
Detach the data viewer.
Note Detaching a data viewer does not delete the data viewer. If the data viewer has been detached, data continues
to flow through the path, but the data in the viewer is not updated to match the data in each buffer.
Attach
Attach a data viewer.
Note When the data viewer is attached, it displays information from each buffer in the data flow and then pauses.
You can advance through the buffers by using the green arrow.
Copy Data
Copy data in the current buffer to the Clipboard.
See Also
Debugging Data Flow
Error Handling in Data
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data
Factory
When a data flow component applies a transformation to column data, extracts data from sources,
or loads data into destinations, errors can occur. Errors frequently occur because of unexpected data
values. For example, a data conversion fails because a column contains a string instead of a number,
an insertion into a database column fails because the data is a date and the column has a numeric
data type, or an expression fails to evaluate because a column value is zero, resulting in a
mathematical operation that is not valid.
Errors typically fall into one the following categories:
Data conversion errors, which occur if a conversion results in loss of significant digits, the loss
of insignificant digits, and the truncation of strings. Data conversion errors also occur if the
requested conversion is not supported.
Expression evaluation errors, which occur if expressions that are evaluated at run time
perform invalid operations or become syntactically incorrect because of missing or incorrect
data values.
Lookup errors, which occur if a lookup operation fails to locate a match in the lookup table.
For a list of Integration Services errors, warnings, and other messages, see Integration Services Error
and Message Reference.
For more information, see Data Flow and Integration Services Paths.
Configure Error Output dialog box
Use the Configure Error Output dialog box to configure error handling options for data flow
transformations that support an error output.
To learn more about working with error outputs, see Error Handling in Data.
Options
Input or Output
View the name of the output.
Column
View the output columns that you selected in the transformation editor dialog box.
Error
If applicable, specify what should happen when an error occurs: ignore the failure, redirect the row,
or fail the component.
Related Topics: Error Handling in Data
Truncation
If applicable, specify what should happen when a truncation occurs: ignore the failure, redirect the
row, or fail the component.
Related Topics: Error Handling in Data
Description
View the description of the operation.
Set this value to selected cells
Specify what should happen to all the selected cells when an error or truncation occurs: ignore the
failure, redirect the row, or fail the component.
Apply
Apply the error handling option to the selected cells.
Fail Component The Data Flow task fails when an error or a truncation
occurs. Failure is the default option for an error and a
truncation.
Ignore Failure The error or the truncation is ignored and the data
row is directed to the output of the transformation or
source.
Redirect Row The error or the truncation data row is directed to the
error output of the source, transformation, or
destination.
You can also use the Script component to include the error description and the column name
in additional columns of the error output. For an example, see Enhancing an Error Output
with the Script Component.
Include the error description in an additional column by using a single line of script to
call the GetErrorDescription method of the IDTSComponentMetaData100 interface.
Include the column name in an additional column by using a single line of script to call
the
[Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSComponentMetaData100.GetIdentificati
onStringByID*] (/previous-versions/sql/sql-server-2016/mt657629(v=sql.130))
method of the IDTSComponentMetaData100 interface.
You can add the Script component to the error segment of the data flow anywhere
downstream from the data flow components whose errors you want to capture. Typically you
place the Script component immediately before the error rows are written to a destination.
This way, the script looks up descriptions only for error rows that are written. The error
segment of the data flow may correct some errors and not write those rows to an error
destination.
See Also
Data Flow
Transform Data with Transformations
Connect Components with Paths
Data Flow Task
Data Flow
Data Flow Performance Features
11/2/2020 • 12 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This topic provides suggestions about how to design Integration Services packages to avoid common
performance issues. This topic also provides information about features and tools that you can use to troubleshoot
the performance of packages.
NOTE
The properties discussed in this section must be set separately for each Data Flow task in a package.
You can configure the following properties of the Data Flow task, all of which affect performance:
Specify the locations for temporary storage of buffer data (BufferTempStoragePath property) and of
columns that contain binary large object (BLOB) data (BLOBTempStoragePath property). By default, these
properties contain the values of the TEMP and TMP environment variables. You might want to specify other
folders to put the temporary files on a different or faster hard disk drive, or to spread them across multiple
drives. You can specify multiple directories by delimiting the directory names with semicolons.
Define the default size of the buffer that the task uses, by setting the DefaultBufferSize property, and define
the maximum number of rows in each buffer, by setting the DefaultBufferMaxRows property. Set the
AutoAdjustBufferSize property to indicate whether the default size of the buffer is calculated automatically
from the value of the DefaultBufferMaxRows property. The default buffer size is 10 megabytes, with a
maximum buffer size of 2^31-1 bytes. The default maximum number of rows is 10,000.
Set the number of threads that the task can use during execution, by setting the EngineThreads property.
This property provides a suggestion to the data flow engine about the number of threads to use. The
default is 10, with a minimum value of 3. However, the engine will not use more threads than it needs,
regardless of the value of this property. The engine may also use more threads than specified in this
property, if necessary to avoid concurrency issues.
Indicate whether the Data Flow task runs in optimized mode (RunInOptimizedMode property). Optimized
mode improves performance by removing unused columns, outputs, and components from the data flow.
NOTE
A property with the same name, RunInOptimizedMode, can be set at the project level in SQL Server Data Tools
(SSDT) to indicate that the Data Flow task runs in optimized mode during debugging. This project property overrides
the RunInOptimizedMode property of Data Flow tasks at design time.
NOTE
When you run a package in SQL Server Data Tools (SSDT), the Progress tab of SSIS Designer lists warnings. These warnings
include identifying any data column that a source makes available to the data flow, but is not subsequently used by
downstream data flow components. You can use the RunInOptimizedMode property to remove these columns
automatically.
Related Tasks
Sort Data for the Merge and Merge Join Transformations
Related Content
Ar ticles and Blog Posts
Technical article, SQL Server 2005 Integration Services: A Strategy for Performance, on
technet.microsoft.com
Technical article, Integration Services: Performance Tuning Techniques, on technet.microsoft.com
Technical article, Increasing Throughput of Pipelines by Splitting Synchronous Transformations into Multiple
Tasks, in SQLCAT's Guide to BI and Analytics
Technical article, The Data Loading Performance Guide, on msdn.microsoft.com.
Technical article, We Loaded 1TB in 30 Minutes with SSIS, and So Can You, on msdn.microsoft.com.
Technical article, Top 10 SQL Server Integration Services Best Practices, on sqlcat.com.
Technical article and sample, The "Balanced Data Distributor" for SSIS, on sqlcat.com.
Blog post, Troubleshooting SSIS Package Performance Issues, on blogs.msdn.com
Videos
Video series, Designing and Tuning for Performance your SSIS packages in the Enterprise (SQL Video
Series)
Video, Tuning Your SSIS Package Data Flow in the Enterprise (SQL Server Video), on technet.microsoft.com
Video, Understanding SSIS Data Flow Buffers (SQL Server Video), on technet.microsoft.com
Video, Microsoft SQL Server Integration Services Performance Design Patterns, on channel9.msdn.com.
Presentation, How Microsoft IT Leverages SQL Server 2008 SSIS Dataflow Engine Enhancements, on
sqlcat.com.
Video, Balanced Data Distributor, on technet.microsoft.com.
See Also
Troubleshooting Tools for Package Development
Troubleshooting Tools for Package Execution
Source Assistant
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Source Assistant component helps create a source component and connection manager. The component is
located in the Favorites section of the SSIS Toolbox.
NOTE
Source Assistant replaces the Integration Services Connections project and the corresponding wizard.
O P T IO N DESC RIP T IO N
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Destination Assistant component helps create a destination component and connection manager. The
component is located in the Favorites section of the SSIS Toolbox.
NOTE
Destination Assistant replaces the Integration Services Connections project and the corresponding wizard.
O P T IO N DESC RIP T IO N
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The ADO NET source consumes data from a .NET provider and makes the data available to the data flow.
You can use the ADO NET source to connect to Microsoft Azure SQL Database. Connecting to SQL Database by
using OLE DB is not supported. For more information about SQL Database, see General Guidelines and Limitations
(Azure SQL Database).
NOTE
If the Type System Version property for the ADO.NET connection manager is set to SQL Ser ver 2005 , the system
converts the SQL Server date data types to DT_WSTR.
The system converts user-defined data types (UDTs) to Integration Services binary large objects (BLOB) when the
ADO.NET connection manager specifies the provider as the .NET Data Provider for SQL Server (SqlClient). The
system applies the following rules when it converts the UDT data type:
If the data is a non-large UDT, the system converts the data to DT_BYTES.
If the data is a non-large UDT, and the Length property of the column on the database is set to -1 or a value
greater than 8,000 bytes, the system converts the data to DT_IMAGE.
If the data is a large UDT, the system converts the data to DT_IMAGE.
NOTE
If the ADO NET source is not configured to use error output, the system streams the data to the DT_IMAGE column
in chunks of 8,000 bytes. If the ADO NET source is configured to use error output, the system passes the whole
array of bytes to the DT_IMAGE column. For more information about how to configure components to use error
output, see Error Handling in Data.
For more information about the Integration Services data types, supported data type conversions, and data type
mapping across certain databases including SQL Server, see Integration Services Data Types.
For information about mapping Integration Services data types to managed data types, see Working with Data
Types in the Data Flow.
NOTE
When you use an SQL statement to invoke a stored procedure that returns results from a temporary table, use the WITH
RESULT SETS option to define metadata for the result set.
NOTE
If you use an SQL statement to execute a stored procedure and the package fails with the following error, you may be able
to resolve the error by adding the SET FMTONLY OFF statement before the exec statement.
Column <column_name> cannot be found at the datasource.
The ADO NET source uses an ADO.NET connection manager to connect to a data source, and the connection
manager specifies the .NET provider. For more information, see ADO.NET Connection Manager.
The ADO NET source has one regular output and one error output.
You can set properties through SSIS Designer or programmatically.
For more information about the properties that you can set in the Advanced Editor dialog box or
programmatically, click one of the following topics:
Common Properties
ADO NET Custom Properties
For more information about how to set properties, see Set the Properties of a Data Flow Component.
ADO NET Source Editor (Connection Manager Page)
Use the Connection Manager page of the ADO NET Source Editor dialog box to select the ADO.NET
connection manager for the source. This page also lets you select a table or view from the database.
To learn more about the ADO NET source, see ADO NET Source.
To open the Connection Manager page
1. In SQL Server Data Tools (SSDT), open the Integration Services package that has the ADO NET source.
2. On the Data Flow tab, double-click the ADO NET source.
3. In the ADO NET Source Editor , click Connection Manager .
Static Options
ADO.NET connection manager
Select an existing connection manager from the list, or create a new connection by clicking New .
New
Create a new connection manager by using the Configure ADO.NET Connection Manager dialog box.
Data access mode
Specify the method for selecting data from the source.
O P T IO N DESC RIP T IO N
Table or view Retrieve data from a table or view in the ADO.NET data
source.
SQL command Retrieve data from the ADO.NET data source by using a SQL
query.
Preview
Preview results by using the Data View dialog box. Preview can display up to 200 rows.
NOTE
When you preview data, columns with a CLR user-defined type do not contain data. Instead the values <value too big to
display> or System.Byte[] display. The former displays when the data source is accessed by using the ADO.NET provider, the
latter when using the SQL Server Native Client provider.
See Also
DataReader Destination
ADO NET Destination
Data Flow
ADO NET Destination
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The ADO NET destination loads data into a variety of ADO.NET-compliant databases that use a database table or
view. You have the option of loading this data into an existing table or view, or you can create a new table and load
the data into the new table.
You can use the ADO NET destination to connect to Microsoft Azure SQL Database. Connecting to SQL Database by
using OLE DB is not supported. For more information about SQL Database, see General Guidelines and Limitations
(Azure SQL Database).
NOTE
SQL Server does not support inserting text into columns whose data type is set to image. For more information about SQL
Server data types, see Data Types (Transact-SQL).
NOTE
The ADO NET destination does not support mapping an input column whose type is set to DT_DBTIME to a database
column whose type is set to datetime. For more information about Integration Services data types, see Integration Services
Data Types.
The ADO NET destination has one regular input and one error output.
You can set properties through SSIS Designer or programmatically.
The Advanced Editor dialog box reflects the properties that can be set programmatically. For more information
about the properties that you can set in the Advanced Editor dialog box or programmatically, click one of the
following topics:
Common Properties
ADO NET Custom Properties
For more information about how to set properties, see Set the Properties of a Data Flow Component.
NOTE
When you click New , Integration Services generates a default CREATE TABLE statement based on the connected data source.
This default CREATE TABLE statement will not include the FILESTREAM attribute even if the source table includes a column
with the FILESTREAM attribute declared. To run an Integration Services component with the FILESTREAM attribute, first
implement FILESTREAM storage on the destination database. Then, add the FILESTREAM attribute to the CREATE TABLE
statement in the Create Table dialog box. For more information, see Binary Large Object (Blob) Data (SQL Server).
Preview
Preview results by using the Preview Quer y Results dialog box. Preview can display up to 200 rows.
Use bulk inser t when available
Specify whether to use the SqlBulkCopy interface to improve the performance of bulk insert operations.
Only ADO.NET providers that return a SqlConnection object support the use of the SqlBulkCopy interface. The .NET
Data Provider for SQL Server (SqlClient) returns a SqlConnection object, and a custom provider may return a
SqlConnection object.
You can use the .NET Data Provider for SQL Server (SqlClient) to connect to Microsoft Azure SQL Database.
If you select Use bulk inser t when available , and set the Error option to Redirect the row , the batch of data
that the destination redirects to the error output may include good rows.For more information about handling
errors in bulk operations, see Error Handling in Data. For more information about the Error option, see .
ADO N ET Destination Edit or ( Error O utput Page)
NOTE
If a SQL Server or Sybase source table includes an identity column, you must use Execute SQL tasks to enable
IDENTITY_INSERT before the ADO NET destination and to disable it again afterward. (The identity column property specifies
an incremental value for the column. The SET IDENTITY_INSERT statement lets explicit values from the source table be
inserted into the identity column in the destination table.)
To run the SET IDENTITY_INSERT statements and the data loading successfully, you have to do the following things.
1. Use the same ADO.NET connection manager for the Execute SQL tasks and for the ADO.NET destination.
2. On the connection manager, set the RetainSameConnection property and the MultipleActiveResultSets property to
True.
3. On the ADO.NET destination, set the UseBulkInser tWhenPossible property to False.
For more information, see SET IDENTITY_INSERT (Transact-SQL) and IDENTITY (Property) (Transact-SQL).
External Resources
Technical article, Loading data to Azure SQL Database the fast way, on sqlcat.com
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Source Custom Proper ties
The ADO NET source has both custom properties and the properties common to all data flow components.
The following table describes the custom properties of the ADO NET source. All properties are read/write.
The output and the output columns of the ADO NET source have no custom properties.
For more information, see ADO NET Source.
Destination Custom Proper ties
The ADO.NET destination has both custom properties and the properties common to all data flow components.
The following table describes the custom properties of the ADO.NET destination. All properties are read/write.
These properties are not available in the ADO NET Destination Editor , but can be set by using the Advanced
Editor .
See Also
Common Properties
Azure Blob Source
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Azure Blob Source component enables an SSIS package to read data from an Azure blob. The supported file
formats are: CSV and AVRO.
To see the editor for the Azure Blob Source, drag and drop Azure Blob Source on the data flow designer and
double-click it to open the editor).
The Azure Blob Source is a component of the SQL Server Integration Services (SSIS) Feature Pack for Azure.
1. For the Azure storage connection manager field, specify an existing Azure Storage Connection Manager
or create a new one that refers to an Azure Storage Account.
2. For the Blob container name field, specify the name of the blob container that contains source files.
3. For the Blob name field, specify the path for the blob.
4. For the Blob file format field, select the blob format you want to use, Text or Avro .
5. If the file format is Text , you must specify the Column delimiter character value. (Multi-character
delimiters are not supported.)
Also select Column names in the first data row if the first row in the file contains column names.
6. If the file is compressed, select Decompress the file .
7. If the file is compressed, select the Compression type : GZIP , DEFL ATE , or BZIP2 . Note that the Zip format
is not supported.
8. After you specify the connection information, switch to the Columns page to map source columns to
destination columns for the SSIS data flow.
Azure Blob Destination
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Azure Blob Destination component enables an SSIS package to write data to an Azure blob. The supported
file formats are: CSV and AVRO.
Drag-drop Azure Blob Destination to the data flow designer and double-click it to see the editor).
The Azure Blob Destination is a component of the SQL Server Integration Services (SSIS) Feature Pack for Azure.
1. For the Azure storage connection manager field, specify an existing Azure Storage Connection Manager
or create a new one that refers to an Azure Storage Account.
2. For the Blob container name field, specify the name of the blob container that contains source files.
3. For the Blob name field, specify the path for the blob.
4. For the Blob file format field, specify the blob format you want to use.
5. If the file format is CSV, you must specify the Column delimiter character value. Also select Column
names in the first data row if the first row in the file contains column names.
6. After specifying the connection information, switch to the Columns page to map source columns to
destination columns for the SSIS data flow.
Azure Data Lake Store Source
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Azure Data Lake Store Source component enables an SSIS package to read data from an Azure Data Lake
Store. The supported file formats are: Text and Avro.
The Azure Data Lake Store Source is a component of the SQL Server Integration Services (SSIS) Feature Pack
for Azure.
NOTE
To ensure that the Azure Data Lake Store Connection Manager and the components that use it - that is, the Azure Data Lake
Store Source and the Azure Data Lake Store Destination - can connect to services, make sure you download the latest version
of the Azure Feature Pack here.
Text qualifier
The Azure Data Lake Store Source does not support a text qualifier. If you have to specify a text qualifier to
process your files correctly, consider downloading the files to your local computer and processing the files with the
Flat File Source . The Flat File Source lets you specify a text qualifier. For more info, see Flat File Source.
Azure Data Lake Store Destination
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Azure Data Lake Store Destination component enables an SSIS package to write data to an Azure Data
Lake Store. The supported file formats are: Text, Avro, and ORC.
The Azure Data Lake Store Destination is a component of the SQL Server Integration Services (SSIS) Feature
Pack for Azure.
NOTE
To ensure that the Azure Data Lake Store Connection Manager and the components that use it - that is, the Azure Data Lake
Store Source and the Azure Data Lake Store Destination - can connect to services, make sure you download the latest version
of the Azure Feature Pack here.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Flexible File Source component enables an SSIS package to read data from various supported storage
services. Currently supported storage services are
Azure Blob Storage
Azure Data Lake Storage Gen2
To see the editor for the Flexible File Source, drag and drop Flexible File Source on the data flow designer and
double-click it to open the editor.
The Flexible File Source is a component of the SQL Server Integration Services (SSIS) Feature Pack for Azure.
Following properties are available on the Flexible File Source Editor .
File Connection Manager Type: Specifies the source connection manager type. Then choose an existing one
of the specified type or create a new one.
Folder Path: Specifies the source folder path.
File Name: Specifies the source file name.
File Format: Specifies the source file format. Supported formats are Text , Avro , ORC , Parquet . Java is
required for ORC/Parquet. See here for details.
Column delimiter character : Specifies the character used as column delimiter (multi-character delimiters are
not supported).
First row as the column name: Specifies whether to treat first row as column names.
Decompress the file: Specifies whether to decompress the source file.
Compression Type: Specifies the source file compression format. Supported formats are GZIP , DEFL ATE ,
BZIP2 .
Following properties are available on the Advanced Editor .
rowDelimiter : The character used to separate rows in a file. Only one character is allowed. The default value is
\r\n.
escapeChar : The special character used to escape a column delimiter in the content of input file. You cannot
specify both escapeChar and quoteChar for a table. Only one character is allowed. No default value.
quoteChar : The character used to quote a string value. The column and row delimiters inside the quote
characters would be treated as part of the string value. This property is applicable to both input and output
datasets. You cannot specify both escapeChar and quoteChar for a table. Only one character is allowed. No
default value.
nullValue: One or more characters used to represent a null value. The default value is \N.
encodingName: Specify the encoding name. See Encoding.EncodingName Property.
skipLineCount: Indicates the number of non-empty rows to skip when reading data from input files. If both
skipLineCount and firstRowAsHeader are specified, the lines are skipped first and then the header information is
read from the input file.
treatEmptyAsNull: Specifies whether to treat null or empty string as a null value when reading data from an
input file. The default value is True.
After you specify the connection information, switch to the Columns page to map source columns to destination
columns for the SSIS data flow.
Notes on Ser vice Principal Permission Configuration
For Test Connection to work (either blob storage or Data Lake Storage Gen2), the service principal should be
assigned at least Storage Blob Data Reader role to the storage account. This is done with RBAC.
For blob storage, read permission is granted by assigning at least Storage Blob Data Reader role.
For Data Lake Storage Gen2, permission is determined by both RBAC and ACLs. Pay attention that ACLs are
configured using the Object ID (OID) of the service principal for the app registration as detailed here. This is
different from the Application (client) ID that is used with RBAC configuration. When a security principal is granted
RBAC data permissions through a built-in role, or through a custom role, these permissions are evaluated first
upon authorization of a request. If the requested operation is authorized by the security principal's RBAC
assignments, then authorization is immediately resolved and no additional ACL checks are performed. Alternatively,
if the security principal does not have an RBAC assignment, or the request's operation does not match the assigned
permission, then ACL checks are performed to determine if the security principal is authorized to perform the
requested operation. For read permission, grant at least Execute permission starting from the source file system,
along with Read permission for the files to read. Alternatively, grant at least the Storage Blob Data Reader role
with RBAC. See this article for details.
Flexible File Destination
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Flexible File Destination component enables an SSIS package to write data to various supported storage
services.
Currently supported storage services are
Azure Blob Storage
Azure Data Lake Storage Gen2
Drag-drop Flexible File Destination to the data flow designer and double-click it to see the editor.
The Flexible File Destination is a component of the SQL Server Integration Services (SSIS) Feature Pack for
Azure.
Following properties are available on the Flexible File Destination Editor .
File Connection Manager Type: Specifies the source connection manager type. Then choose an existing one
of the specified type or create a new one.
Folder Path: Specifies the destination folder path.
File Name: Specifies the destination file name.
File Format: Specifies the destination file format. Supported formats are Text , Avro , ORC , Parquet . Java is
required for ORC/Parquet. See here for details.
Column delimiter character : Specifies the character to use as column delimiter (multi-character delimiters
are not supported).
First row as the column name: Specifies whether to write column names to first row.
Compress the file: Specifies whether to compress the file.
Compression Type: Specifies the compression format to use. Supported formats are GZIP , DEFL ATE , BZIP2 .
Compression Level: Specifies the compression level to use.
Following properties are available on the Advanced Editor .
rowDelimiter : The character used to separate rows in a file. Only one character is allowed. The default value is
\r\n.
escapeChar : The special character used to escape a column delimiter in the content of input file. You cannot
specify both escapeChar and quoteChar for a table. Only one character is allowed. No default value.
quoteChar : The character used to quote a string value. The column and row delimiters inside the quote
characters would be treated as part of the string value. This property is applicable to both input and output
datasets. You cannot specify both escapeChar and quoteChar for a table. Only one character is allowed. No
default value.
nullValue: One or more characters used to represent a null value. The default value is \N.
encodingName: Specify the encoding name. See Encoding.EncodingName Property.
skipLineCount: Indicates the number of non-empty rows to skip when reading data from input files. If both
skipLineCount and firstRowAsHeader are specified, the lines are skipped first and then the header information is
read from the input file.
treatEmptyAsNull: Specifies whether to treat null or empty string as a null value when reading data from an
input file. The default value is True.
After specifying the connection information, switch to the Columns page to map source columns to destination
columns for the SSIS data flow.
Notes on Ser vice Principal Permission Configuration
For Test Connection to work (either blob storage or Data Lake Storage Gen2), the service principal should be
assigned at least Storage Blob Data Reader role to the storage account. This is done with RBAC.
For blob storage, write permission is granted by assigning at least Storage Blob Data Contributor role.
For Data Lake Storage Gen2, permission is determined by both RBAC and ACLs. Pay attention that ACLs are
configured using the Object ID (OID) of the service principal for the app registration as detailed here. This is
different from the Application (client) ID that is used with RBAC configuration. When a security principal is granted
RBAC data permissions through a built-in role, or through a custom role, these permissions are evaluated first
upon authorization of a request. If the requested operation is authorized by the security principal's RBAC
assignments, then authorization is immediately resolved and no additional ACL checks are performed. Alternatively,
if the security principal does not have an RBAC assignment, or the request's operation does not match the assigned
permission, then ACL checks are performed to determine if the security principal is authorized to perform the
requested operation. For write permission, grant at least Execute permission starting from the sink file system,
along with Write permission for the sink folder. Alternatively, grant at least the Storage Blob Data Contributor
role with RBAC. See this article for details.
CDC Flow Components
11/2/2020 • 12 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Change Data Capture Components by Attunity for Microsoft SQL Server 2017 Integration Services (SSIS) help
SSIS developers work with CDC and reduce the complexity of CDC packages.
The SSIS CDC components are designed to work with the SQL Server 2019 (15.x) CDC feature where the source
tables are either the same SQL Server 2019 (15.x) database or an Oracle database (when using the Oracle CDC
Service for SQL Server 2019 (15.x)). Partitioned tables are supported.
The components include Control and Data Flow components that streamline the experience of reading and
processing change data in SSIS packages. The components can be added to the component library in Microsoft
SQL Server 2019 (15.x), but are installed separately.
The following are the Change Data Capture Components by Attunity:
CDC Control Flow Component :
CDC Control Task
CDC Data Flow Components :
CDC Source
CDC Splitter
Installation
This section describes the installation procedures for the CDC Components for Microsoft SQL Server 2017
Integration Services (SSIS).
The CDC Components for SSIS are packaged with the Microsoft® Change Data Capture Designer and Service for
Oracle by Attunity for Microsoft SQL Server®. This download is part of the SQL Server Feature Pack. Download
components of the Feature Pack from the SQL Server 2016 Feature Pack web page.
Version Support
SQL Server version support
The CDC components for SSIS are supported on all the supported versions of Microsoft SQL Server. Currently, the
supported versions of SQL Server include SQL Server 2012 through SQL Server 2017.
Operating system version support
The CDC components for SSIS are supported on the following operating systems and platforms:
Windows 8 and 8.1
Windows 10
Windows Server 2012 and 2012 R2
Windows Server 2016
Running the Installation Program
Before you run the installation wizard, be sure that the SQL Server 2019 (15.x)SQL Server Data Tools is closed. Then
follow the directions in the installation wizard.
Restart SSIS Service
After you install the CDC components, you must restart the SSIS service to be sure that the components work
correctly when developing packages in the SQL SQL Server Data Tools.
A message is displayed after you install the components. Click Yes when prompted.
Uninstalling the Microsoft CDC Components
You uninstall the CDC source, CDC splitter, or CDC Control task, by using the uninstall wizard. If you are using the
SQL Server 2019 (15.x)SQL Server Data Tools for package development, make sure the SQL Server Data Tools is
closed before running the uninstall wizard.
Benefits
The CDC Components for SQL Server 2019 (15.x)Integration Services components allow SSIS developers to easily
build SSIS packages that process change data. These components enhance the ability of SSIS developers to deal
with CDC and reduce the complexity of CDC packages.
The SSIS CDC components are used to provide the change data in a way that is easy to further process it for
replication, loading a data warehouse, updating slowly changing dimensions for OLAP, auditing changes, or for
additional possible uses. The type of further processing used is determined by the SSIS developer.
The SSIS CDC components are designed to work with the SQL Server 2019 (15.x) CDC feature with change tables
that are in the same SQL Server 2019 (15.x) database.
This SQL Server 2019 (15.x)Integration Services Control Flow contains two CDC Control Tasks and the Data Flow
task. The first task called Get CDC Processing Range establishes the LSN range for the changes that are
processed in the data-flow task called Process Changes . This range is established based on what was processed
during the last package run and was saved in a persistent store.
For more information about using the CDC Control Task, see CDC Control Task and CDC Control Task Editor.
The following figure shows the Process Changes data flow, which conceptually shows how the changes are
processes.
The steps illustrated in this figure are:
Changes for Table X is a CDC source that reads changes made to table X that were made in the CDC
processing range determined in the parent control flow.
CDC Splitter X is used to split the changes into inserts, deletes, and updates. In this scenario, it is assumed
that the CDC Source is configured to produce Net changes so that different change types can be processed
in parallel.
The specific changes are then further processed downstream. In this illustration, the changes are inserted
into tables using multiple ODBC Destinations but in actual cases the processing may be different.
For more information about the CDC Source, see:
CDC Source
CDC Source Editor (Connection Manager Page)
CDC Source Editor (Columns Page)
CDC Source Editor (Error Output Page)
For more information about the CDC Splitter, see:
CDC Splitter
One of the basic issues that require attention when building CDC packages is how the change processing interacts
with the initial loading (or initial processing) of the data.
The CDC components support three distinct initial loading and change processing scenarios:
Initial loading done with a database snapshot. In this case, change processing starts with the LSN of the
snapshot event.
Initial loading from a quiescent database. In this case, no changes are made during initial loading so the
current LSN is sampled at sometime during the initial load and change processing starts with that LSN.
Initial loading from an active database. In this case, as the initial load is in progress, changes are made to the
database and there is no single LSN from which change processing can be precisely started. In this case, the
initial load package developer can sample the source database current LSN before and after the initial load.
Then, when processing changes, care should be taken when processing changes made in parallel to the
initial load as some of the processed changes are already seen in the initial load (for example, an Insert
change may fail with a duplicate key error because the inserted row was read by the initial load process).
The following figure shows an SSIS package that could handle the first two scenarios:
The following figure shows an SSIS package that could handle the third scenario:
Following the initial load package, a trickle-feed update package is run repeatedly according to a schedule to
process changes as they become available for consumption.
Passing the state of the CDC processing from the initial load package to the trickle feed package and between
different tasks within each package occurs by means of a special SSIS package string variable. The value of this
variable is referred to as the CDC State, which reflects the current state of CDC processing for the groups of tables
being handled by the initial load and trickle-feed packages.
The value of the CDC State variable needs to be maintained in persistent storage. It should be read before starting
CDC processing and should be saved with the current state after processing completed. The task of loading and
storing of the CDC state can be handled by the SSIS developer but the CDC Control component can automate this
task by maintaining the CDC State value in a database table.
Security Considerations
This section lists some security considerations related to the use of the CDC components in SSIS.
Access Authorization to Change Data
Trickle-feed update packages need access to SQL Server 2019 (15.x) CDC functions. Such access is granted, by
default, to members of the db_owner fixed database role. Because the db_owner is a powerful role, when
defining capture instances within SQL Server 2019 (15.x) it is recommended to associate a gating security role to
each capture instance that allows the SSIS CDC package to use a much more restricted user for processing the
changes.
Access to CDC Database Current LSN
The CDC Control task operations for marking the start LSN for change processing must be able to find the CDC
Database current LSN. The components find the LSN by using the procedure sp_replincrementlsn from the
master database. Execute permission on this procedure must be given to the login used for connecting to the SQL
Server 2019 (15.x) CDC database.
Access to CDC States Table
The CDC States table is used for automatically persisting CDC States that need to be updatable by the login used for
connecting to the SQL Server 2019 (15.x) CDC database. As this table is created by the SSIS developer, set the SQL
Server 2019 (15.x) system administrator as a user who is authorized to create SQL Server 2019 (15.x) databases
and perform administrative and maintenance tasks. In addition, a SQL Server 2019 (15.x) system administrator
who works with CDC enabled databases must be knowledgeable about SQL Server 2019 (15.x) CDC technology
and implementation.
CDC State
Each CDC group has a state associated with it, which is represented by a string with a specific format. For more
information, see CDC Control Task. The following table shows the possible CDC state values.
0-(INITIAL) The state that exists before any packages are run on the
current CDC group. This is also the state when the CDC state
is empty.
1-ILSTART (Initial-Load-Started) This is the state that exists when the initial load package
starts. This occurs after the MarkInitialLoadStar t operation
call to the CDC Control task.
2- ILEND (Initial-Load-Ended) This is the state that exists when the initial load package ends
successfully. This occurs after the MarkInitialLoadEnd
operation call to the CDC Control task.
3-ILUPDATE (Initial Load Update) This is the state that exists after the first run of the Update
package after the initial load while still processing the initial
processing range. This occurs after the GetProcessingRange
operation call to the CDC control task.
4-TFEND (Trickle-Feed-Update-Ended) This is the state expected for regular CDC runs. It indicates
that the previous run completed successfully and that a new
run with a new processing range can be started.
5-TFSTART (Trickle-Feed-Update-Started) This is the state that exists on subsequent runs of the Update
package after the GetProcessingRange operation call to the
CDC control task.
Once the Initial Load package runs successfully, the Trickle-Feed Update package runs repeatedly under a
predetermined schedule to process changes to the source tables. Each run of the Trickle-Feed Update package is a
CDC run.
In This Section
CDC Source
CDC Splitter
Related Tasks
Direct the CDC Stream According to the Type of Change
Define a State Variable
Related Content
Blog entry, CDC in SSIS for SQL Server 2012, on mattmasson.com.
Blog entry on setting up the CDC service, CDC for Oracle in SQL Server 2012, on blogs.msdn.com.
Technical article, Installing Microsoft SQL Server 2012 Change Data Capture for Oracle by Attunity, on
social.technet.microsoft.com.
Technical article, Troubleshoot Configuration Issues in Microsoft Change Data Capture for Oracle by Attunity,
on social.technet.microsoft.com.
Technical article, Troubleshoot CDC Instance Errors in Microsoft Change Data Capture for Oracle by Attunity,
on social.technet.microsoft.com.
Video, CDC for Oracle Databases using SQL Server Integration Services 2012 (SQL Server Video), on
technet.microsoft.com.
See Also
CDC Control Task
CDC Source
11/2/2020 • 9 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The CDC source reads a range of change data from SQL Server 2019 (15.x) change tables and delivers the
changes downstream to other SSIS components.
The range of change data read by the CDC source is called the CDC Processing Range and is determine by the
CDC Control task that is executed before the current data flow starts. The CDC Processing Range is derived from
the value of a package variable that maintains the state of the CDC processing for a group of tables.
The CDC source extracts data from a SQL Server database by using a database table, a view, or an SQL
statement.
The CDC source uses the following configurations:
A SQL Server ADO.NET connection manager to access the SQL Server CDC database. For more
information about configuring the CDC source connection, see .
CDC Source Edit or ( Connection Manager Page)
Error Handling
The CDC source has an error output. The component error output includes the following output columns:
Error Code : The value is always -1.
Error Column : The source column causing the error (for conversion errors).
Error Row Columns : The record data that causes the error.
Depending on the error behavior setting, the CDC source supports returning errors (data conversion, truncation)
that occur during the extraction process in the error output.
use <cdc-enabled-database-name>
declare @start_lsn binary(10), @end_lsn binary(10)
set @start_lsn = sys.fn_cdc_increment_lsn(
convert(binary(10),'0x' + '<value-from-state-cs>', 1))
set @end_lsn =
convert(binary(10),'0x' + '<value-from-state-ce>', 1)
select * from cdc.fn_cdc_get_net_changes_dbo_Table1(@start_lsn,
@end_lsn, '<mode>')
where:
<cdc-enabled-database-name> is the name of the SQL Server database containing the change tables.
<value-from-state-cs> is the value that appears in the CDC state variable as CS/<value-from-state-cs>/
(CS stands for Current-processing-range-Start).
<value-from-state-ce> is the value that appears in the CDC state variable as CE/<value-from-state-cs>/
(CE stands for Current-processing-range-End).
<mode> are the CDC processing modes. The processing modes have one of the following values All , All
with Old Values , Net , Net with Update Mask , Net with Merge .
This script helps isolate problems by reproducing them in the SQL Server Management Studio, where it is easy
to reproduce and identify errors.
SQL Server Error Message
The following message may be returned by SQL Server:
An insufficient number of arguments were supplied for the procedure or function
cdc.fn_cdc_get_net_changes_<..>.
This error does not indicate that an argument is missing. It means that the start or end LSN values in the CDC
state variable are invalid.
The Advanced Editor dialog box contains the properties that can be set programmatically.
To open the Advanced Editor dialog box:
In the Data Flow screen of your SQL Server 2017 Integration Services (SSIS) project, right click the CDC
source and select Show Advanced Editor .
For more information about the properties that you can set in the Advanced Editor dialog box, see CDC Source
Custom Properties.
In This Section
CDC Source Custom Properties
Extract Change Data Using the CDC Source
NOTE
For all Net change options, the source table must have a primary key or unique index. For tables without a primary key or
unique indes, you must yse the All option.
Related Content
Blog entry, Processing Modes for the CDC Source, on mattmasson.com.
CDC Source Custom Properties
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The following table describes the custom properties of the CDC source. All properties are read/write.
For more information about the CDC source, see CDC Source.
Extract Change Data Using the CDC Source
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To add and configure a CDC source, the package must already include at least one Data Flow task and a CDC
Control task.
For more information about the CDC Control task, see CDC Control Task.
For more information about the CDC source, see CDC Source.
To extract change data using a CDC source
1. In SQL Server Data Tools, open the SQL Server 2017 Integration Services (SSIS) project that contains the
package you want.
2. In the Solution Explorer, double-click the package to open it.
3. Click the Data Flow tab, and then from the Toolbox , drag the CDC source to the design surface.
4. Double-click the CDC source.
5. In the CDC Source Editor dialog box, on the Connection Manager page, select an existing ADO.NET
connection manager from the list, or click New to create a new connection. The connection should be to a
SQL Server database that contains the change tables to read.
6. Select the CDC table where you want to process changes.
7. Select or type in the name of the CDC capture instance with the CDC table to be read.
A captured source table can have one or two captured instances to handle seamless transitioning of table
definition through schema changes. If more than one capture instance is defined for the source table being
captured, select the capture instance you want to use here. The default capture instance name for a table
[schema].[table] is <schema>_<table> but that actual capture instance names in use may be different. The
actual table that is read from is the CDC table cdc .<capture-instance>_CT .
8. Select the processing mode that best handles your processing needs. The possible options are:
All : Returns the changes in the current CDC range without the Before Update values.
All with old values : Returns the changes in the current CDC processing range including the old
values (Before Update ). For each Update operation, there will be two rows, one with the before-
update values and one with the after-update value.
Net : Returns only one change row per source row modified in the current CDC processing range. If a
source row was updated multiple times, the combined change is produced (for example,
insert+update is produced as a single update and update+delete is produced as a single delete).
When working in Net change processing mode, it is possible to split the changes to Delete, Insert and
Update outputs and handle them in parallel because the single source row appears in more than one
output.
Net with update mask : This mode is similar to the regular Net mode but it also adds boolean
columns with the name pattern __$<column-name>__Changed that indicate changed columns in
the current change row.
Net with merge : This mode is similar to the regular Net mode but with Insert and Update
operations merged into a single Merge operation (UPSERT).
9. Select the SSIS string package variable that maintains the CDC state for the current CDC context. For more
information about the CDC state variable, see Define a State Variable.
10. Select the Include reprocessing indicator column check box to create a special output column called
__$reprocessing . This column has a value of true when the CDC processing range overlaps with the initial
processing range (the range of LSNs corresponding to the period of initial load) or when a CDC processing
range is reprocessed following an error in a previous run. This indicator column lets the SSIS developer
handle errors differently when reprocessing changes (for example, actions such as a delete of a non-existing
row and an insert that failed on a duplicate key can be ignored).
For more information, see CDC Source Custom Properties.
11. To update the mapping between external and output columns, click Columns and select different columns
in the External Column list.
12. Optionally update the values of the output columns by deleting values in the Output Column list.
13. To configure the error output, click Error Output .
14. You can click Preview to view up to 200 rows of data extracted by the CDC source.
15. Click OK .
See Also
CDC Source Editor (Connection Manager Page)
CDC Source Editor (Columns Page)
CDC Source Editor (Error Output Page)
CDC Splitter
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The CDC splitter splits a single flow of change rows from a CDC source data flow into different data flows for
Insert, Update and Delete operations. The data flow is split based on the required column __$operation and its
standard values in SQL Server 2019 (15.x) change tables.
Other Error
You can use the splitter to connect to pre-defined INSERT, DELETE, and UPDATE outputs for further processing.
The CDC Splitter transformation has one regular input and one error output.
Error Handling
The CDC Splitter transformation has an error output. Input rows with an invalid value of the $operation column
are considered erroneous and are handled according to the ErrorRowDisposition property of the input.
The component error output includes the following output columns:
Error Code : Set to 1.
Error Column : The source column causing the error (for conversion errors).
Error Row Columns : The input columns of the row that caused the error.
See Also
Direct the CDC Stream According to the Type of Change
Direct the CDC Stream According to the Type of
Change
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To add and configure a CDC splitter Transformation, the package must contain at least one Data Flow task and a
CDC source.
The CDC source added to the package must have a NetCDC processing mode selected. For more information on
selecting processing modes, see CDC Source Editor (Connection Manager Page).
To direct the CDC stream according to the type of change
1. In SQL Server Data Tools, open the SQL Server 2017 Integration Services (SSIS) project that contains the
package you want.
2. In the Solution Explorer, double-click the package to open it.
3. Click the Data Flow tab, and then from the Toolbox , drag the CDC splitter to the design surface.
4. Connect the CDC source that is included in the package to the CDC Splitter.
5. Connect the CDC splitter to one or more destinations. You can connect up to three different outputs.
6. Select one of the following outputs:
Delete output: The output where DELETE change rows are directed.
Insert output: The output where INSERT change rows are directed.
Update output: The output where before/after UPDATE change rows and Merge change rows are
directed.
7. Optionally, you can configure the advanced properties using the Advanced Editor dialog box.
The Advanced Editor dialog box contains the properties that can be set programmatically.
To open the Advanced Editor dialog box:
In the Data Flow screen of your SQL Server 2017 Integration Services (SSIS) project, right click the CDC
splitter and select Show Advanced Editor .
For more information about using the CDC splitter see CDC Components for Microsoft SQL Server
Integration Services.
See Also
CDC Splitter
Define a State Variable
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This procedure describes how to define a package variable where the CDC state is stored.
The CDC state variable is loaded, initialized, and updated by the CDC Control task and is used by the CDC Source
data flow component to determine the current processing range for change records. The CDC state variable can
be defined on any container common to the CDC Control task and the CDC source. This may be at the package
level but may also be on other containers such as a loop container.
Manually modifying the CDC state variable value is not recommended, however it can be useful to understand its
contents.
The following table provides a high-level description of the components of the CDC state variable value.
C O M P O N EN T DESC RIP T IO N
<cs-lsn> This is the last (Log Sequence Number) LSN processed in the
previous CDC run.
<ce-lsn> This is the last LSN to be processed in the current CDC Run.
It is always assumed that the last sequence number to be
processed is the maximum (0xFFF...).
<ir-star t> This is an LSN of a change just before the initial load began.
<ir-end> This is an LSN of a change just after the initial load ended.
TS This marks the timestamp for the last CDC state update.
The LSNs and sequence numbers are each encoded as a hexadecimal string of up to 20 digits representing the
LSN value of Binary(10).
The following table describes the possible CDC state values.
(INITIAL) This is the initial state before the any package was run on the
current CDC group. This is also the state when the CDC state
is empty.
ILSTART (Initial Load Started) This is the state when the initial load package starts, after the
MarkInitialLoadStar t operation call to the CDC Control
task.
ILEND (Initial Load Ended) This is the state when the initial load package ends
successfully, after the MarkInitialLoadEnd operation call to
the CDC Control task.
ILUPDATE (Initial Load Update) This is the state on the runs of the trickle feed update
package following the initial load, while still processing the
initial processing range. This is after the
GetProcessingRange operation call to the CDC Control
task.
TFEND (Trickle-Feed Update Ended) This is the state expected for regular CDC runs. It indicates
that the previous run completed successfully and that a new
run with a new processing range can be started.
TFSTART This is the state on a non-initial run of the trickle feed update
package, after the GetProcessingRange operation call to
the CDC Control task.
This indicates that a regular CDC run is started but has not
finished or has not yet finished, cleanly
(MarkProcessedRange ).
TFREDO (Reprocessing Trickle-Feed Updates) This is the state on a GetProcessingRange that occurs
after TFSTART. This indicates that the previous run did not
complete successfully.
See Also
CDC Control Task
CDC Control Task Editor
Data Mining Model Training Destination
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Data Mining Model Training destination trains data mining models by passing the data that the destination
receives through the data mining model algorithms. Multiple data mining models can be trained by one destination
if the models are built on the same data mining structure. For more information, see Mining Structure Columns and
Mining Model Columns.
NOTE
The input to the Data Mining Model training destination must be sorted. To sort the data, you can include a Sort destination
upstream from the Data Mining Model Training destination in the data flow. For more information, see Sort Transformation.
Options
Available Input Columns
View the list of available input columns. Drag input columns to map them to mining structure columns.
Mining Structure Columns
View the list of mining structure columns. Drag mining structure columns to map them to available input columns.
Input Column
View input columns selected from the table above. To change or remove a mapping selection, use the list of
Available Input Columns .
Mining Structure Columns
View each available destination column, whether mapped or not.
Data Mining Model Training Destination Custom
Properties
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Data Mining Model Training destination has both custom properties and the properties common to all data
flow components.
The following table describes the custom properties of the Data Mining Model Training destination. All properties
are read/write.
The input and the input columns of the Data Mining Model Training destination have no custom properties.
For more information, see Data Mining Model Training Destination.
See Also
Common Properties
Data Streaming Destination
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Data Streaming Destination is a SQL Server Integration Services (SSIS) destination component that lets the
OLE DB Provider for SSIS consume output of an SSIS package as a tabular result set. You can create a linked
server that uses the OLE DB Provider for SSIS and then run a SQL query on the linked server to display data
returned by the SSIS package.
In the following example example, the following query returns output from the Package.dtsx package in the
SSISPackagePublishing project in the Power BI folder of the SSIS Catalog. This query uses the linked server named
[Default Linked Server for Integration Services] that in turn uses the new OLE DB Provider for SSIS. The query
includes folder name, project name, and package name in the SSIS catalog. The OLE DB Provider for SSIS runs the
package you specified in the query and returns the tabular result set.
IDColumnName The view generated by the Data Feed Publish Wizard has this
additional ID column. The ID column serves as the EntityKey
for the output data from the data flow when the data is
consumed as an OData feed by other applications.
The default name for this column is _ID. You can specify a
different name for the ID column.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This walkthrough provides detailed steps to publish an SSIS package as a SQL view in a SQL Server database.
Prerequisites
You must have the following software installed on your computer to perform this walkthrough.
1. SQL Server 2019 (15.x) or later with SQL Server Integration Services.
2. SQL Server Data Tools.
ID F IRST N A M E L A ST N A M E
1 John Doe
ID F IRST N A M E L A ST N A M E
2 Jane Doe
d. Drag the OLE DB Source component from the SSIS Toolbox on to the Data Flow Designer .
e. Configure the component to extract data from the Employee table in the TestDB database. Select
(local).TestDB for OLE DB connection manager , Table or view for Data access mode , and
[dbo].[Employee] for Name of the table or the view .
6. Now, drag the Data Streaming Destination from the toolbox to the data flow. You should find this
component in the Common section of the toolbox.
7. Connect the OLE DB Source component in the data flow to the Data Streaming Destination component.
8. Build and deploy the SSIS project to SSIS Catalog.
a. Click Project on the menu bar and click Deploy .
b. Follow the instructions on the wizard to deploy the project to the SSIS Catalog in the local database
server. The following example uses Power BI as the folder name and SSISPackagePublishing as
the project name in the SSIS catalog.
Step 2: Use the SSIS Data Feed Publishing Wizard to Publish SSIS
Package as a SQL View
In this step, you will use the SQL Server Integration Services (SSIS) Data Feed Publishing Wizard to publish the
SSIS package as a view in a SQL Server database. The output data of the package can be consumed by querying
this view.
The SSIS Data Feed Publishing Wizard creates a linked server using the OLE DB Provider for SSIS (SSISOLEDB) and
then creates a SQL view that consists of a query on the linked server. This query includes folder name, project
name, and package name in the SSIS catalog.
At runtime, the view sends the query to the OLE DB Provider for SSIS via the linked server you created. The OLE DB
Provider for SSIS executes the package you specified in the query and returns the tabular result set to the query.
1. Launch SSIS Data Feed Publishing Wizard by running ISDataFeedPublishingWizard.exe from
C:\Program Files\Microsoft SQL Server\130\DTS\Binn or by clicking Microsoft SQL Server 2016\SQL Server
2016 Data Feed Publishing Wizard under Start\All Programs.
2. Click Next on the Introduction page.
3. On the Package Settings page, perform the following tasks:
a. Type the name of the SQL Server instance that contains the SSIS catalog or click Browse to select
the server.
b. Click Browse next to Path field, browse the SSIS catalog, select the SSIS package you want to publish
(for example: SSISDB ->SSISPackagePublishing ->Package.dtsx ), and click OK .
c. Using the Package Parameters, Project Parameters, and Connection Managers tabs at the bottom of
the page, enter values for any package parameters, project parameters, or connection manager
settings for the package. You can also indicate an environment reference to be used for the package
execution and bind project/package parameters to environment variables.
We recommend that you bind sensitive parameters to environment variables. This is to ensure that
the value of a sensitive parameter is not stored in the plain text format in the SQL view created by the
wizard.
d. Click Next to switch the Publish Settings page.
4. On the Publish Settings page, perform the following tasks:
a. Select the database for the view to be created.
b. Type a name for the view . You can also select an existing view from the drop-down list.
c. In the Settings list, specify a name of the linked ser ver to be associated with the view. If linked
server does not already exist, the wizard will create the linked server before creating the view. You can
also set values for User32BitRuntime and Timeout values here.
d. Click the Advanced button. You should see the Advanced Settings dialog box.
e. On the Advanced Settings dialog box, do the following:
a. Specify the database schema in which you want the view to be created (Schema field).
b. Specify whether data should be encrypted before sending it over the network (Encrypt field).
See Using Encryption Without Validation topic for more details about this setting and the
TrustServerCertificate setting.
c. Specify whether a self-signed server certificate can be used when the encryption setting is
enabled (TrustSer verCer tificate field).
d. Click OK to close the Advanced Settings dialog box.
f. Click Next to switch to the Validation page.
5. On the Validation page, review the results from the validating the values for all the settings. In the
following example, you see a warning on the existence of linked server because the linked server does not
exist on the selected SQL Server instance. If you see Error for Result , hover the mouse over Error and you
will see the details about the error. For example, if you had not enabled the Allow inprocess option for the
SSISOLEDB provider, you will get an error on the Configuration of Linked Server action.
NOTE
The following data types are not supported : text, ntext, image, nvarchar(max), varchar(max), and varbinary(max).
NOTE
On a Windows Vista Service Pack 2 computer, you may see two SSIS package executions in the report, a successful
one and a failed one. Ignore the failed one as it is caused by a known issue in this release.
More info
The Data Feed Publish Wizard performs the following important steps:
1. Creates a linked server and configures it to use the OLE DB Provider for SSIS.
2. Creates a SQL view in the specified database, which queries the linked server with catalog information for
the selected package.
This section has procedures for creating a linked server and a SQL view without using the Data Feed Publish
Wizard. It also has additional information about using the OPENQUERY function with the OLE DB Provider for SSIS.
Create a Linked Server using the OLE DB Provider for SSIS
Create a linked server using the OLE DB Provider for SSIS (SSISOLEDB) by running the following query in SQL
Server Management Studio.
USE [master]
GO
EXEC sp_addlinkedserver
@server = N'SSISFeedServer',
@srvproduct = N'Microsoft',
@provider = N'SSISOLEDB',
@datasrc = N'.'
GO
IMPORTANT
Update folder name, project name, and package name if needed. If the OPENQUERY function fails, in the SQL
Ser ver Management Studio , expand Ser ver Objects , expand Linked Ser vers , expand Providers , and double
click SSISOLEDB provider, and ensure that the Allow inprocess option is enabled.
2. Create a view in the database TestDB for the purpose of this walkthrough) by running the following query.
USE [TestDB]
GO
OPENQUERY Function
The syntax for OPENQUERY function is:
SELECT * FROM OPENQUERY(<LinkedServer Name>, N'Folder=<Folder Name from SSIS Catalog>; Project=<SSIS Project
Name>; Package=<SSIS Package Name>; Use32BitRuntime=[True | False];Parameters="<parameter_name_1>=<value1>;
parameter_name_2=<value2>";Timeout=<Number of Seconds>;')
Folder, Project, and Package parameters are mandatory. Use32BitRuntime, Timeout and Parameters are optional.
The value of Use32BitRuntime can be 0, 1, true, or false. It indicates whether the package should run with 32-bit
runtime (1 or true) when the platform of SQL Server is 64-bit.
Timeout indicates the number of seconds that the OLE DB provider for SSIS can wait before new data arrives from
the SSIS package. By default, the timeout is 60 seconds. You can specify an integer value for the timeout between
20 and 32000.
Parameters contain the value of both package parameters and project parameters. The rules for parameters are
same as parameters in DTExec.
The following list specifies the special characters allowed in the query clause:
Single Quote (') - This is supported by the standard OPENQUERY. If you want to use the single quote in the
query clause, use two single quotes ('').
Double-Quote (") - The parameters part of the query is enclosed in double-quotes. If a parameter value itself
contains a double-quote, use the escape character. For example: ".
Left and right square brackets ([ and ]) - These characters are used to indicate leading/rear spaces. For
example, "[ some spaces ]" represents the string " some spaces " with one leading space and one trailing
space. If these characters themselves are used in the query clause, they must be escaped. For example: \[ and
\].
Forward Slash (\) - Every \ used in the query clause must use escape character. For example, \\ is evaluated
as \ in the query clause.
See Also
Data Streaming Destination
Configure Data Streaming Destination
DataReader Destination
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The DataReader destination exposes the data in a data flow by using the ADO.NET DataReader interface. The data
can then be consumed by other applications. For example, you can configure the data source of a Reporting
Services report to use the result of running a Microsoft SQL Server Integration Services package. To do this, you
create a data flow that implements the DataReader destination.
For information about accessing and reading values in the DataReader destination programmatically, see Loading
the Output of a Local Package.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The DataReader destination has both custom properties and the properties common to all data flow components.
The following table describes the custom properties of the DataReader destination. All properties except for
DataReader are read/write.
The input and the input columns of the DataReader destination have no custom properties.
For more information, see DataReader Destination.
See Also
Common Properties
Dimension Processing Destination
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Dimension Processing destination loads and processes an SQL Server Analysis Services dimension. For more
information about dimensions, see Dimensions (Analysis Services - Multidimensional Data).
The Dimension Processing destination includes the following features:
Options to perform incremental, full, or update processing.
Error configuration, to specify whether dimension processing ignores errors or stops after a specified
number of errors.
Mapping of input columns to columns in dimension tables.
For more information about processing Analysis Services objects, see Processing Options and Settings (Analysis
Services).
VA L UE DESC RIP T IO N
Ignore errors
Specify that errors should be ignored.
Stop on error
Specify that processing should stop when an error occurs.
Number of errors
Specify the error threshold at which processing should stop, if you have selected Stop on errors .
On error action
Specify the action to take when the error threshold is reached, if you have selected Stop on errors .
VA L UE DESC RIP T IO N
VA L UE DESC RIP T IO N
Duplicate key
Specify the action to take for a duplicate key error. By default, this value is IgnoreError .
VA L UE DESC RIP T IO N
VA L UE DESC RIP T IO N
VA L UE DESC RIP T IO N
See Also
Data Flow
Integration Services Transformations
Dimension Processing Destination Custom Properies
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Dimension Processing destination has both custom properties and the properties common to all data flow
components.
The following table describes the custom properties of the Dimension Processing destination. All properties are
read/write.
The input and the input columns of the Dimension Processing destination have no custom properties.
For more information, see Dimension Processing Destination.
See Also
Common Properties
Excel Source
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Excel source extracts data from worksheets or ranges in Microsoft Excel workbooks.
IMPORTANT
For detailed info about connecting to Excel files, and about limitations and known issues for loading data from or to Excel
files, see Load data from or to Excel with SQL Server Integration Services (SSIS).
Access Modes
The Excel source provides four different data access modes for extracting data:
A table or view.
A table or view specified in a variable.
The results of an SQL statement. The query can be a parameterized query.
The results of an SQL statement stored in a variable.
The Excel source uses an Excel connection manager to connect to a data source, and the connection manager
specifies the workbook file to use. For more information, see Excel Connection Manager.
The Excel source has one regular output and one error output.
Static Options
OLE DB connection manager
Select an existing Excel connection manager from the list, or create a new connection by clicking New .
New
Create a new connection manager by using the Excel Connection Manager dialog box.
Data access mode
Specify the method for selecting data from the source.
VA L UE DESC RIP T IO N
Table or view Retrieve data from a worksheet or named range in the Excel
file.
Table name or view name variable Specify the worksheet or range name in a variable.
SQL command Retrieve data from the Excel file by using a SQL query.
SQL command from variable Specify the SQL query text in a variable.
Preview
Preview results by using the Data View dialog box. Preview can display up to 200 rows.
Data Access Mode Dynamic Options
Data access mode = Table or view
Name of the Excel sheet
Select the name of the worksheet or named range from a list of those available in the Excel workbook.
Data access mode = Table name or view name variable
Variable name
Select the variable that contains the name of the worksheet or named range.
Data access mode = SQL command
SQL command text
Enter the text of a SQL query, build the query by clicking Build Quer y , or browse to the file that contains the
query text by clicking Browse .
Parameters
If you have entered a parameterized query by using ? as a parameter placeholder in the query text, use the Set
Quer y Parameters dialog box to map query input parameters to package variables.
Build quer y
Use the Quer y Builder dialog box to construct the SQL query visually.
Browse
Use the Open dialog box to locate the file that contains the text of the SQL query.
Parse quer y
Verify the syntax of the query text.
Data access mode = SQL command from variable
Variable name
Select the variable that contains the text of the SQL query.
Related Content
Load data from or to Excel with SQL Server Integration Services (SSIS)
Excel Destination
Excel Connection Manager
Excel Destination
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Excel destination loads data into worksheets or ranges in Microsoft Excel workbooks.
IMPORTANT
For detailed info about connecting to Excel files, and about limitations and known issues for loading data from or to Excel
files, see Load data from or to Excel with SQL Server Integration Services (SSIS).
Access Modes
The Excel destination provides three different data access modes for loading data:
A table or view.
A table or view specified in a variable.
The results of an SQL statement. The query can be a parameterized query.
NOTE
The CommandTimeout property of the Excel destination is not available in the Excel Destination Editor , but can be set
by using the Advanced Editor . In addition, certain Fast Load options are available only in the Advanced Editor . For more
information on these properties, see the Excel Destination section of Excel Custom Properties.
Static Options
Excel connection manager
Select an existing Excel connection manager from the list, or create a new connection by clicking New .
New
Create a new connection manager by using the Excel Connection Manager dialog box.
Data access mode
Specify the method for selecting data from the source.
O P T IO N DESC RIP T IO N
Table or view Loads data into a worksheet or named range in the Excel data
source.
Table name or view name variable Specify the worksheet or range name in a variable.
SQL command Load data into the Excel destination by using an SQL query.
See Also
Load data from or to Excel with SQL Server Integration Services (SSIS)
Excel Source
Excel Connection Manager
Excel Custom Properties
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Source Custom Proper ties
The Excel source has both custom properties and the properties common to all data flow components.
The following table describes the custom properties of the Excel source. All properties are read/write.
The output and the output columns of the Excel source have no custom properties.
For more information, see Excel Source.
Destination Custom Proper ties
The Excel destination has both custom properties and the properties common to all data flow components.
The following table describes the custom properties of the Excel destination. All properties are read/write.
P RO P ERT Y N A M E DATA T Y P E DESC RIP T IO N
The input and the input columns of the Excel destination have no custom properties.
For more information, see Excel Destination.
See Also
Common Properties
Load data from or to Excel with SQL Server Integration Services (SSIS)
Flat File Source
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Flat File source reads data from a text file. The text file can be in delimited, fixed width, or mixed format.
Delimited format uses column and row delimiters to define columns and rows.
Fixed width format uses width to define columns and rows. This format also includes a character for
padding fields to their maximum width.
Ragged right format uses width to define all columns, except for the last column, which is delimited by the
row delimiter.
You can configure the Flat File source in the following ways:
Add a column to the transformation output that contains the name of the text file from which the Flat File
source extracts data.
Specify whether the Flat File source interprets zero-length strings in columns as null values.
NOTE
The Flat File connection manager that the Flat File source uses must be configured to use a delimited format to
interpret zero-length strings as nulls. If the connection manager uses the fixed width or ragged right formats, data
that consists of spaces cannot be interpreted as null values.
The output columns in the output of the Flat File source include the FastParse property. FastParse indicates whether
the column uses the quicker, but locale-insensitive, fast parsing routines that Integration Services provides or the
locale-sensitive standard parsing routines. For more information, see Fast Parse and Standard Parse.
Output columns also include the UseBinaryFormat property. You use this property to implement support for
binary data, such as data with the packed decimal format, in files. By default UseBinaryFormat is set to false . If you
want to use a binary format, set UseBinaryFormat to true and the data type on the output column to DT_BYTES .
When you do this, the Flat File source skips the data conversion and passes the data to the output column as is.
You can then use a transformation such as the Derived Column or Data Conversion to cast the DT_BYTES data to a
different data type, or you can write custom script in a Script transformation to interpret the data. You can also
write a custom data flow component to interpret the data. For more information about which data types you can
cast DT_BYTES to, see Cast (SSIS Expression).
This source uses a Flat File connection manager to access the text file. By setting properties on the Flat File
connection manager, you can provide information about the file and each column in it, and specify how the Flat
File source should handle the data in the text file. For example, you can specify the characters that delimit columns
and rows in the file, and the data type and the length of each column. For more information, see Flat File
Connection Manager.
This source has one output and one error output.
Related Tasks
For details about how to set properties of a data flow component, see Set the Properties of a Data Flow
Component.
NOTE
The FileNameColumnName property of the Flat File source and the FastParse property of its output columns are not
available in the Flat File Source Editor , but can be set by using the Advanced Editor . For more information on these
properties, see the Flat File Source section of Flat File Custom Properties.
Options
Available External Columns
View the list of available external columns in the data source. You cannot use this table to add or delete columns.
External Column
View external (source) columns in the order in which the task will read them. You can change this order by first
clearing the selected columns in the table, and then selecting external columns from the list in a different order.
Output Column
Provide a unique name for each output column. The default is the name of the selected external (source) column;
however, you can choose any unique, descriptive name. The name provided will be displayed within SSIS Designer.
See Also
Flat File Destination
Data Flow
Flat File Destination
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Flat File destination writes data to a text file. The text file can be in delimited, fixed width, fixed width with row
delimiter, or ragged right format.
You can configure the Flat File destination in the following ways:
Provide a block of text that is inserted in the file before any data is written. The text can provide information
such as column headings.
Specify whether to overwrite a data in a destination file that has the same name.
This destination uses a Flat File connection manager to access the text file. By setting properties on the Flat File
connection manager that the Flat File destination uses, you can specify how the Flat File destination formats and
writes the text file. When you configure the Flat File connection manager, you specify information about the file
and about each column in the file. For example, you specify the characters that delimit columns and rows in the
file, and you specify the data type and the length of each column. For more information, see Flat File Connection
Manager.
The Flat File destination includes the Header custom property. This property can be updated by a property
expression when the package is loaded. For more information, see Integration Services (SSIS) Expressions, Use
Property Expressions in Packages, and Flat File Custom Properties.
This destination has one output. It does not support an error output.
Related Tasks
For information about how to set the properties of a data flow component, see Set the Properties of a Data Flow
Component.
See Also
Flat File Source
Data Flow
HDFS File Source
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The HDFS File Source component enables an SSIS package to read data from a HDFS file. The supported file
formats are Text and Avro. (ORC sources are not supported.)
To configure the HDFS File Source, drag and drop the HDFS File Source on the data flow designer and double-click
the component to open the editor.
Options
Configure the following options on the General tab of the Hadoop File Source Editor dialog box.
File format Specify the format for the HDFS file. The available options are
Text and Avro. (ORC sources are not supported.)
F IEL D DESC RIP T IO N
Column delimiter character If you select Text format, specify the column delimiter
character.
Column names in the first data row If you select Text format, specify whether the first row in the
file contains column names.
After you configure these options, select the Columns tab to map source columns to destination columns in the
data flow.
See Also
Hadoop Connection Manager
HDFS File Destination
HDFS File Destination
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The HDFS File Destination component enables an SSIS package to write data to a HDFS file. The supported file
formats are Text, Avro, and ORC.
To configure the HDFS File Destination, drag and drop the HDFS File Source on the data flow designer and double-
click the component to open the editor.
Options
Configure the following options on the General tab of the Hadoop File Destination Editor dialog box.
File format Specify the format for the HDFS file. The available options are
Text, Avro, and ORC.
F IEL D DESC RIP T IO N
Column delimiter character If you select Text format, specify the column delimiter
character.
Column names in the first data row If you select Text format, specify whether the first row in the
file contains column names.
After you configure these options, select the Columns tab to map source columns to destination columns in the
data flow.
See Also
Hadoop Connection Manager
HDFS File Source
Flat File Custom Properties
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Source Custom Proper ties
The Flat File source has both custom properties and the properties common to all data flow components.
The following table describes the custom properties of the Flat File source. All properties are read/write.
The input and the input columns of the Flat File destination have no custom properties.
For more information, see Flat File Destination.
See Also
Common Properties
OData Source
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the OData Source component in an SSIS package to consume data from an Open Data Protocol (OData)
service.
IMPORTANT
The OData Source component does not support complex types, such as multiple-choice items, in SharePoint lists.
NOTE
If the source only allows TLS 1.2 connection, you need to enforce TLS 1.2 on your machine through registry settings. In an
elevated command prompt run the following commands:
reg add HKLM\SOFTWARE\Microsoft.NETFramework\v4.0.30319 /v SchUseStrongCrypto /t REG_DWORD /d 1 /reg:64
reg add HKLM\SOFTWARE\Microsoft.NETFramework\v4.0.30319 /v SchUseStrongCrypto /t REG_DWORD /d 1 /reg:32
O P T IO N DESC RIP T IO N
Resource Path Retrieve data from the OData source by using a resource
path.
Quer y options
Specify options for the query. For example: $top=5
Feed url
Displays the read-only feed URL based on options you selected on this dialog box.
Preview
Preview results by using the Preview dialog box. Preview can display up to 20 rows.
Dynamic Options
Use collection or resource path = Collection
Collection
Select a collection from the drop-down list.
Use collection or resource path = Resource Path
Resource path
Type a resource path. For example: Employees
See Also
OData Connection Manager
Tutorial: Using the OData Source
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This tutorial walks you through the process to extract the Employees collection from the sample Nor thwind
OData service (https://services.odata.org/V3/Northwind/Northwind.svc/), and then load it into a flat file.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can modify the OData Source query at runtime by adding an expression to the [OData Source].[Quer y]
property of the Data Flow task.
The columns returned have to be the same columns that were returned at design time; otherwise, you get an error
when the package is executed. Be sure to specify the same columns (in the same order) when using the $select
query option. A safer alternative to using the $select option is to deselect the columns you don't want directly from
the Source Component UI.
There are a few different ways of dynamically setting the query value at runtime. Here are some of the more
common methods.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
When you right-click OData Source in the data flow and click Proper ties , you see properties for the OData
Source component in the Proper ties window.
Properties
P RO P ERT Y DESC RIP T IO N
CollectionName Name of the collection to retrieve from the OData service. The
CollectionName property is used when UseResourcePath
is False.
DefaultStringLength This value specifies default length for string columns that have
no max length.
Default: 4000
ResourcePath Use this property when you need to specify a full resource
path, rather than just selecting a collection name. This
property is used when UseResourcePath is True.
Default: False
See Also
OData Source
ODBC Flow Components
11/2/2020 • 7 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This topic describes the concepts necessary for creating an ODBC data flow using SQL Server 2017 Integration
Services (SSIS)
The Connector for Open Database Connectivity (ODBC) for SQL Server 2017 Integration Services (SSIS) helps SSIS
developers easily create packages that load and unload data from ODBC-supported databases.
The ODBC Connector is designed to achieve optimal performance when loading data into or unloading data from
an ODBC-supported database in the context of SQL Server 2017 Integration Services (SSIS).
Benefits
The ODBC source and ODBC destination for SQL Server 2017 Integration Services (SSIS) provides a competitive
edge for SSIS in projects dealing with loading data into or unloading data from ODBC-supported databases.
Both the ODBC source and ODBC destination enable high performance data integration with ODBC-enabled
databases. Both components can be configured to work with row-wise parameter array bindings for high-
functioning ODBC providers that support this mode of binding and single-row parameter bindings for low-
functioning ODBC providers.
Operating Scenarios
This section describes some of the main uses for the ODBC source and destination components.
Bulk Copy Data from SQL Server tables to any ODBC -Supported database table
You can use the components to bulk copy data from one or more SQL Server tables to a single ODBC-supported
database table.
The following example shows how to create an SSIS Data Flow Task that extracts data from a SQL Server table and
loads it into a DB2 table.
Create an SQL Server 2017 Integration Services (SSIS) Project in the SQL Server Data Tools.
Create an OLE DB connection manager that connects to the SQL Server database that contains the data you
want to copy.
Create an ODBC connection manager that uses a locally installed DB2 ODBC driver with a DSN pointing to a
local or remote DB2 database. This database is where the data from the SQL Server database is loaded.
Drag an OLE DB source to the design surface, then configure the source to get the data from the SQL Server
database and table with the data you are going to extract. Use the OLE DB connection manager you created
previously.
Drag an ODBC destination to the design surface, connect the source output to the ODBC destination, then
configure the destination to load the data into the DB2 table with the data you extract from the SQL Server
database. Use the ODBC connection manager you created previously.
Bulk Copy Data from ODBC -supported database tables to any SQL Server table
You can use the components to bulk copy data from one or more ODBC-supported database tables to a single SQL
Server database table.
The following example shows how to create an SSIS Data Flow Task that extracts data from a Sybase database table
and loads it into a SQL Server database table.
Create an SQL Server 2017 Integration Services (SSIS) Project in the SQL Server Data Tools
Create an ODBC connection manager that uses a locally installed Sybase ODBC driver with a DSN pointing
to a local or remote Sybase database. This database is where the data is extracted.
Create an OLE DB connection manager that connects to the SQL Server database where you want to load the
data.
Drag an ODBC source to the design surface, then configure the source to get the data from the Sybase table
with the data you are going to copy. Use the ODBC connection manager you created previously.
Drag an OLE DB destination to the design surface, connect the source output to the OLE DB destination, then
configure the destination to load the data into the SQL Server table with the data you extract from the
Sybase database. Use the OLE DB connection manager you created previously.
O DB C SQ L T Y P E SSIS DATA T Y P E C O M M EN T S
SQL_BIT DT_BOOL
SQL_DOUBLE DT_R8
SQL_FLOAT DT_R8
SQL_REAL DT_R4
SQL_DATE DT_DBDATE
SQL_TYPE_DATE
SQL_TIME DT_DBTIME
SQL_TYPE_TIME
SQL_WLONGVARCHAR DT_NTEXT
SQL_LONGVARBINARY DT_IMAGE
SQL_GUID DT_GUID
SQL_INTERVAL_YEAR DT_WSTR
SQL_INTERVAL_MONTH
SQL_INTERVAL_DAY
SQL_INTERVAL_HOUR
SQL_INTERVAL_MINUTE
SQL_INTERVAL_SECOND
SQL_INTERVAL_YEAR_TO_MONTH
SQL_INTERVAL_DAY_TO_HOUR
SQL_INTERVAL_DAY_TO_MINUTE
SQL_INTERVAL_DAY_TO_SECOND
SQL_INTERVAL_HOUR_TO_MINUTE
SQL_INTERVAL_HOUR_TO_SECOND
SQL_INTERVAL_MINUTE_TO_SECOND
Provider Specific Data Types DT_BYTES DT_BYTES is used if the column length is
less than or equal to 8000.
DT_IMAGE
DT_IMAGE is used if the column length
is zero or greater than 8000.
In This Section
ODBC Source
ODBC Destination
ODBC Destination
11/2/2020 • 7 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The ODBC destination bulk loads data into ODBC-supported database tables. The ODBC destination uses an ODBC
connection manager to connect to the data source.
An ODBC destination includes mappings between input columns and columns in the destination data source. You
do not have to map input columns to all destination columns, but depending on the properties of the destination
columns, errors may occur if no input columns are mapped to the destination columns. For example, if a
destination column does not allow null values, an input column must be mapped to that column. In addition,
columns of different types can be mapped, however if the input data is not compatible for the destination column
type, an error occurs at runtime. Depending on the error behavior setting, the error will be ignored, cause a failure,
or the row is sent to the error output.
The ODBC destination has one regular output and one error output.
Load Options
The ODBC destination can use one of two access load modules. You set the mode in the ODBC Source Editor
(Connection Manager Page). The two modes are:
Batch : In this mode the ODBC destination attempts to use the most efficient insertion method based on the
perceived ODBC provider capabilities. For most modern ODBC providers, this would mean preparing an
INSERT statement with parameters and then using a row-wise array parameter binding (where the array
size is controlled by the BatchSize property). If you select Batch and the provider does not support this
method, the ODBC destination automatically switches to the Row-by-row mode.
Row-by-row : In this mode, the ODBC destination prepares an INSERT statement with parameters and uses
SQL Execute to insert rows one at a time.
Error Handling
The ODBC destination has an error output. The component error output includes the following output columns:
Error Code : The number that corresponds to the current error. See the documentation for your source
database for a list of errors. For a list of SSIS error codes, see the SSIS Error Code and Message Reference.
Error Column : The source column causing the error (for conversion errors).
The standard output data columns.
Depending on the error behavior setting, the ODBC destination supports returning errors (data conversion,
truncation) that occur during the extraction process in the error output. For more information, see ODBC Source
Editor (Error Output Page).
Parallelism
There is no limitation on the number of ODBC destination components that can run in parallel against the same
table or different tables, on the same machine or on different machines (other than normal global session limits).
However, limitations of the ODBC provider being used may restrict the number of concurrent connections through
the provider. These limitations limit the number of supported parallel instances possible for the ODBC destination.
The SSIS developer must be aware of the limitations of any ODBC provider being used and take them into
consideration when building SSIS packages.
You must also be aware that concurrently loading into the same table may reduce performance because of
standard record locking. This depends on the data being loaded and on the table organization.
The Advanced Editor dialog box contains the properties that can be set programmatically.
To open the Advanced Editor dialog box:
In the Data Flow screen of your SQL Server 2017 Integration Services (SSIS) project, right click the ODBC
destination and select Show Advanced Editor .
For more information about the properties that you can set in the Advanced Editor dialog box, see ODBC
Destination Custom Properties.
In This Section
Load Data by Using the ODBC Destination
ODBC Destination Custom Properties
O P T IO N DESC RIP T IO N
Table Name - Batch Select this option to configure the ODBC destination to work
in batch mode. When you select this option the following
options are available:
This list contains the first 1000 tables only. If your database
contains more than 1000 tables, you can type the beginning
of a table name or use the (*) wild card to enter any part of
the name to display the table or tables you want to use.
Batch size : Type the size of the batch for bulk loading. This is
the number of rows loaded as a batch
Table Name - Row by Row Select this option to configure the ODBC destination to insert
each of the rows into the destination table one at a time.
When you select this option the following option is available:
This list contains the first 1000 tables only. If your database
contains more than 1000 tables, you can type the beginning
of a table name or use the (*) wild card to enter any part of
the name to display the table or tables you want to use.
Preview
Click Preview to view up to 200 rows of data for the table that you selected.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This procedure shows how to load data by using the ODBC destination. To add and configure an ODBC destination,
the package must already include at least one Data Flow task and source.
To load data using an ODBC destination
1. In SQL Server Data Tools, open the Integration Services package you want.
2. Click the Data Flow tab, and then, from the Toolbox , drag the ODBC destination to the design surface.
3. Drag an available output of a data flow component to the input of the ODBC destination.
4. Double-click the ODBC destination.
5. In the ODBC Destination Editor dialog box, on the Connection Manager page, select an existing ODBC
connection manager or click New to create a new connection manager.
6. Select the data access method.
Table Name - Batch : Select this option to configure the ODBC destination to work in batch mode.
When you select this option, you can set the Batch size .
Table Name - Row by Row : Select this option to configure the ODBC destination to insert each of
the rows into the destination table one at a time. When you select this option, the data is loaded into
the table one row at a time.
7. In the Name of the table or the view field, select an available table or view from the database from the
list or type in a regular expression to identify the table.This list contains the first 1000 tables only. If your
database contains more than 1000 tables, you can type the beginning of a table name or use the (*) wild
card to enter any part of the name to display the table or tables you want to use.
8. You can click Preview to view up to 200 rows of the data from the table selected in the ODBC destination.
9. Click Mappings and then map columns from the Available Input Columns list to columns in the
Available Destination Columns list by dragging columns from one list to another.
10. To configure the error output, click Error Output .
11. Click OK .
12. To save the updated package, click Save Selected Items on the File menu.
See Also
ODBC Destination Editor (Connection Manager Page)
ODBC Destination Editor (Mappings Page)
ODBC Source Editor (Error Output Page)
ODBC Destination Custom Properties
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The following table describes the custom properties of the ODBC destination. All properties can be set from SSIS
property expressions.
InsertMethod Integer (enumeration) The method used for inserting the data.
The possible values are Row by row (0)
and Batch (1). The default value is Batch
(1).
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The ODBC source extracts data from ODBC-supported database by using a database table, a view, or an SQL
statement.
The ODBC source has the following data access modes for extracting data:
A table or view.
The results of an SQL statement.
The source uses an ODBC connection manager, which specifies the provider to use.
An ODBC source includes the source data output columns. When output columns are mapped in the ODBC
destination to the destination columns, errors may occur if no output columns are mapped to the destination
columns. Columns of different types can be mapped, however if the output data is not compatible for the
destination then an error occurs at runtime. Depending on the error behavior, setting the error will be ignored,
cause a failure, or the row is sent to the error output.
The ODBC source has one regular output and one error output.
Error Handling
The ODBC source has an error output. The component error output includes the following output columns:
Error Code : The number that corresponds to the current error. See the documentation for the ODBC-
supported database you are using for a list of errors. For a list of SSIS error codes, see the SSIS Error Code
and Message Reference.
Error Column : The source column causing the error (for conversion errors).
The standard output data columns.
Depending on the error behavior setting, the ODBC source supports returning errors (data conversion,
truncation) that occur during the extraction process in the error output. For more information, see ODBC
Destination Editor (Connection Manager Page).
Extract Options
The ODBC source operates in either Batch or Row-by-Row mode. The mode used is determined by the
FetchMethod property. The following list describes the modes.
Batch : The component attempts to use the most efficient fetch method based on the perceived ODBC
provider capabilities. For most modern ODBC providers, this is SQLFetchScroll with array binding (where
the array size is determined by the BatchSize property). If you select Batch and the provider does not
support this method, the ODBC destination automatically switches to the Row-by-row mode.
Row-by Row : The component uses SQLFetch to retrieve the rows one at a time.
For more information about the FetchMethod property, see ODBC Source Custom Properties.
Parallelism
There is no limitation on the number of ODBC source components that can run in parallel against the same table
or different tables, on the same machine or on different machines (other than normal global session limits).
However, limitations of the ODBC provider being used may restrict the number of concurrent connections
through the provider. These limitations limit the number of supported parallel instances possible for the ODBC
source. The SSIS developer must be aware of the limitations of any ODBC provider being used and take them
into consideration when building SSIS packages.
In This Section
Extract Data by Using the ODBC Source
ODBC Source Custom Properties
O P T IO N DESC RIP T IO N
Table Name Retrieve data from a table or view in the ODBC data source.
When you select this option, select a value from the list for
the following:
This list contains the first 1000 tables only. If your database
contains more than 1000 tables, you can type the beginning
of a table name or use the (*) wild card to enter any part of
the name to display the table or tables you want to use.
SQL command Retrieve data from the ODBC data source by using an SQL
query. You should write the query in the syntax of the source
database you are working with. When you select this option,
enter a query in one of the following ways:
Enter the text of the SQL query in the SQL command text
field.
Preview
Click Preview to view up to the first 200 rows of the data extracted from the table or view you selected.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This procedure describes how to extract data by using an ODBC source. To add and configure an ODBC source, the
package must already include at least one Data Flow task.
To extract data using an ODBC source
1. In SQL Server Data Tools, open the SQL Server 2017 Integration Services (SSIS) package you want.
2. Click the Data Flow tab, and then, from the Toolbox , drag the ODBC source to the design surface.
3. Double-click the ODBC source.
4. In the ODBC Source Editor dialog box, on the Connection Manager page, select an existing ODBC
connection manager or click New to create a new connection manager.
5. Select the data access method.
Table Name : Select a table or view in the database or type a regular expression to identify the table
to which the ODBC connection manager connects.
This list contains the first 1000 tables only. If your database contains more than 1000 tables, you can
type the beginning of a table name or use the (*) wild card to enter any part of the name to display
the table or tables you want to use.
SQL Command : Type an SQL Command or click Browse to load the SQL query from a text file.
6. You can click Preview to view up to 200 rows of the data extracted by the ODBC source.
7. To update the mapping between external and output columns, click Columns and select different columns
in the External Column list.
8. If necessary, update the names of output columns by editing values in the Output Column list.
9. To configure the error output, click Error Output .
10. Click OK .
11. To save the updated package, click Save Selected Items on the File menu.
See Also
ODBC Source Editor (Connection Manager Page)
ODBC Source Editor (Columns Page)
ODBC Source Editor (Error Output Page)
ODBC Source Custom Properties
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The following table describes the custom properties of the ODBC source. All properties can be set from SSIS
property expressions.
FetchMethod Integer (enumeration) The method used for getting the data.
The possible options are Row by row (0)
and Batch (1). The default value is Batch
(1).
See Also
ODBC Source
ODBC Source Editor (Connection Manager Page)
OLE DB Source
11/2/2020 • 10 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The OLE DB source extracts data from a variety of OLE DB-compliant relational databases by using a database
table, a view, or an SQL command. For example, the OLE DB source can extract data from tables in Microsoft Office
Access or SQL Server databases.
NOTE
If the data source is Microsoft Office Excel 2007, the data source requires a different connection manager than earlier
versions of Excel. For more information, see Connect to an Excel Workbook.
The OLE DB source provides four different data access modes for extracting data:
A table or view.
A table or view specified in a variable.
The results of an SQL statement. The query can be a parameterized query.
The results of an SQL statement stored in a variable.
NOTE
When you use an SQL statement to invoke a stored procedure that returns results from a temporary table, use the WITH
RESULT SETS option to define metadata for the result set.
If you use a parameterized query, you can map variables to parameters to specify the values for individual
parameters in the SQL statements.
This source uses an OLE DB connection manager to connect to a data source, and the connection manager
specifies the OLE DB provider to use. For more information, see OLE DB Connection Manager.
An Integration Services project also provides the data source object from which you can create an OLE DB
connection manager, making data sources and data source views available to the OLE DB source.
Depending on the OLE DB provider, some limitations apply to the OLE DB source:
The Microsoft OLE DB provider for Oracle does not support the Oracle data types BLOB, CLOB, NCLOB,
BFILE, OR UROWID, and the OLE DB source cannot extract data from tables that contain columns with these
data types.
The IBM OLE DB DB2 provider and Microsoft OLE DB DB2 provider do not support using an SQL command
that calls a stored procedure. When this kind of command is used, the OLE DB source cannot create the
column metadata and, as a result, the data flow components that follow the OLE DB source in the data flow
have no column data available and the execution of the data flow fails.
The OLE DB source has one regular output and one error output.
The parameter names have no effect. For example, if a parameter is named the same as the column to which it
applies, but not put in the correct ordinal position in the Parameters list, the parameter mapping that occurs at
run time will use the ordinal position of the parameter, not the parameter name.
The EXEC command typically requires that you use the names of the variables that provide parameter values in the
procedure as parameter names.
Specifying Parameters by Using Names
If the actual parameter names are returned from the RDBMS, the parameters used by a SELECT and EXEC
statement are mapped by name. The parameter names must match the names that the stored procedure, run by
the SELECT statement or the EXEC statement, expects.
The following SQL statement runs the uspGetWhereUsedProductID stored procedure, available in the
AdventureWorks2012 database.
EXEC uspGetWhereUsedProductID ?, ?
The stored procedure expects the variables, @StartProductID and @CheckDate , to provide parameter values. The
order in which the parameters appear in the Mappings list is irrelevant. The only requirement is that the
parameter names match the variable names in the stored procedure, including the @ sign.
Mapping Parameters to Variables
The parameters are mapped to variables that provide the parameter values at run time. The variables are typically
user-defined variables, although you can also use the system variables that Integration Services provides. If you
use user-defined variables, make sure that you set the data type to a type that is compatible with the data type of
the column that the mapped parameter references. For more information, see Integration Services (SSIS)
Variables.
Related Tasks
Extract Data by Using the OLE DB Source
Map Query Parameters to Variables in a Data Flow Component
Set the Properties of a Data Flow Component
Sort Data for the Merge and Merge Join Transformations
Related Content
Wiki article, SSIS with Oracle Connectors, on social.technet.microsoft.com.
NOTE
To load data from a data source that uses Microsoft Office Excel 2007, use an OLE DB source. You cannot use an Excel source
to load data from an Excel 2007 data source. For more information, see Configure OLE DB Connection Manager.
To load data from a data source that uses Microsoft Office Excel 2003 or earlier, use an Excel source. For more information,
see Excel Source Editor (Connection Manager Page).
NOTE
The CommandTimeout property of the OLE DB source is not available in the OLE DB Source Editor , but can be set by
using the Advanced Editor . For more information on this property, see the Excel Source section of OLE DB Custom
Properties.
O P T IO N DESC RIP T IO N
Table or view Retrieve data from a table or view in the OLE DB data source.
Table name or view name variable Specify the table or view name in a variable.
SQL command Retrieve data from the OLE DB data source by using a SQL
query.
SQL command from variable Specify the SQL query text in a variable.
Preview
Preview results by using the Data View dialog box. Preview can display up to 200 rows.
NOTE
When you preview data, columns with a CLR user-defined type do not contain data. Instead the values <value too big to
display> or System.Byte[] display. The former displays when the data source is accessed using the SQL OLE DB provider, the
latter when using the SQL Server Native Client provider.
See Also
OLE DB Destination
Integration Services (SSIS) Variables
Data Flow
Map Query Parameters to Variables in a Data Flow
Component
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
When you configure the OLE DB source to use parameterized queries, you can map the parameters to variables.
The OLE DB source uses parameterized queries to filter data when the source connects to a data source.
To map a query parameter to a variable
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Data Flow tab, and then, from the Toolbox , drag the OLE DB source to the design surface.
4. Right-click the OLE DB source, and then click Edit .
5. In the OLE DB Source Editor , select an OLE DB connection manager to use to connect to the data source,
or click New to create a new OLE DB connection manager.
6. Select the SQL command option for data access mode, and then type a parameterized query in the SQL
command text pane.
7. Click Parameters .
8. In the Set Quer y Parameters dialog box, map each parameter in the Parameters list to a variable in the
Variables list, or create a new variable by clicking <New variable> . Click OK .
NOTE
Only system variables and user-defined variables that are in the scope of the package, a parent container such as a
Foreach Loop, or the Data Flow task that contains the data flow component are available for mapping. The variable
must have a data type that is compatible with the column in the WHERE clause to which the parameter is assigned.
9. You can click Preview to view up to 200 rows of the data that the query returns.
10. To save the updated package, click Save Selected Items on the File menu.
See Also
OLE DB Source
Lookup Transformation
Extract Data by Using the OLE DB Source
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To add and configure an OLE DB source, the package must already include at least one Data Flow task.
To extract data using an OLE DB Source
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Data Flow tab, and then, from the Toolbox , drag the OLE DB source to the design surface.
4. Double-click the OLE DB source.
5. In the OLE DB Source Editor dialog box, on the Connection Manager page, select an existing OLE DB
connection manager or click New to create a new connection manager. For more information, see OLE DB
Connection Manager.
6. Select the data access method:
Table or view Select a table or view in the database to which the OLE DB connection manager
connects.
Table name or view name variable Select the user-defined variable that contains the name of a
table or view in the database to which the OLE DB connection manager connects.
SQL command Type an SQL command or click Build Quer y to write an SQL command using the
Quer y Builder .
NOTE
The command can include parameters. For more information, see Map Query Parameters to Variables in a
Data Flow Component.
SQL command from variable Select the user-defined variable that contains the SQL command.
NOTE
The variables must be defined in the scope of the same Data Flow task that contains the OLE DB source, or in
the scope of the same package; additionally, the variable must have a string data type.
7. To update the mapping between external and output columns, click Columns and select different columns
in the External Column list.
8. Optionally, update the names of output columns by editing values in the Output Column list.
9. To configure the error output, click Error Output . For more information, see Debugging Data Flow.
10. You can click Preview to view up to 200 rows of the data extracted by the OLE DB source.
11. Click OK .
12. To save the updated package, click Save Selected Items on the File menu.
See Also
OLE DB Source
Integration Services Transformations
Integration Services Paths
Data Flow Task
OLE DB Destination
11/2/2020 • 14 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The OLE DB destination loads data into a variety of OLE DB-compliant databases using a database table or view or
an SQL command. For example, the OLE DB source can load data into tables in Microsoft Office Access and SQL
Server databases.
NOTE
If the data source is Microsoft Office Excel 2007, the data source requires a different connection manager than earlier
versions of Excel. For more information, see Connect to an Excel Workbook.
The OLE DB destination provides five different data access modes for loading data:
A table or view. You can specify an existing table or view, or you create a new table.
A table or view using fast-load options. You can specify an existing table or create a new table.
A table or view specified in a variable.
A table or view specified in a variable using fast-load options.
The results of an SQL statement.
NOTE
The OLE DB destination does not support parameters. If you need to execute a parameterized INSERT statement, consider
the OLE DB Command transformation. For more information, see OLE DB Command Transformation.
When the OLE DB destination loads data that uses a double-byte character set (DBCS), the data may be corrupted
if the data access mode does not use the fast load option and if the OLE DB connection manager uses the
Microsoft OLE DB Provider for SQL Server (SQLOLEDB). To ensure the integrity of DBCS data you should
configure the OLE DB connection manager to use the SQL Server Native Client, or use one of the fast-load access
modes: Table or view - fast load or Table name or view name variable - fast load . Both options are
available from the OLE DB Destination Editor dialog box. When programming the SSIS object model, you
should set the AccessMode property to OpenRowset Using FastLoad , or OpenRowset Using FastLoad
From Variable .
NOTE
If you use the OLE DB Destination Editor dialog box in SSIS Designer to create the destination table into which the OLE
DB destination inserts data, you may have to select the newly created table manually. The need for manual selection occurs
when an OLE DB provider, such as the OLE DB provider for DB2, automatically adds schema identifiers to the table name.
NOTE
The CREATE TABLE statement that the OLE DB Destination Editor dialog box generates may require modification
depending on the destination type. For example, some destinations do not support the data types that the CREATE TABLE
statement uses.
This destination uses an OLE DB connection manager to connect to a data source and the connection manager
specifies the OLE DB provider to use. For more information, see OLE DB Connection Manager.
An Integration Services project also provides the data source object from which you can create an OLE DB
connection manager, to make data sources and data source views available to the OLE DB destination.
An OLE DB destination includes mappings between input columns and columns in the destination data source.
You do not have to map input columns to all destination columns, but depending on the properties of the
destination columns, errors can occur if no input columns are mapped to the destination columns. For example, if
a destination column does not allow null values, an input column must be mapped to that column. In addition, the
data types of mapped columns must be compatible. For example, you cannot map an input column with a string
data type to a destination column with a numeric data type.
The OLE DB destination has one regular input and one error output.
For more information about data types, see Integration Services Data Types.
NOTE
Any constraint failure at the destination causes the entire batch of rows defined by FastLoadMaxInsertCommitSize to fail.
In addition to the fast load options exposed in the OLE DB Destination Editor dialog box,you can configure the
OLE DB destination to use the following bulk load options by typing the options in FastLoadOptions property in
the Advanced Editor dialog box.
FA ST LO A D O P T IO N DESC RIP T IO N
KILOBYTES_PER_BATCH Specifies the size in kilobytes to insert. The option has the
form KILOBYTES_PER_BATCH = <positive integer value>.
FIRE_TRIGGERS Specifies whether triggers fire on the insert table. The option
has the form FIRE_TRIGGERS. The presence of the option
indicates that triggers fire.
ORDER Specifies how the input data is sorted. The option has the
form ORDER <column name> ASC|DESC. Any number of
columns may be listed and it is optional to include the sort
order. If sort order is omitted, the insert operation assumes
the data is unsorted.
The Transact-SQL keywords are traditionally typed using uppercase letters, but the keywords are not case
sensitive.
To learn more about fast load options, see BULK INSERT (Transact-SQL).
NOTE
The CommandTimeout property of the OLE DB destination is not available in the OLE DB Destination Editor , but can
be set by using the Advanced Editor . In addition, certain fast load options are available only in the Advanced Editor .
For more information on these properties, see the OLE DB Destination section of OLE DB Custom Properties.
The CommandTimeout property only takes effective when data access mode is SQL command .
Static Options
OLE DB connection manager
Select an existing connection manager from the list, or create a new connection by clicking New .
New
Create a new connection manager by using the Configure OLE DB Connection Manager dialog box.
Data access mode
Specify the method for loading data into the destination. Loading double-byte character set (DBCS) data requires
use of one of the fast load options. For more information about the fast load data access modes, which are
optimized for bulk inserts, see OLE DB Destination.
O P T IO N DESC RIP T IO N
Table or view Load data into a table or view in the OLE DB destination.
Table or view - fast load Load data into a table or view in the OLE DB destination and
use the fast load option. For more information about the fast
load data access modes, which are optimized for bulk inserts,
see OLE DB Destination.
Table name or view name variable Specify the table or view name in a variable.
Table name or view name variable - fast load Specify the table or view name in a variable, and use the fast
load option to load the data. For more information about the
fast load data access modes, which are optimized for bulk
inserts, see OLE DB Destination.
SQL command Load data into the OLE DB destination by using a SQL query.
Preview
Preview results by using the Preview Quer y Results dialog box. Preview can display up to 200 rows.
Data Access Mode Dynamic Options
Each of the settings for Data access mode displays a dynamic set of options specific to that setting. The
following sections describe each of the dynamic options available for each Data access mode setting.
Data access mode = Table or view
Name of the table or the view
Select the name of the table or view from a list of those available in the data source.
New
Create a new table by using the Create Table dialog box.
NOTE
When you click New , Integration Services generates a default CREATE TABLE statement based on the connected data
source. This default CREATE TABLE statement will not include the FILESTREAM attribute even if the source table includes a
column with the FILESTREAM attribute declared. To run an Integration Services component with the FILESTREAM attribute,
first implement FILESTREAM storage on the destination database. Then, add the FILESTREAM attribute to the CREATE TABLE
statement in the Create Table dialog box. For more information, see Binary Large Object (Blob) Data (SQL Server).
NOTE
When you click New , Integration Services generates a default CREATE TABLE statement based on the connected data
source. This default CREATE TABLE statement will not include the FILESTREAM attribute even if the source table includes a
column with the FILESTREAM attribute declared. To run an Integration Services component with the FILESTREAM attribute,
first implement FILESTREAM storage on the destination database. Then, add the FILESTREAM attribute to the CREATE TABLE
statement in the Create Table dialog box. For more information, see Binary Large Object (Blob) Data (SQL Server).
Keep identity
Specify whether to copy identity values when data is loaded. This property is available only with the fast load
option. The default value of this property is false .
Keep nulls
Specify whether to copy null values when data is loaded. This property is available only with the fast load option.
The default value of this property is false .
Table lock
Specify whether the table is locked during the load. The default value of this property is true .
Check constraints
Specify whether the destination checks constraints when it loads data. The default value of this property is true .
Rows per batch
Specify the number of rows in a batch. The default value of this property is -1 , which indicates that no value has
been assigned.
NOTE
Clear the text box in the OLE DB Destination Editor to indicate that you do not want to assign a custom value for this
property.
If you provide a value for this property, the destination commits rows in batches that are the smaller of (a) the
Maximum inser t commit size , or (b) the remaining rows in the buffer that is currently being processed.
NOTE
Any constraint failure at the destination causes the entire batch of rows defined by Maximum inser t commit size to fail.
NOTE
When you click New , Integration Services generates a default CREATE TABLE statement based on the connected data
source. This default CREATE TABLE statement will not include the FILESTREAM attribute even if the source table includes a
column with the FILESTREAM attribute declared. To run an Integration Services component with the FILESTREAM attribute,
first implement FILESTREAM storage on the destination database. Then, add the FILESTREAM attribute to the CREATE TABLE
statement in the Create Table dialog box. For more information, see Binary Large Object (Blob) Data (SQL Server).
Keep identity
Specify whether to copy identity values when data is loaded. This property is available only with the fast load
option. The default value of this property is false .
Keep nulls
Specify whether to copy null values when data is loaded. This property is available only with the fast load option.
The default value of this property is false .
Table lock
Specify whether the table is locked during the load. The default value of this property is false .
Check constraints
Specify whether the task checks constraints. The default value of this property is false .
Rows per batch
Specify the number of rows in a batch. The default value of this property is -1 , which indicates that no value has
been assigned.
NOTE
Clear the text box in the OLE DB Destination Editor to indicate that you do not want to assign a custom value for this
property.
Maximum inser t commit size
Specify the batch size that the OLE DB destination tries to commit during fast load operations. The default value of
2147483647 indicates that all data is committed in a single batch after all rows have been processed.
NOTE
A value of 0 might cause the running package to stop responding if the OLE DB destination and another data flow
component are updating the same source table. To prevent the package from stopping, set the Maximum inser t commit
size option to 2147483647 .
NOTE
The OLE DB destination does not support parameters. If you need to execute a parameterized INSERT statement, consider
the OLE DB Command transformation. For more information, see OLE DB Command Transformation.
Build quer y
Use the Quer y Builder dialog box to construct the SQL query visually.
Browse
Use the Open dialog box to locate the file that contains the text of the SQL query.
Parse quer y
Verify the syntax of the query text.
Related Content
OLE DB Source
Integration Services (SSIS) Variables
Data Flow
Load Data by Using the OLE DB Destination
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To add and configure an OLE DB destination, the package must already include at least one Data Flow task and a
source.
To load data using an OLE DB destination
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Data Flow tab, and then, from the Toolbox , drag the OLE DB destination to the design surface.
4. Connect the OLE DB destination to the data flow by dragging a connector from a data source or a previous
transformation to the destination.
5. Double-click the OLE DB destination.
6. In the OLE DB Destination Editor dialog box, on the Connection Manager page, select an existing OLE
DB connection manager or click New to create a new connection manager. For more information, see OLE
DB Connection Manager.
7. Select the data access method:
Table or view Select a table or view in the database that contains the data.
Table or view - fast load Select a table or view in the database that contains the data, and then set
the fast-load options: Keep identity , Keep null , Table lock , Check constraint , Rows per batch ,
or Maximum inser t commit size .
Table name or view name variable Select the user-defined variable that contains the name of a
table or view in the database.
Table name or view name variable fast load Select the user-defined variable that contains the
name of a table or view in the database that contains the data, and then set the fast-load options.
SQL command Type an SQL command or click Build Quer y to write an SQL command by using
the Quer y Builder .
8. Click Mappings and then map columns from the Available Input Columns list to columns in the
Available Destination Columns list by dragging columns from one list to another.
NOTE
The OLE DB destination automatically maps same-named columns.
9. To configure the error output, click Error Output . For more information, see Debugging Data Flow.
10. Click OK .
11. To save the updated package, click Save Selected Items on the File menu.
See Also
OLE DB Destination
Integration Services Transformations
Integration Services Paths
Data Flow Task
OLE DB Custom Properties
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Source Custom Proper ties
The OLE DB source has both custom properties and the properties common to all data flow components.
The following table describes the custom properties of the OLE DB source. All properties are read/write.
Note:
This property only takes effective when
data access mode is SQL command .
This property is not available in the
OLE DB Source Editor , but can be
set by using the Advanced Editor .
The output and the output columns of the OLE DB source have no custom properties.
For more information, see OLE DB Source.
Destination Custom Proper ties
The OLE DB destination has both custom properties and the properties common to all data flow components.
The following table describes the custom properties of the OLE DB destination. All properties are read/write.
NOTE
The FastLoad options listed here (FastLoadKeepIdentity, FastLoadKeepNulls, and FastLoadOptions) correspond to the
similarly named properties exposed by the IRowsetFastLoad interface implemented by the Microsoft OLE DB Provider for
SQL Server (SQLOLEDB). For more information, search for IRowsetFastLoad in the MSDN Library.
The input and the input columns of the OLE DB destination have no custom properties.
For more information, see OLE DB Destination.
See Also
Common Properties
Partition Processing Destination
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Partition Processing destination loads and processes an SQL Server Analysis Services partition. For more
information about partitions, see Partitions (Analysis Services - Multidimensional Data).
The Partition Processing destination includes the following features:
Options to perform incremental, full, or update processing.
Error configuration, to specify whether processing ignores errors or stops after a specified number of errors.
Mapping of input columns to partition columns.
For more information about processing Analysis Services objects, see Processing Options and Settings (Analysis
Services).
NOTE
Tasks described here do not apply to Analysis Services tabular models. You cannot map input columns to partition columns
for tabular models. You can instead use the Analysis Services Execute DDL task Analysis Services Execute DDL Task to process
the partition.
Options
Connection manager
Select an existing connection manager from the list, or create a new connection by clicking New .
New
Create a new connection by using the Add Analysis Ser vices Connection Manager dialog box.
List of available par titions
Select the partition to process.
Processing method
Select the processing method. The default value of this option is Full .
VA L UE DESC RIP T IO N
NOTE
Tasks described here do not apply to Analysis Services tabular models. You cannot map input columns to partition columns
for tabular models. You can instead use the Analysis Services Execute DDL task Analysis Services Execute DDL Task to process
the partition.
Options
Available Input Columns
View the list of available input columns. Use a drag-and-drop operation to map available input columns in the table
to destination columns.
Available Destination Columns
View the list of available destination columns. Use a drag-and-drop operation to map available destination columns
in the table to input columns.
Input Column
View input columns selected from the table above. You can change the mappings by using the list of Available
Input Columns .
Destination Column
View each available destination column, whether it is mapped or not.
Partition Processing Destination Editor (Advanced Page)
Use the Advanced page of the Par tition Processing Destination Editor dialog box to configure error handling.
NOTE
Tasks described here do not apply to Analysis Services tabular models. You cannot map input columns to partition columns
for tabular models. You can instead use the Analysis Services Execute DDL task Analysis Services Execute DDL Task to process
the partition.
Options
Use default error configuration.
Specify whether to use the default Analysis Services error handling. By default, this value is True .
Key error action
Specify how to handle records that have unacceptable key values.
VA L UE DESC RIP T IO N
Conver tToUnknown Convert the unacceptable key value to the Unknown value.
Ignore errors
Specify that errors should be ignored.
Stop on error
Specify that processing should stop when an error occurs.
Number of errors
Specify the error threshold at which processing should stop, if you have selected Stop on error .
On error action
Specify the action to take when the error threshold is reached, if you have selected Stop on error .
VA L UE DESC RIP T IO N
VA L UE DESC RIP T IO N
Duplicate key
Specify the action to take for a duplicate key error. By default, this value is IgnoreError .
VA L UE DESC RIP T IO N
VA L UE DESC RIP T IO N
VA L UE DESC RIP T IO N
See Also
Integration Services Error and Message Reference
Partition Processing Destination Custom Properties
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Partition Processing destination has both custom properties and the properties common to all data flow
components.
The following table describes the custom properties of the Partition Processing destination. All properties are
read/write.
The input and the input columns of the Partition Processing destination have no custom properties.
For more information, see Partition Processing Destination.
See Also
Common Properties
Power Query Source (Preview)
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This article describes how to configure the properties of the Power Query Source in the SQL Server Integration
Services (SSIS) data flow. Power Query is a technology that allows you to connect to various data sources and
transform data using Excel/Power BI Desktop. For more info, see Power Query - Overview and Learning article. The
script generated by Power Query can be copied & pasted into the Power Query Source in the SSIS data flow to
configure it.
NOTE
For the current preview release, Power Query Source can only be used on SQL Server 2017/2019 and Azure-SSIS Integration
Runtime (IR) in Azure Data Factory (ADF). You can download and install the latest Power Query Source for SQL Server
2017/2019 from here. Power Query Source for Azure-SSIS IR is already preinstalled. To provision Azure-SSIS IR, see Provision
SSIS in ADF article.
Three tabs are shown on the left side. On Queries tab, you can select your query mode from the dropdown menu.
Single Quer y mode allows you to copy & paste a single Power Query script from Excel/Power BI Desktop.
Single Quer y from Variable mode allows you to specify a string variable that contains your query to be
executed.
On Connection Managers tab, you can add or remove Power Query connection managers that contain data
source access credentials. Selecting the Detect Data Source button identifies the referenced data sources in your
query and lists them for you to assign the appropriate existing Power Query connection managers or create new
ones.
Finally, on Columns tab, you can edit the output column info.
In Add SSIS Connection Manager dialog, double-click on PowerQuer y from the list of connection manager
types.
In Power Quer y Connection Manager Editor , you need to specify Data Source Kind , Data Source Path , and
Authentication Kind , as well as assign the appropriate access credentials. For Data Source Kind , you can
currently select one of 22 kinds from the dropdown menu.
Some of these sources (Oracle , DB2 , MySQL , PostgreSQL , Teradata , Sybase ) require additional installations of
ADO.NET drivers that can be obtained from Power Query Prerequisites article. You can use the custom setup
interface to install them on your Azure-SSIS IR, see Customizing Azure-SSIS IR article.
For Data Source Path , you can enter data source-specific properties forming a connection string without the
authentication info. For example, the path for SQL data source is formed as <Server>;<Database> . You can select the
Edit button to assign values to data source-specific properties forming the path.
Finally, For Authentication Kind , you can select Anonymous /Windows Authentication /Username
Password /Key from the dropdown menu, enter the appropriate access credentials, and select the Test
Connection button to ensure that Power Query Source has been properly configured.
Current limitations
Oracle data source can not currently be used on Azure-SSIS IR, because Oracle ADO.NET driver can not be
installed there, so please install Oracle ODBC driver instead and use ODBC data source to connect to Oracle
for now, see ORACLE STANDARD ODBC example in Customizing Azure-SSIS IR article.
Web data source can not currently be used on Azure-SSIS IR with custom setups, so please use it on Azure-
SSIS IR without custom setups for now.
Next steps
Learn how to run SSIS packages in the Azure-SSIS IR as first-class activities in ADF pipelines. See Execute SSIS
Package activity Runtime article.
Raw File Source
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Raw File source reads raw data from a file. Because the representation of the data is native to the source, the
data requires no translation and almost no parsing. This means that the Raw File source can read data more
quickly than other sources such as the Flat File and the OLE DB sources.
The Raw File source is used to retrieve raw data that was previously written by the Raw File destination. You can
also point the Raw File source to an empty raw file that contains only the columns (metadata-only file). You use the
Raw File destination to generate the metadata-only file without having to run the package. For more information,
see Raw File Destination.
The raw file format contains sort information. The Raw File Destination saves all the sort information including the
comparison flags for string columns. The Raw File source reads and honors the sort information. You do have the
option of configuring the Raw File Source to ignore the sort flags in the file, using the Advanced Editor. For more
information about comparison flags, see Comparing String Data.
You configure the Raw File by specifying the name of the name of the file that the Raw File source reads.
NOTE
This source does not use a connection manager.
This source has one output. It does not support an error output.
Related Tasks
For information about how to set the properties of the component, see Set the Properties of a Data Flow
Component.
Related Content
Blog entry, Raw Files Are Awesome, on sqlservercentral.com
See Also
Raw File Destination
Data Flow
Raw File Destination
11/2/2020 • 8 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Raw File destination writes raw data to a file. Because the format of the data is native to the destination, the
data requires no translation and little parsing. This means that the Raw File destination can write data more quickly
than other destinations such as the Flat File and the OLE DB destinations.
In addition to writing raw data to a file, you can also use the Raw File destination to generate an empty raw file that
contains only the columns (metadata-only file), without having to run the package. You use the Raw File source to
retrieve raw data that was previously written by the destination. You can also point the Raw File source to the
metadata-only file.
The raw file format contains sort information. The Raw File Destination saves all the sort information including the
comparison flags for string columns. The Raw File source reads and honors the sort information. You do have the
option of configuring the Raw File Source to ignore the sort flags in the file, using the Advanced Editor. For more
information about comparison flags, see Comparing String Data.
You can configure the Raw File destination in the following ways:
Specify an access mode which is either the name of the file or a variable that contains the name of the file to
which the Raw File destination writes.
Indicate whether the Raw File destination appends data to an existing file that has the same name or creates
a new file.
The Raw File destination is frequently used to write intermediary results of partly processed data between package
executions. Storing raw data means that the data can be read quickly by a Raw File source and then further
transformed before it is loaded into its final destination. For example, a package might run several times, and each
time write raw data to files. Later, a different package can use the Raw File source to read from each file, use a
Union All transformation to merge the data into one data set, and then apply additional transformations that
summarize the data before loading the data into its final destination such as a SQL Server table.
NOTE
The Raw File destination supports null data but not binary large object (BLOB) data.
NOTE
The Raw File destination does not use a connection manager.
This source has one regular input. It does not support an error output.
Create once Creates a new file. If the file exists, the component fails.
Truncate and append Truncates an existing file and then writes the data to the file.
The metadata of the appended data must match the file
format.
Related Tasks
For information about how to set properties of the component, see Set the Properties of a Data Flow Component.
Related Content
Blog entry, Raw Files Are Awesome, on sqlservercentral.com.
See Also
Raw File Source
Data Flow
Raw File Custom Properties
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Source Custom Proper ties
The Raw File source has both custom properties and the properties common to all data flow components.
The following table describes the custom properties of the Raw File source. All properties are read/write.
AccessMode Integer (enumeration) The mode used to access the raw data.
The possible values are File name (0)
and File name from variable (1). The
default value is File name (0).
The output and the output columns of the Raw File source have no custom properties.
For more information, see Raw File Source.
Destination Custom Proper ties
The Raw File destination has both custom properties and the properties common to all data flow components.
The following table describes the custom properties of the Raw File destination. All properties are read/write.
NOTE
An append operation requires the metadata of the appended data to match the metadata of the data already present in the
file.
The input and the input columns of the Raw File destination have no custom properties.
For more information, see Raw File Destination.
See Also
Common Properties
Recordset Destination
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Recordset destination creates and populates an in-memory ADO recordset. The shape of the recordset is
defined by the input to the Recordset destination at design time.
Related Tasks
Use a Recordset Destination
Use a Recordset Destination
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Recordset destination does not save data to an external data source. Instead, the Recordset destination saves
data in memory in a recordset that is stored in an Integration Services package variable of the Object data type.
After the Recordset destination saves the data, you typically use a Foreach Loop container with the Foreach ADO
enumerator to process one row of the recordset at a time. The Foreach ADO enumerator saves the value from each
column of the current row into a separate package variable. Then, the tasks that you configure inside the Foreach
Loop container read those values from the variables and perform some action with them.
You can use the Recordset destination in many different scenarios. Here are some examples:
You can use a Send Mail task and the Integration Services expression language to send a customized e-mail
message for each row in the recordset.
You can use a Script component configured as a source, inside a Data Flow task, to read the column values
into the columns of the data flow. Then, you can use transformations and destinations to transform and save
the row. In this example, the Data Flow task runs once for each row.
The following sections first describe the general process of using the Recordset destination and then show a
specific example of how to use the destination.
NOTE
You have to convert the currency value in the Bonus column to a float before you can load that value into
a package variable whose type is Double .
4. On the Data Flow tab, add a Recordset destination, and connect the destination after the OLE DB source.
5. Open the Recordset Destination Editor , and configure the destination with the following settings:
a. On the Component Proper ties tab, for VariableName property, select User ::BonusRecordset .
b. On the Input Columns tab, select all three of the available columns.
To configure the Foreach Loop container and run the package
1. On the Control Flow tab of SSIS Designer, add a Foreach Loop container, and connect the container after
the Data Flow task.
2. Open the Foreach Loop Editor , and configure the container with the following settings:
a. On the Collection page, for Enumerator , select Foreach ADO Enumerator , and for ADO object
source variable , select User ::BonusRecordset .
b. On the Variable Mappings page, map User ::EmailAddress to index 0, User ::FirstName to index
1, and User ::Bonus to index 2.
3. On the Control Flow tab, inside the Foreach Loop container, add a Send Mail task.
4. Open the Send Mail Task Editor , and then on the Mail page, configure the task with the following
settings:
a. For SmtpConnection , select the SMTP connection manager that was configured previously.
b. For From , enter an appropriate e-mail address.
If you use your own e-mail address, you will be able to confirm that the package runs successfully.
You will receive undeliverable receipts for the messages sent by the Send Mail task to the fictitious
salespersons of AdventureWorks2012.
c. For To , enter a default e-mail address.
This value will not be used, but will be replaced at run time by the e-mail address of each
salesperson.
d. For Subject , enter "Your annual bonus".
e. For MessageSourceType , select Direct Input .
5. On the Expressions page of the Send Mail Task Editor , click the ellipsis button (...) to open the Proper ty
Expressions Editor .
6. In the Proper ty Expressions Editor , enter the following information:
a. For ToLine , add the following expression:
@[User::EmailAddress]
"Dear " + @[User::FirstName] + ": The amount of your bonus for this year is $" + (DT_WSTR, 12)
@[User::Bonus] + ". Thank you!"
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Recordset destination has both custom properties and the properties common to all data flow components.
The following table describes the custom properties of the Recordset destination. All properties are read/write.
The input and the input columns of the Recordset destination have no custom properties.
For more information, see Recordset Destination.
See Also
Common Properties
SAP BW Source
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The SAP BW source is the source component of the Microsoft Connector 1.1 for SAP BW. Thus, the SAP BW source
extracts data from an SAP Netweaver BW version 7 system and makes this data available to the data flow in a
Microsoft Integration Services package.
This source has one output and one error output.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
IMPORTANT
Extracting data from SAP Netweaver BW requires additional SAP licensing. Check with SAP to verify these requirements.
NOTE
For additional details about these objects and these configuration steps, see the SAP Netweaver BW documentation.
1. Log on to SAP Netweaver BW through the SAP GUI, enter transaction code SM59, and create an RFC
destination:
a. For Connection Type , select TCP/IP .
b. For Activation Type , select Registered Ser ver Program .
c. For Communication Type with Target System , select Non-Unicode (Inactive MDMP
Settings) .
d. Assign an appropriate Program ID.
2. Create an Open Hub Destination:
a. Go to the Administrator Workbench (transaction code RSA1) and, in the left pane, select Open Hub
Destination .
b. In the middle pane, right-click an InfoArea, and then select "Create Open Hub Destination" .
c. For Destination Type , select "Third Par ty Tool" , and then enter the previously created RFC
Destination.
d. Save and activate the new Open Hub Destination.
3. Create a Data Transfer Process (DTP):
a. In the middle pane of the InfoArea, right-click the previously created destination, and then select
"Create data transfer process" .
b. Configure, save, and activate the DTP.
c. On the menu, click Goto , and then click Settings for Batch Manager .
d. Update Number of processes to 1 for serial processing.
4. Create a process chain:
a. When configuring the process chain, select the Star t Using Metadata Chain or API as the
Scheduling Options of the Star t Process , and then add the previously created DTP as the
subsequent node.
b. Save and activate the process chain.
The SAP BW source can call the process chain to activate the data transfer process.
See Also
Microsoft Connector for SAP BW Components
SAP BW Source Editor (Connection Manager Page)
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Connection Manager page of the SAP BW Source Editor to select the SAP BW connection manager
for the SAP BW source. On this page, you also select the execution mode and the parameters for extracting the
data from the SAP Netweaver BW system.
To learn more about the SAP BW source component of the Microsoft Connector 1.1 for SAP BW, see SAP BW
Source.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
IMPORTANT
Extracting data from SAP Netweaver BW requires additional SAP licensing. Check with SAP to verify these requirements.
Static Options
NOTE
If you do not know all the values that are required to configure the source, you might have to ask your SAP administrator.
P - Trigger Process Chain Trigger a process chain. In this case, the Integration Services
package starts the extraction process.
W - Wait for Notify Wait for notification from the SAP Netweaver BW system to
begin extracting the data. In this case, the SAP Netweaver BW
system starts the extraction process.
E - Extract Only Retrieve the data that is associated with a particular Request
ID. In this case, the SAP Netweaver BW system has already
extracted the data into an internal table, and the Integration
Services package just reads the data.
Preview
Open the Preview dialog box in which you can preview results. For more information, see Preview.
IMPORTANT
The Preview option, that is available on the Connection Manager page of the SAP BW Source Editor, actually extracts
data. If you have configured SAP Netweaver BW to extract only data that has changed since the previous extraction,
selecting Preview will exclude the previewed data from the next extraction.
When you click Preview , you also open the Request Log dialog box. You can use this dialog box to view the
events that are logged during the request that is made to the SAP Netweaver BW system for sample data. For
more information, see Request Log.
See Also
SAP BW Source Editor (Columns Page)
SAP BW Source Editor (Error Output Page)
SAP BW Source Editor (Advanced Page)
Microsoft Connector for SAP BW F1 Help
SAP BW Source Editor (Columns Page)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Columns page of the SAP BW Source Editor to map an output column to each external (source)
column.
To learn more about the SAP BW source component of the Microsoft Connector 1.1 for SAP BW, see SAP BW
Source.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
IMPORTANT
Extracting data from SAP Netweaver BW requires additional SAP licensing. Check with SAP to verify these requirements.
Options
NOTE
If you do not know all the values that are required to configure the source, you might have to ask your SAP administrator.
See Also
SAP BW Source Editor (Connection Manager Page)
SAP BW Source Editor (Error Output Page)
SAP BW Source Editor (Advanced Page)
Microsoft Connector for SAP BW F1 Help
SAP BW Source Editor (Error Output Page)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Error Output page of the SAP BW Source Editor to select error handling options and to set properties
on error output columns.
To learn more about the SAP BW source component of the Microsoft Connector 1.1 for SAP BW, see SAP BW
Source.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
IMPORTANT
Extracting data from SAP Netweaver BW requires additional SAP licensing. Check with SAP to verify these requirements.
Options
NOTE
If you do not know all the values that are required to configure the source, you might have to ask your SAP administrator.
Input or Output
View the name of the data source.
Column
View the external (source) columns that you selected on the Columns page of the SAP BW Source Editor dialog
box. For more information about this dialog box, see SAP BW Source Editor (Columns Page).
Error
Specify what the SAP BW source component should do when there is an error: ignore the failure, redirect the row,
or fail the component.
Truncation
Specify what the SAP BW source component should do when a truncation occurs: ignore the failure, redirect the
row, or fail the component.
Description
View the description of the error.
Set this value to selected cells
Specify what the SAP BW source component should do to all the selected cells when an error or truncation occurs:
ignore the failure, redirect the row, or fail the component.
Apply
Apply the error handling option to the selected cells.
See Also
SAP BW Source Editor (Connection Manager Page)
SAP BW Source Editor (Columns Page)
SAP BW Source Editor (Advanced Page)
Microsoft Connector for SAP BW F1 Help
SAP BW Source Editor (Advanced Page)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Advanced page of the SAP BW Source Editor to specify the string conversion rule and the time-out
period, and also to reset the status of a particular Request ID.
To learn more about the SAP BW source component of the Microsoft Connector 1.1 for SAP BW, see SAP BW
Source.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
IMPORTANT
Extracting data from SAP Netweaver BW requires additional SAP licensing. Check with SAP to verify these requirements.
Options
NOTE
If you do not know all the values that are required to configure the source, you might have to ask your SAP administrator.
String Conversion
Specify the rule to apply for string conversion.
O P T IO N DESC RIP T IO N
Automatic string conversion Convert all strings to nvarchar when the SAP Netweaver BW
system is a Unicode system. Otherwise, convert all strings to
varchar .
Timeout (seconds)
Specify the maximum number of seconds that the source should wait.
NOTE
This option is only valid if you have selected W - Wait for Notify as the value of Execution Mode on the Connection
Manager page of the editor. For more information, see SAP BW Source Editor (Connection Manager Page).
Request ID
Specify the Request ID whose status you want to reset to "G - Green" when you click Reset .
Reset
Lets you reset the status of the specified Request ID to "G - Green", after prompting you for confirmation. This can
be useful when a problem has occurred, and the SAP Netweaver BW system has flagged the request with a yellow
or red status.
See Also
SAP BW Source Editor (Connection Manager Page)
SAP BW Source Editor (Columns Page)
SAP BW Source Editor (Error Output Page)
Microsoft Connector for SAP BW F1 Help
Look Up RFC Destination
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Look Up RFC Destination dialog box to look up an RFC destination that is defined in the SAP
Netweaver BW system. When the list of available RFC destinations appears, select the destination that you want,
and the component will populate the associated options with the required values.
Both the SAP BW source and the SAP BW destination use the Look Up RFC Destination dialog box. For more
information about these components of the Microsoft Connector 1.1 for SAP BW, see SAP BW Source and SAP BW
Destination.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
Options
Destination
View the name of the RFC destination that is defined in the SAP Netweaver BW system.
Gateway Host
View the server name or IP address of the gateway host. Usually, the name or IP address is the same as the SAP
application server.
Gateway Ser vice
View the name of the gateway service, in the format sapgwNN , where NN is the system number.
Program ID
View the Program ID that is associated with the RFC destination.
See Also
SAP BW Source Editor (Connection Manager Page)
SAP BW Destination Editor (Connection Manager Page)
Microsoft Connector for SAP BW F1 Help
Look Up Process Chain
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Look Up Process Chain dialog box to look up a process chain that is defined in the SAP Netweaver BW
system. When the list of available process chains appears, select the chain that you want, and the source will
populate the associated options with the required values.
The SAP BW source of the Microsoft Connector 1.1 for SAP BW uses the Look Up Process Chain dialog box. To
learn more about the SAP BW source, see SAP BW Source.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
Lookup Options
In the lookup fields, you can filter results by using the asterisk wildcard character (*), or by using a partial string in
combination with the asterisk wildcard character. However, if you leave a lookup field empty, the lookup operation
will only match empty strings in that field.
Process chain
Enter the name of the process chain that you want to look up, or enter a partial name with the asterisk wildcard
character (*). Or, use the asterisk wildcard character alone to include all process chains.
Look up
Look up matching process chains that are defined in the SAP Netweaver BW system.
Lookup Results
After you click the Look up button, a list of the process chains in the SAP Netweaver BW system appears in a table
with the following column headings:
Process Chain
Displays the name of the process chain that is defined in the SAP Netweaver BW system.
Description
Displays the description of the process chain.
When the list of available process chains appears, select the chain that you want, and the source will populate the
associated options with the required values.
See Also
SAP BW Source Editor (Connection Manager Page)
Microsoft Connector for SAP BW F1 Help
Request Log
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Request Log dialog box to view the events that are logged during the request that is made to the SAP
Netweaver BW system for sample data. This information can be useful if you have to troubleshoot your
configuration of the SAP BW source.
To learn more about the SAP BW source component of the Microsoft Connector 1.1 for SAP BW, see SAP BW
Source.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
IMPORTANT
Extracting data from SAP Netweaver BW requires additional SAP licensing. Check with SAP to verify these requirements.
NOTE
Clicking Preview also opens the Preview dialog box. For more information about this dialog box, see Preview.
Options
Time
Displays the time that the event that was logged.
Type
Displays the type of the event that was logged. The following table lists the possible event types.
VA L UE DESC RIP T IO N
S Success message.
VA L UE DESC RIP T IO N
E Error message
W Warning message.
I Informational message.
Message
Displays the message text that is associated with the logged event.
See Also
SAP BW Source Editor (Connection Manager Page)
Microsoft Connector for SAP BW F1 Help
Preview
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Preview dialog box to preview the data that the SAP BW source will extract.
IMPORTANT
The Preview option, that is available on the Connection Manager page of the SAP BW Source Editor , actually extracts
data. If you have configured SAP Netweaver BW to extract only data that has changed since the previous extraction,
selecting Preview will exclude the previewed data from the next extraction.
To learn more about the SAP BW source component of the Microsoft Connector 1.1 for SAP BW, see SAP BW
Source.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
IMPORTANT
Extracting data from SAP Netweaver BW requires additional SAP licensing. Check with SAP to verify these requirements.
NOTE
Clicking Preview also opens the Request Log dialog box. For more information about this dialog box, see Request
Log.
Options
The Preview dialog box displays the rows that are requested from the SAP Netweaver BW system. The columns
that are displayed are the columns that are defined in the source data.
There are no other options in this dialog box.
See Also
SAP BW Source Editor (Connection Manager Page)
Microsoft Connector for SAP BW F1 Help
SAP BW Destination
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The SAP BW destination is the destination component of the Microsoft Connector 1.1 for SAP BW. Thus, the SAP
BW destination loads data from the data flow in an Integration Services package into an SAP Netweaver BW
version 7 system.
This destination has one input and one error output.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
NOTE
For additional details about these objects and these configuration steps, see the SAP Netweaver BW documentation.
See Also
Microsoft Connector for SAP BW Components
SAP BW Destination Editor (Connection Manager
Page)
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Connection Manager page of the SAP BW Destination Editor to select the SAP BW connection
manager that the SAP BW destination will use. On this page, you also select the parameters for loading the data
into the SAP Netweaver BW system.
To learn more about the SAP BW destination of the Microsoft Connector 1.1 for SAP BW, see SAP BW Destination.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
Options
NOTE
If you do not know all the values that are required to configure the destination, you might have to ask your SAP
administrator.
VA L UE DESC RIP T IO N
D Transaction data
M Master data
T Texts
H Hierarchy data
Logical system
Enter the name of the logical system that is associated with the InfoPackage.
Look up
Look up the InfoPackage by using the Look Up InfoPackage dialog box. For more information about this dialog
box, see Look Up InfoPackage.
RFC Destination Options
You do not have to know and enter these values in advance. Use the Look up button to find and select the
appropriate RFC destination. After you select an RFC destination, the component enters the appropriate values for
these options.
Gateway host
Enter the server name or IP address of the gateway host. Usually, the name or IP address is the same as the SAP
application server.
Gateway ser vice
Enter the name of the gateway service, in the format sapgwNN , where NN is the system number.
Program ID
Enter the Program ID that is associated with the RFC destination.
Look up
Look up the RFC destination by using the Look Up RFC Destination dialog box. For more information about
this dialog box, see Look Up RFC Destination.
Create SAP BW Objects Options
Select object type
Select the type of SAP Netweaver BW object that you want to create. You can select one of the following types:
InfoObject
InfoCube
InfoSource
InfoPackage
Create
Create the selected type of SAP Netweaver BW object.
O B JEC T T Y P E RESULT
See Also
SAP BW Destination Editor (Mappings Page)
SAP BW Destination Editor (Error Output Page)
SAP BW Destination Editor (Advanced Page)
Microsoft Connector for SAP BW F1 Help
SAP BW Destination Editor (Mappings Page)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Mappings page of the SAP BW Destination Editor to map input columns to destination columns.
To learn more about the SAP BW destination of the Microsoft Connector 1.1 for SAP BW, see SAP BW Destination.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
Options
NOTE
If you do not know all the values that are required to configure the destination, you might have to ask your SAP
administrator.
The Mappings page of the SAP BW Destination Editor consists of two sections:
The upper section shows the available input and destination columns and lets you create mappings
between these two types of columns.
The lower section is a table that lists which input columns have been mapped to which output columns.
Upper Section Options
The upper section has the following options:
Available Input Columns
View the list of available input columns.
To map an input column to a destination column, drag a column from the Available Input Columns list and
drop that column onto a column in the Available Destination Columns list.
Available Destination Columns
View the list of available destination columns.
To map an input column to destination column, drag a column from the Available Input Columns list and drop
that column onto a column in the Available Destination Columns list.
The upper section also has a context menu that you can open by right-clicking on the background. This context
menu contains the following options:
Select All Mappings
Delete Selected Mappings
Map Items by Matching Names
Lower Section Columns
The lower section is a table of the mappings, and has the following columns:
Input Column
View the input columns that you have selected.
To map a different input column to the same destination column, select a different input column in the list. To
remove a mapping, select <ignore> to exclude the input column from the output.
Destination Column
View each available destination column, regardless of whether that column is mapped or not.
See Also
SAP BW Destination Editor (Connection Manager Page)
SAP BW Destination Editor (Error Output Page)
SAP BW Destination Editor (Advanced Page)
Microsoft Connector for SAP BW F1 Help
SAP BW Destination Editor (Error Output Page)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Error Output page of the SAP BW Destination Editor to specify error handling options.
To learn more about the SAP BW destination of the Microsoft Connector 1.1 for SAP BW, see SAP BW Destination.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
Options
NOTE
If you do not know all the values that are required to configure the destination, you might have to ask your SAP
administrator.
Input or Output
View the name of the input.
Column
This option is not used.
Error
Specify what the destination should do when an error occurs: ignore the failure, redirect the row, or fail the
component.
Truncation
This option is not used.
Description
View the description of the operation.
Set this value to selected cells
Specify what the destination should do to all the selected cells when an error or truncation occurs: ignore the
failure, redirect the row, or fail the component.
Apply
Apply the error handling option to the selected cells.
See Also
SAP BW Destination Editor (Connection Manager Page)
SAP BW Destination Editor (Mappings Page)
SAP BW Destination Editor (Advanced Page)
Microsoft Connector for SAP BW F1 Help
SAP BW Destination Editor (Advanced Page)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Advanced page of the SAP BW Destination Editor to set advanced settings such as package size and
time-out information.
To learn more about the SAP BW destination of the Microsoft Connector 1.1 for SAP BW, see SAP BW Destination.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
Options
NOTE
If you do not know all the values that are required to configure the destination, you might have to ask your SAP
administrator.
Package size
Specify how many rows of data will be transferred at a time. The optimal value for this parameter depends on the
SAP Netweaver BW system and on additional processing of the data that might occur. Typically, values between
2000 and 20000 offer the best performance.
Trigger process chain
(Optional) Specify the name of a process chain to be triggered after the loading of data is completed.
Timeout for waiting InfoPackage
Specify the maximum number of seconds that the destination should wait for the InfoPackage to finish.
Wait for data transfer to finish
Specify whether the destination should wait until the SAP Netweaver BW system has finished loading the data.
No InfoPackage Star t (Only Wait)
Specify that the destination does not trigger an InfoPackage, but just waits for notification that the SAP Netweaver
BW system has started loading the data.
See Also
SAP BW Destination Editor (Connection Manager Page)
SAP BW Destination Editor (Mappings Page)
SAP BW Destination Editor (Error Output Page)
Microsoft Connector for SAP BW F1 Help
Look Up InfoPackage
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Look Up InfoPackage dialog box to look up an InfoPackage that is defined in the SAP Netweaver BW
system. When the list of InfoPackages appears, select the InfoPackage that you want, and the destination will
populate the associated options with the required values.
The SAP BW destination of the Microsoft Connector 1.1 for SAP BW uses the Look Up Process Chain dialog box.
To learn more about the SAP BW destination, see SAP BW Destination.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
Lookup Options
In the lookup fields, you can filter results by using the asterisk wildcard character (*), or by using a partial string in
combination with the asterisk wildcard character. However, if you leave a lookup field empty, the lookup operation
will only match empty strings in that field.
InfoPackage
Enter the name of the InfoPackage that you want to look up, or a partial name with the asterisk wildcard character
(*). Or, use the asterisk wildcard character alone to include all InfoPackages.
InfoSource
Enter the name of the InfoSource, or a partial name with the asterisk wildcard character (*). Or, use the asterisk
wildcard character alone to include all InfoPackages regardless of InfoSource.
Source system
Enter the name of the source system, or a partial name with the asterisk wildcard character (*). Or, use the asterisk
wildcard character alone to include all InfoPackages regardless of source systems.
Look up
Look up matching InfoPackages that are defined in the SAP Netweaver BW system.
Lookup Results
After you click the Look up button, a list of the InfoPackages in the SAP Netweaver BW system appears in a table
with the following column headings.
InfoPackage
Displays the name of the InfoPackage that is defined in the SAP Netweaver BW system.
Type
Displays the type of the InfoPackage. The following table lists the possible values for the type.
VA L UE DESC RIP T IO N
Texts Texts.
Description
Displays the description of the InfoPackage.
InfoSource
Displays the name of the InfoSource, if any, that is associated with the InfoPackage.
Source System
Displays the name of the source system.
When the list of InfoPackages appears, select the InfoPackage that you want, and the destination will populate the
associated options with the required values.
See Also
SAP BW Destination Editor (Connection Manager Page)
Microsoft Connector for SAP BW F1 Help
Create New InfoObject
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Create New InfoObject dialog box to create a new InfoObject in the SAP Netweaver BW system.
You can open the Create InfoObject dialog box from the Connection Manager page of the SAP BW
Destination Editor . To learn more about the SAP BW destination, see SAP BW Destination.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
NOTE
Each row in the table represents a column in the data flow of the package.
c. To create an InfoObject while creating an InfoSouce for transactional data, select InfoSource , and
then click Create . In the Create InfoSource dialog box, select Transaction Data , and then click
OK . In the Create InfoSource for Transaction Data dialog box, in the IObject column for one of
the rows in the list, select Create to open the Create New InfoObject dialog box.
NOTE
Each row in the table represents a column in the data flow of the package.
d. To create an InfoObject while creating an InfoSource for master data, select InfoSource , and then
click Create . In the Create InfoSource dialog box, select Master Data , and then click OK . In the
Create InfoSource for Master Data dialog box, click New to open the Create New InfoObject
dialog box.
You can also open the Create New InfoObject dialog box by clicking New in the Attributes section of the
Create New InfoObject dialog box.
General Options
Characteristic
Create an InfoObject that represents dimension data.
Key figure
Create an InfoObject that represents fact data.
InfoObject name
Enter a name for the InfoObject.
Shor t description
Enter a short description for the InfoObject.
Long description
Enter a long description for the InfoObject.
Has master data
Indicate that the InfoObject contains master data in the form of attributes, texts, or hierarchies.
NOTE
Select this option if the InfoObject represents dimensional data and you have selected the Characteristic option.
Text Options
With Texts
Indicate that the InfoObject contains texts.
Shor t Text
Indicates that the InfoObject contains short texts.
Medium Text
Indicates that the InfoObject contains medium texts.
Long Text
Indicates that the InfoObject contains long texts.
Text Language-Dependent
Indicates that the texts are language-dependent.
Text Time-Dependent
Indicates that the texts are time-dependent.
Attributes Section
The Attributes section consists of a list of attributes for the InfoObject, and the options that let you add and
remove attributes from the list.
Attributes List
The Attributes list displays the attributes of the InfoObject that you are creating. The Attributes list has the
following column headings:
InfoObject
View the name of the InfoObject.
Description
View the description of the InfoObject.
InfoObject Type
View the type of the InfoObject. The following table lists the possible values for the type.
VA L UE DESC RIP T IO N
CHA Characteristics
UNI Units
Attributes Options
Use the following options to add and remove attributes for the InfoObject that you are creating:
Add
Add an existing InfoObject as an attribute.
To add an existing InfoObject, click Add, and then use the Look Up InfoObject dialog box to find the InfoObject.
For more information about this dialog box, see Look Up InfoObject.
New
Add a new InfoObject as an attribute.
To create and add a new InfoObject, click New, and then use a new instance of the Create New InfoObject dialog
box to create the new InfoObject.
Remove
Remove the selected InfoObject from the Attributes list.
See Also
Create InfoCube for Transaction Data
Create InfoSource
Create InfoSource for Transaction Data
Create InfoSource for Master Data
Microsoft Connector for SAP BW F1 Help
Create InfoCube for Transaction Data
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Create InfoCube for Transaction Data dialog box to create a new InfoCube for transaction data in the
SAP Netweaver BW system.
You can open the Create InfoCube for Transaction Data dialog box from the Connection Manager page of
the SAP BW Destination Editor . To learn more about the SAP BW destination, see SAP BW Destination.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
General Options
InfoCube name
Enter a name for the new InfoCube.
Long description
Enter a description for the new InfoCube.
Save & Activate
Save and activate the new InfoCube.
VA L UE DESC RIP T IO N
CHA Characteristics
UNI Units
Iobject - Search
Associate an existing InfoObject to the data flow column for the current row. To make this association, click
Search , and then use the Look Up InfoObject dialog box to select the existing InfoObject. For more information
about this dialog box, see Look Up InfoObject.
After you select an existing InfoObject, the component populates the InfoObject and Type columns with the
selected values.
Iobject - New
Create a new InfoObject and associate this new InfoObject to the data flow column in the current row. To create the
new InfoObject, click New , and then use the Create New InfoObject dialog box to create the InfoObject. For
more information about this dialog box, see Create New InfoObject.
After you create a new InfoObject, the component populates the InfoObject and Type columns with the new
values.
Iobject - Remove
Remove the association between the InfoObject and the data flow column for the current row. To remove this
association, click Remove .
See Also
Microsoft Connector for SAP BW F1 Help
Look Up InfoObject
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Look Up InfoObject dialog box to look up an InfoObject that is defined in the SAP Netweaver BW
system. When the list of available InfoObjects appears, select the InfoObject that you want, and the SAP BW
destination will populate the associated options with the required values.
The SAP BW destination of the Microsoft Connector 1.1 for SAP BW uses the Look Up InfoObject dialog box. To
learn more about the SAP BW destination, see SAP BW Destination.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
Lookup Options
In the lookup field text boxes, you can filter results by using the asterisk wildcard character (*), or by using a partial
string in combination with the asterisk wildcard character. However, if you leave a lookup field empty, the lookup
process will only match empty strings in that field.
Characteristics
Look up InfoObjects that represent characteristics.
Units
Look up InfoObjects that represent units.
Key figures
Look up InfoObjects that represent key figures.
Time characteristics
Look up InfoObjects that represent time characteristics.
Name
Enter the name of the InfoObject that you want to look up, or a partial name with the asterisk wildcard character
(*). Or, use the asterisk wildcard character alone to include all InfoObjects.
Description
Enter the description, or a partial description with the asterisk wildcard character (*). Or, use the asterisk wildcard
character alone to include all InfoObjects regardless of description.
Look up
Look up matching InfoObjects that are defined in the SAP Netweaver BW system.
Lookup Results
After you click the Look up button, a list of the InfoObjects in the SAP Netweaver BW system appears in a table
with the following column headings.
InfoObject
Displays the name of the InfoObject that is defined in the SAP Netweaver BW system.
Text (shor t)
Displays the short text that is associated with the InfoObject.
When the list of available InfoObjects appears, select the InfoObject that you want, and the destination will
populate the associated options with the required values.
See Also
Create InfoCube for Transaction Data
Create InfoSource
Create InfoSource for Transaction Data
Create InfoSource for Master Data
Create New InfoObject
SAP BW Destination Editor (Connection Manager Page)
Microsoft Connector for SAP BW F1 Help
Create InfoSource
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Create InfoSource dialog box to create a new InfoSource. To create the new InfoSource, you use either
the Create InfoSource for Transaction Data or the Create InfoSource for Master Data dialog box.
You can open the Create InfoSource dialog box from the Connection Manager page of the SAP BW
Destination Editor . To learn more about the SAP BW destination, see SAP BW Destination.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
Options
Transaction data
Create a new InfoSource for transaction data.
If you select this option, the Create InfoSource for Transaction Data dialog box opens. You use the Create
InfoSource for Transaction Data dialog box to create the new InfoSource. For more information about this
dialog box, see Create InfoSource for Transaction Data.
Master data
Create a new InfoSource for master data.
If you select this option, the Create InfoSource for Master Data dialog box opens. You use the Create
InfoSource for Master Data dialog box to create the new InfoSource. For more information about this dialog
box, see Create InfoSource for Master Data.
See Also
Microsoft Connector for SAP BW F1 Help
Create InfoSource for Transaction Data
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Create InfoSource for Transaction Data dialog box to create a new InfoSource for transaction data in
the SAP Netweaver BW system.
You can open the Create InfoSource for Transaction Data dialog box from the Connection Manager page
of the SAP BW Destination Editor . To learn more about the SAP BW destination, see SAP BW Destination.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
General Options
InfoSource name
Enter a name for the new InfoSource.
Shor t description
Enter a short description for the new InfoSource.
Long description
Enter a long description for the new InfoSource.
Source system
Select the source system associated with the InfoSource.
Save & Activate
Save and activate the new InfoSource.
VA L UE DESC RIP T IO N
CHA Characteristics
UNI Units
Unit Field
Specify the units that the InfoObject will use.
See Also
Create InfoSource
Microsoft Connector for SAP BW F1 Help
Create InfoSource for Master Data
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Create InfoSource for Master Data dialog box to create a new InfoSource for master data in the SAP
Netweaver BW system.
You can open the Create InfoSource for Master Data dialog box from the Connection Manager page of the
SAP BW Destination Editor . To learn more about the SAP BW destination, see SAP BW Destination.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
Options
InfoObject name
Enter the name of the InfoObject on which the new InfoSource should be based.
Look up
Look up the InfoObject. This option opens the Look Up InfoObject dialog box in which you can select the
InfoObject. For more information about this dialog box, see Look Up InfoObject.
After you select an InfoObject, the component populates the InfoObject name text box with the name of the
selected InfoObject.
New
Create a new InfoObject. This option opens the Create New InfoObject dialog box in which you can create the
new InfoObject. For more information about this dialog box, see Create New InfoObject.
After you create an InfoObject, the component populates the InfoObject name text box with the name of the
new InfoObject.
Shor t description
Enter a short description for the new InfoSource.
Long description
Enter a long description for the new InfoSource.
Source system
Select the source system to be associated with the new InfoSource.
Application
Enter the name of the application to be associated with the new InfoSource.
Attributes
Indicates that the master data consists of attributes.
Texts
Indicates that the master data consists of attributes.
Save & Activate
Save and activate the new InfoSource.
See Also
Create InfoSource
Microsoft Connector for SAP BW F1 Help
Create InfoPackage
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Create InfoPackage dialog box to create a new InfoPackage in the SAP Netweaver BW system.
You can open the Create InfoPackage dialog box from the Connection Manager page of the SAP BW
Destination Editor . To learn more about the SAP BW destination, see SAP BW Destination.
IMPORTANT
The documentation for the Microsoft Connector 1.1 for SAP BW assumes familiarity with the SAP Netweaver BW
environment. For more information about SAP Netweaver BW, or for information about how to configure SAP Netweaver
BW objects and processes, see your SAP documentation.
Options
InfoSource
Enter the name of the InfoSource on which the new InfoPackage should be based.
Shor t description
Enter a description for the new InfoPackage.
Source system
Select the source system with which the new InfoPackage should be associated.
Attributes
Indicates that the InfoPackage will load attribute data.
Texts
Indicates that the InfoPackage will load text data.
Transaction
Indicates that the InfoPackage will load transaction data.
Save & Activate
Save and activate the new InfoPackage.
See Also
Microsoft Connector for SAP BW F1 Help
SQL Server Compact Edition Destination
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The SQL Server Compact destination writes data to SQL Server Compact databases.
NOTE
On a 64-bit computer, you must run packages that connect to SQL Server Compact data sources in 32-bit mode. The SQL
Server Compact provider that Integration Services uses to connect to SQL Server Compact data sources is available only in a
32-bit version.
You configure the SQL Server Compact destination by specifying the name of the table into which the SQL Server
Compact destination inserts the data. The custom property TableName of the SQL Server Compact destination
contains the table name.
This destination uses an SQL Server Compact connection manager to connect to a data source, and the connection
manager specifies the OLE DB provider to use. For more information, see SQL Server Compact Edition Connection
Manager.
The SQL Server Compact destination includes the TableName custom property, which can be updated by a
property expression when the package is loaded. For more information, see Integration Services (SSIS)
Expressions, Use Property Expressions in Packages, and SQL Server Compact Edition Destination Custom
Properties.
The SQL Server Compact destination has one input and does not support an error output.
Related Tasks
For more information about how to set properties of this component, see Set the Properties of a Data Flow
Component.
See Also
Data Flow
SQL Server Compact Edition Destination Custom
Properties
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The SQL Server Compact destination has both custom properties and the properties common to all data flow
components.
The following table describes the custom properties of the SQL Server Compact destination. All properties are
read/write.
The input and the input columns of the SQL Server Compact destination have no custom properties.
For more information, see SQL Server Compact Edition Destination.
See Also
Common Properties
SQL Server Destination
11/2/2020 • 7 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The SQL Server destination connects to a local SQL Server database and bulk loads data into SQL Server tables
and views. You cannot use the SQL Server destination in packages that access a SQL Server database on a remote
server. Instead, the packages should use the OLE DB destination. For more information, see OLE DB Destination.
Permissions
Users who execute packages that include the SQL Server destination require the "Create global objects"
permission. You can grant this permission to users by using the Local Security Policy tool opened from the
Administrative Tools menu. If you receive an error message when executing a package that uses the SQL Server
destination, make sure that the account running the package has the "Create global objects" permission.
Bulk Inserts
If you attempt to use the SQL Server destination to bulk load data into a remote SQL Server database, you may see
an error message similar to the following: "An OLE DB record is available. Source: "Microsoft SQL Server Native
Client" Hresult: 0x80040E14 Description: "Could not bulk load because SSIS file mapping object
'Global\DTSQLIMPORT ' could not be opened. Operating system error code 2 (The system cannot find the file
specified.). Make sure you are accessing a local server via Windows security.""
The SQL Server destination offers the same high-speed insertion of data into SQL Server that the Bulk Insert task
provides; however, by using the SQL Server destination, a package can apply transformations to column data
before the data is loaded into SQL Server.
For loading data into SQL Server, you should consider using the SQL Server destination instead of the OLE DB
destination.
Bulk Insert Options
If the SQL Server destination uses a fast-load data access mode, you can specify the following fast load options:
Retain identity values from the imported data file, or use unique values assigned by SQL Server.
Retain null values during the bulk load operation.
Verify constraints on the target table or view during the bulk import operation.
Acquire a table-level lock for the duration of the bulk load operation.
Execute insert triggers defined on the destination table during the bulk load operation.
Specify the number of the first row in the input to load during the bulk insert operation.
Specify the number of the last row in the input to load during the bulk insert operation.
Specify the maximum number of errors allowed before the bulk load operation is canceled. Each row that
cannot be imported is counted as one error.
Specify the columns in the input that contain sorted data.
For more information about bulk load options, see BULK INSERT (Transact-SQL).
Performance Improvements
To improve the performance of a bulk insert and the access to table data during the bulk insert operation, you
should change the default options as follows:
Do not verify constraints on the target table or view during the bulk import operation.
Do not execute insert triggers defined on the destination table during the bulk load operation.
Do not apply a lock to the table. That way, the table remains available to other users and applications during
the bulk insert operation.
Related Tasks
Bulk Load Data by Using the SQL Server Destination
Set the Properties of a Data Flow Component
Related Content
Technical article, You may get "Unable to prepare the SSIS bulk insert for data insertion" error on UAC
enabled systems, on support.microsoft.com.
Technical article, The Data Loading Performance Guide, on msdn.microsoft.com.
Technical article, Using SQL Server Integration Services to Bulk Load Data, on simple-talk.com.
SQL Destination Editor (Connection Manager Page)
Use the Connection Manager page of the SQL Destination Editor dialog box to specify data source
information, and to preview the results. The SQL Server destination loads data into tables or views in a Microsoft
SQL Server database.
Options
OLE DB connection manager
Select an existing connection from the list, or create a new connection by clicking New .
New
Create a new connection by using the Configure OLE DB Connection Manager dialog box.
Use a table or view
Select an existing table or view from the list, or create a new connection by clicking New .
New
Create a new table by using the Create Table dialog box.
NOTE
When you click New , Integration Services generates a default CREATE TABLE statement based on the connected data source.
This default CREATE TABLE statement will not include the FILESTREAM attribute even if the source table includes a column
with the FILESTREAM attribute declared. To run an Integration Services component with the FILESTREAM attribute, first
implement FILESTREAM storage on the destination database. Then, add the FILESTREAM attribute to the CREATE TABLE
statement in the Create Table dialog box. For more information, see Binary Large Object (Blob) Data (SQL Server).
Preview
Preview results by using the Preview Quer y Results dialog box. Preview can display up to 200 rows.
NOTE
Clear the text box in the SQL Destination Editor to indicate that you do not want to assign a value for this property. Use -
1 in the Proper ties window, the Advanced Editor , and the object model.
Last Row
Specify the last row to insert. The default value of this property is -1 , indicating that no value has been assigned.
NOTE
Clear the text box in the SQL Destination Editor to indicate that you do not want to assign a value for this property. Use -
1 in the Proper ties window, the Advanced Editor , and the object model.
NOTE
Clear the text box in the SQL Destination Editor to indicate that you do not want to assign a value for this property. Use -
1 in the Proper ties window, the Advanced Editor , and the object model.
Timeout
Specify the number of seconds to wait before the bulk insert stops because of a time-out.
Order columns
Type the names of the sort columns. Each column can be sorted in ascending or descending order. If you use
multiple sort columns, delimit the list with commas.
See Also
Data Flow
Bulk Load Data by Using the SQL Server Destination
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To add and configure a SQL Server destination, the package must already include at least one Data Flow task and a
data source.
To load data using a SQL Server destination
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Data Flow tab, and then, from the Toolbox , drag the SQL Server destination to the design surface.
4. Connect the destination to a source or a previous transformation in the data flow by dragging a connector
to the destination.
5. Double-click the destination.
6. In the SQL Ser ver Destination Editor , on the Connection Manager page, select an existing OLE DB
connection manager or click New to create a new connection manager. For more information, see OLE DB
Connection Manager.
7. To specify the table or view into which to load the data, do one of the following:
Select an existing table or view.
Click New , and in the Create Table dialog boxwrite an SQL statement that creates a table or view.
NOTE
Integration Services generates a default CREATE TABLE statement based on the connected data source. This
default CREATE TABLE statement will not include the FILESTREAM attribute even if the source table includes a
column with the FILESTREAM attribute declared. To run an Integration Services component with the
FILESTREAM attribute, first implement FILESTREAM storage on the destination database. Then, add the
FILESTREAM attribute to the CREATE TABLE statement in the Create Table dialog box. For more information,
see Binary Large Object (Blob) Data (SQL Server).
8. Click Mappings and map columns from the Available Input Columns list to columns in the Available
Destination Columns list by dragging columns from one list to another.
NOTE
The destination automatically maps same-named columns.
9. Click Advanced and set the bulk load options: Keep identity , Keep nulls , Table lock , Check
constraints , and Fire triggers .
Optionally, specify the first and last input rows to insert, the maximum number of errors that can occur
before the insert operation stops, and the columns on which the insert is sorted.
NOTE
The sort order is determined by the order in which the columns are listed.
10. Click OK .
11. To save the updated package, click Save Selected Items on the File menu.
See Also
SQL Server Destination
Integration Services Transformations
Integration Services Paths
Data Flow Task
SQL Server Destination Custom Properties
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The SQL Server destination has both custom properties and the properties common to all data flow components.
The following table describes the custom properties of the SQL Server destination. All properties are read/write.
The input and the input columns of the SQL Server destination have no custom properties.
For more information, see SQL Server Destination.
See Also
Common Properties
Integration Services Transformations
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SQL Server Integration Services transformations are the components in the data flow of a package that
aggregate, merge, distribute, and modify data. Transformations can also perform lookup operations and
generate sample datasets. This section describes the transformations that Integration Services includes and
explains how they work.
T RA N SF O RM AT IO N DESC RIP T IO N
Slowly Changing Dimension Transformation The transformation that configures the updating of a
slowly changing dimension.
Term Extraction Transformation The transformation that extracts terms from text.
Term Lookup Transformation The transformation that looks up terms in a reference table
and counts terms extracted from text.
Data Mining Query Transformation The transformation that runs data mining prediction
queries.
DQS Cleansing Transformation The transformation that corrects data from a connected
data source by applying rules that were created for the
data source.
Row Transformations
The following transformations update column values and create new columns. The transformation is applied
to each row in the transformation input.
T RA N SF O RM AT IO N DESC RIP T IO N
Copy Column Transformation The transformation that adds copies of input columns to
the transformation output.
T RA N SF O RM AT IO N DESC RIP T IO N
Data Conversion Transformation The transformation that converts the data type of a
column to a different data type.
Derived Column Transformation The transformation that populates columns with the
results of expressions.
Export Column Transformation The transformation that inserts data from a data flow into
a file.
Import Column Transformation The transformation that reads data from a file and adds it
to a data flow.
OLE DB Command Transformation The transformation that runs SQL commands for each row
in a data flow.
Rowset Transformations
The following transformations create new rowsets. The rowset can include aggregate and sorted values,
sample rowsets, or pivoted and unpivoted rowsets.
T RA N SF O RM AT IO N DESC RIP T IO N
Percentage Sampling Transformation The transformation that creates a sample data set using a
percentage to specify the sample size.
Row Sampling Transformation The transformation that creates a sample data set by
specifying the number of rows in the sample.
T RA N SF O RM AT IO N DESC RIP T IO N
Conditional Split Transformation The transformation that routes data rows to different
outputs.
T RA N SF O RM AT IO N DESC RIP T IO N
Union All Transformation The transformation that merges multiple data sets.
Merge Transformation The transformation that merges two sorted data sets.
Merge Join Transformation The transformation that joins two data sets using a FULL,
LEFT, or INNER join.
Cache Transform The transformation that writes data from a connected data
source in the data flow to a Cache connection manager
that saves the data to a cache file. The Lookup
transformation performs lookups on the data in the cache
file.
Balanced Data Distributor Transformation The transformation distributes buffers of incoming rows
uniformly across outputs on separate threads to improve
performance of SSIS packages running on multi-core and
multi-processor servers.
Auditing Transformations
Integration Services includes the following transformations to add audit information and count rows.
T RA N SF O RM AT IO N DESC RIP T IO N
Row Count Transformation The transformation that counts rows as they move
through it and stores the final count in a variable.
Custom Transformations
You can also write custom transformations. For more information, see Developing a Custom Transformation
Component with Synchronous Outputs and Developing a Custom Transformation Component with
Asynchronous Outputs.
Aggregate Transformation
11/2/2020 • 11 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Aggregate transformation applies aggregate functions, such as Average, to column values and copies the
results to the transformation output. Besides aggregate functions, the transformation provides the GROUP BY
clause, which you can use to specify groups to aggregate across.
Operations
The Aggregate transformation supports the following operations.
Group by Divides datasets into groups. Columns of any data type can
be used for grouping. For more information, see GROUP BY
(Transact-SQL).
Sum Sums the values in a column. Only columns with numeric data
types can be summed. For more information, see SUM
(Transact-SQL).
The Aggregate transformation handles null values in the same way as the SQL Server relational database engine.
The behavior is defined in the SQL-92 standard. The following rules apply:
In a GROUP BY clause, nulls are treated like other column values. If the grouping column contains more than
one null value, the null values are put into a single group.
In the COUNT (column name) and COUNT (DISTINCT column name) functions, nulls are ignored and the
result excludes rows that contain null values in the named column.
In the COUNT (*) function, all rows are counted, including rows with null values.
Big Numbers in Aggregates
A column may contain numeric values that require special consideration because of their large value or precision
requirements. The Aggregation transformation includes the IsBig property, which you can set on output columns
to invoke special handling of big or high-precision numbers. If a column value may exceed 4 billion or a precision
beyond a float data type is required, IsBig should be set to 1.
Setting the IsBig property to 1 affects the output of the aggregation transformation in the following ways:
The DT_R8 data type is used instead of the DT_R4 data type.
Count results are stored as the DT_UI8 data type.
Distinct count results are stored as the DT_UI4 data type.
NOTE
You cannot set IsBig to 1 on columns that are used in the GROUP BY, Maximum, or Minimum operations.
Performance Considerations
The Aggregate transformation includes a set of properties that you can set to enhance the performance of the
transformation.
When performing a Group by operation, set the Keys or KeysScale properties of the component and the
component outputs. Using Keys, you can specify the exact number of keys the transformation is expected to
handle. (In this context, Keys refers to the number of groups that are expected to result from a Group by
operation.) Using KeysScale, you can specify an approximate number of keys. When you specify an
appropriate value for Keys or KeyScale, you improve performance because the tranformation is able to
allocate adequate memory for the data that the transformation caches.
When performing a Distinct count operation, set the CountDistinctKeys or CountDistinctScale properties
of the component. Using CountDistinctKeys, you can specify the exact number of keys the transformation is
expected to handle for a count distinct operation. (In this context, CountDistinctKeys refers to the number of
distinct values that are expected to result from a Distinct count operation.) Using CountDistinctScale, you
can specify an approximate number of keys for a count distinct operation. When you specify an appropriate
value for CountDistinctKeys or CountDistinctScale, you improve performance because the transformation is
able to allocate adequate memory for the data that the transformation caches.
Related Tasks
Aggregate Values in a Dataset by Using the Aggregate Transformation
Aggregate Transformation Editor (Aggregations Tab)
Use the Aggregations tab of the Aggregate Transformation Editor dialog box to specify columns for
aggregation and aggregation properties. You can apply multiple aggregations. This transformation does not
generate an error output.
NOTE
The options for key count, key scale, distinct key count, and distinct key scale apply at the component level when specified
on the Advanced tab, at the output level when specified in the advanced display of the Aggregations tab, and at the
column level when specified in the column list at the bottom of the Aggregations tab.
In the Aggregate transformation, Keys and Keys scale refer to the number of groups that are expected to result from a
Group by operation. Count distinct keys and Count distinct scale refer to the number of distinct values that are
expected to result from a Distinct count operation.
Options
Advanced / Basic
Display or hide options to configure multiple aggregations for multiple outputs. By default, the Advanced options
are hidden.
Aggregation Name
In the Advanced display, type a friendly name for the aggregation.
Group By Columns
In the Advanced display, select columns for grouping by using the Available Input Columns list as described
below.
Key Scale
In the Advanced display, optionally specify the approximate number of keys that the aggregation can write. By
default, the value of this option is Unspecified . If both the Key Scale and Keys properties are set, the value of
Keys takes precedence.
VA L UE DESC RIP T IO N
Keys
In the Advanced display, optionally specify the exact number of keys that the aggregation can write. If both Key
Scale and Keys are specified, Keys takes precedence.
Available Input Columns
Select from the list of available input columns by using the check boxes in this table.
Input Column
Select from the list of available input columns.
Output Alias
Type an alias for each column. The default is the name of the input column; however, you can choose any unique,
descriptive name.
Operation
Choose from the list of available operations, using the following table as a guide.
GroupBy Divides datasets into groups. Columns with any data type can
be used for grouping. For more information, see GROUP BY.
Sum Sums the values in a column. Only columns with numeric data
types can be summed. For more information, see SUM.
Comparison Flags
If you choose Group By , use the check boxes to control how the transformation performs the comparison. For
information on the string comparison options, see Comparing String Data.
Count Distinct Scale
Optionally specify the approximate number of distinct values that the aggregation can write. By default, the value
of this option is Unspecified . If both CountDistinctScale and CountDistinctKeys are specified,
CountDistinctKeys takes precedence.
VA L UE DESC RIP T IO N
Options
Keys scale
Optionally specify the approximate number of keys that the aggregation expects. The transformation uses this
information to optimize its initial cache size. By default, the value of this option is Unspecified . If both Keys scale
and Number of keys are specified, Number of keys takes precedence.
VA L UE DESC RIP T IO N
Number of keys
Optionally specify the exact number of keys that the aggregation expects. The transformation uses this information
to optimize its initial cache size. If both Keys scale and Number of keys are specified, Number of keys takes
precedence.
Count distinct scale
Optionally specify the approximate number of distinct values that the aggregation can write. By default, the value
of this option is Unspecified . If both Count distinct scale and Count distinct keys are specified, Count
distinct keys takes precedence.
VA L UE DESC RIP T IO N
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To add and configure an Aggregate transformation, the package must already include at least one Data Flow task
and one source.
To aggregate values in a dataset
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Data Flow tab, and then, from the Toolbox , drag the Aggregate transformation to the design
surface.
4. Connect the Aggregate transformation to the data flow by dragging a connector from the source or the
previous transformation to the Aggregate transformation.
5. Double-click the transformation.
6. In the Aggregate Transformation Editor dialog box, click the Aggregations tab.
7. In the Available Input Columns list, select the check box by the columns on which you want to aggregate
values. The selected columns appear in the table.
NOTE
You can select a column multiple times, applying multiple transformations to the column. To uniquely identify
aggregations, a number is appended to the default name of the output alias of the column.
NOTE
Providing the number of distinct values, exact or approximate, optimizes performance, because the transformation
can preallocate an appropriate amount of memory to do its work.
12. Optionally, click Advanced and update the name of the Aggregate transformation output. If the
aggregations include a Group By operation, you can select an approximate count of grouping key values in
the Keys Scale column or specify an exact number of grouping key values in the Keys column.
NOTE
Providing the number of distinct values, exact or approximate, optimizes performance, because the transformation
can preallocate an appropriate amount of memory to do its work.
NOTE
The Keys Scale and Keys options are mutually exclusive. If you enter values in both columns, the larger value in
either Keys Scale or Keys is used.
13. Optionally, click the Advanced tab and set the attributes that apply to optimizing all the operations that the
Aggregate transformation performs.
14. Click OK .
15. To save the updated package, click Save Selected Items on the File menu.
See Also
Aggregate Transformation
Integration Services Transformations
Integration Services Paths
Data Flow Task
Audit Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Audit transformation enables the data flow in a package to include data about the environment in which the
package runs. For example, the name of the package, computer, and operator can be added to the data flow.
Microsoft SQL Server Integration Services includes system variables that provide this information.
System Variables
The following table describes the system variables that the Audit transformation can use.
VA L UE DESC RIP T IO N
Execution instance GUID Insert the GUID that uniquely identifies the execution instance
of the package.
Version ID Insert the GUID that uniquely identifies the version of the
package.
Execution star t time Insert the time at which package execution started.
Machine name Insert the name of the computer on which the package was
launched.
User name Insert the login name of the user who launched the package.
Task name Insert the name of the Data Flow task with which the Audit
transformation is associated.
Task ID Insert the GUID that uniquely identifies the Data Flow task
with which the Audit transformation is associated.
Balanced Data Distributor Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Balanced Data Distributor (BDD) transformation takes advantage of concurrent processing capability of
modern CPUs. It distributes buffers of incoming rows uniformly across outputs on separate threads. By using
separate threads for each output path, the BDD component improves the performance of an SSIS package on
multi-core or multi-processor machines.
The following diagram shows a simple example of using the BDD transformation. In this example, the BDD
transformation picks one pipeline buffer at a time from the input data from a flat file source and sends it down one
of the three output paths in a round robin fashion. In SQL Server Data Tools, you can check the values of a
DefaultBufferSize(default size of the pipeline buffer) and DefaultBufferMaxRows(default maximum number of rows
in a pipeline buffer) in the Proper ties window displaying properties of a data flow task.
The Balanced Data Distributor transformation helps improve performance of a package in a scenario that satisfies
the following conditions:
1. There is large amount of data coming into the BDD transformation. If the data size is small and only one
buffer can hold the data, there is no point in using the BDD transformation. If the data size is large and
several buffers are required to hold the data, BDD can efficiently process buffers of data in parallel by using
separate threads.
2. The data can be read faster than the rest of the data flow can process it. In this scenario, the transformations
that are performed on the data run slowly compared to the rate at which data is coming. If the bottleneck is
at the destination, the destination must be parallelizable though.
3. The data does not need to be ordered. For example, if the data needs to stay sorted, you should not split the
data using the BDD transformation.
Note that if the bottleneck in an SSIS package is due to the rate at which data can be read from the source, the BDD
component does not help improve the performance. If the bottleneck in an SSIS package is because the destination
does not support parallelism, the BDD does not help; however, you can perform all the transformations in parallel
and use the Union All transformation to combine the output data coming out of different output paths of the BDD
transformation before sending the data to the destination.
IMPORTANT
See the Balanced Data Distributor video on the TechNet Library for a presentation with a demo on using the transformation.
Character Map Transformation
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Character Map transformation applies string functions, such as conversion from lowercase to uppercase, to
character data. This transformation operates only on column data with a string data type.
The Character Map transformation can convert column data in place or add a column to the transformation output
and put the converted data in the new column. You can apply different sets of mapping operations to the same
input column and put the results in different columns. For example, you can convert the same column to
uppercase and lowercase and put the results in two different columns.
Mapping can, under some circumstances, cause data to be truncated. For example, truncation can occur when
single-byte characters are mapped to characters with a multibyte representation. The Character Map
transformation includes an error output, which can be used to direct truncated data to separate output. For more
information, see Error Handling in Data.
This transformation has one input, one output, and one error output.
Mapping Operations
The following table describes the mapping operations that the Character Map transformation supports.
Linguistic casing Applies linguistic casing instead of the system rules. Linguistic
casing refers to functionality provided by the Win32 API for
Unicode simple case mapping of Turkic and other locales.
O P ERAT IO N A O P ERAT IO N B
Lowercase Uppercase
Hiragana Katakana
VA L UE DESC RIP T IO N
New column Save the data in a new column. Assign the column name
under Output Alias .
Operation
Select from the list the string functions to apply to column data.
VA L UE DESC RIP T IO N
Linguistic casing Apply linguistic rules of casing (Unicode simple case mapping
for Turkic and other locales) instead of the system rules.
Output Alias
Type an alias for each output column. The default is Copy of followed by the input column name; however, you
can choose any unique, descriptive name.
Configure Error Output
Use the Configure Error Output dialog box to specify error handling options for this transformation.
Conditional Split Transformation
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Conditional Split transformation can route data rows to different outputs depending on the content of the
data. The implementation of the Conditional Split transformation is similar to a CASE decision structure in a
programming language. The transformation evaluates expressions, and based on the results, directs the data row
to the specified output. This transformation also provides a default output, so that if a row matches no expression
it is directed to the default output.
Output 2
SUBSTRING(FirstName,1,1) == "B"
Integration Services includes functions and operators that you can use to create the expressions that evaluate
input data and direct output data. For more information, see Integration Services (SSIS) Expressions.
The Conditional Split transformation includes the FriendlyExpression custom property. This property can be
updated by a property expression when the package is loaded. For more information, see Use Property
Expressions in Packages and Transformation Custom Properties.
This transformation has one input, one or more outputs, and one error output.
You can set properties through SSIS Designer or programmatically.
The Advanced Editor dialog box reflects the properties that can be set programmatically. For more information
about the properties that you can set in the Advanced Editor dialog box or programmatically, click one of the
following topics:
Common Properties
Transformation Custom Properties
For more information about how to set properties, click one of the following topics:
Split a Dataset by Using the Conditional Split Transformation
Set the Properties of a Data Flow Component
Related Tasks
Split a Dataset by Using the Conditional Split Transformation
NOTE
The Conditional Split transformation directs each input row to one output only. If you enter multiple conditions, the
transformation sends each row to the first output for which the condition is true and disregards subsequent conditions for
that row. If you need to evaluate several conditions successively, you may need to concatenate multiple Conditional Split
transformations in the data flow.
Options
Order
Select a row and use the arrow keys at right to change the order in which to evaluate expressions.
Output Name
Provide an output name. The default is a numbered list of cases; however, you can choose any unique, descriptive
name.
Condition
Type an expression or build one by dragging from the list of available columns, variables, functions, and
operators.
The value of this property can be specified by using a property expression.
Related topics: Integration Services (SSIS) Expressions, Operators (SSIS Expression), and Functions (SSIS
Expression)
Default output name
Type a name for the default output, or use the default.
Configure error output
Specify how to handle errors by using the Configure Error Output dialog box.
See Also
Data Flow
Integration Services Transformations
Split a Dataset by Using the Conditional Split
Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To add and configure a Conditional Split transformation, the package must already include at least one Data Flow
task and a source.
To conditionally split a dataset
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Data Flow tab, and, from the Toolbox , drag the Conditional Split transformation to the design
surface.
4. Connect the Conditional Split transformation to the data flow by dragging the connector from the data
source or the previous transformation to the Conditional Split transformation.
5. Double-click the Conditional Split transformation.
6. In the Conditional Split Transformation Editor , build the expressions to use as conditions by dragging
variables, columns, functions, and operators to the Condition column in the grid. Or, you can type the
expression in the Condition column.
NOTE
A variable or column can be used in multiple expressions.
NOTE
If the expression is not valid, the expression text is highlighted and a ToolTip on the column describes the errors.
7. Optionally, modify the values in the Output Name column. The default names are Case 1, Case 2, and so
forth.
8. To modify the sequence in which the conditions are evaluated, click the up arrow or down arrow.
NOTE
Place the conditions that are most likely to be encountered at the top of the list.
9. Optionally, modify the name of the default output for data rows that do not match any condition.
10. To configure an error output, click Configure Error Output . For more information, see Debugging Data
Flow.
11. Click OK .
12. To save the updated package, click Save Selected Items on the File menu.
See Also
Conditional Split Transformation
Integration Services Transformations
Integration Services Paths
Integration Services Data Types
Data Flow Task
Integration Services (SSIS) Expressions
Copy Column Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Copy Column transformation creates new columns by copying input columns and adding the new columns to
the transformation output. Later in the data flow, different transformations can be applied to the column copies.
For example, you can use the Copy Column transformation to create a copy of a column and then convert the
copied data to uppercase characters by using the Character Map transformation, or apply aggregations to the new
column by using the Aggregate transformation.
NOTE
When you are simply copying all of your source data to a destination, it may not be necessary to use the Copy Column
transformation. In some scenarios, you can connect a source directly to a destination, when no data transformation is
required. In these circumstances it is often preferable to use the SQL Server Import and Export Wizard to create your
package for you. Later you can enhance and reconfigure the package as needed. For more information, see SQL Server
Import and Export Wizard.
Options
Available Input Columns
Select columns to copy by using the check boxes. Your selections add input columns to the table below.
Input Column
Select columns to copy from the list of available input columns. Your selections are reflected in the check box
selections in the Available Input Columns table.
Output Alias
Type an alias for each new output column. The default is Copy of , followed by the name of the input column;
however, you can choose any unique, descriptive name.
See Also
Data Flow
Integration Services Transformations
Data Conversion Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Data Conversion transformation converts the data in an input column to a different data type and then copies
it to a new output column. For example, a package can extract data from multiple sources, and then use this
transformation to convert columns to the data type required by the destination data store. You can apply multiple
conversions to a single input column.
Using this transformation, a package can perform the following types of data conversions:
Change the data type. For more information, see Integration Services Data Types.
NOTE
If you are converting data to a date or a datetime data type, the date in the output column is in the ISO format,
although the locale preference may specify a different format.
Set the column length of string data and the precision and scale on numeric data. For more information,
see Precision, Scale, and Length (Transact-SQL).
Specify a code page. For more information, see Comparing String Data.
NOTE
When copying between columns with a string data type, the two columns must use the same code page.
If the length of an output column of string data is shorter than the length of its corresponding input column, the
output data is truncated. For more information, see Error Handling in Data.
This transformation has one input, one output, and one error output.
Related Tasks
You can set properties through the SSIS Designer or programmatically. For information about using the Data
Conversion Transformation in the SSIS Designer, see Convert Data to a Different Data Type by Using the Data
Conversion Transformation. For information about setting properties of this transformation programmatically, see
Common Properties and Transformation Custom Properties.
Related Content
Blog entry, Performance Comparison between Data Type Conversion Techniques in SSIS 2008, on
blogs.msdn.com.
Options
Available Input Columns
Select columns to convert by using the check boxes. Your selections add input columns to the table below.
Input Column
Select columns to convert from the list of available input columns. Your selections are reflected in the check box
selections above.
Output Alias
Type an alias for each new column. The default is Copy of followed by the input column name; however, you can
choose any unique, descriptive name.
Data Type
Select an available data type from the list. For more information, see Integration Services Data Types.
Length
Set the column length for string data.
Precision
Set the precision for numeric data.
Scale
Set the scale for numeric data.
Code page
Select the appropriate code page for columns of type DT_STR.
Configure error output
Specify how to handle row-level errors by using the Configure Error Output dialog box.
See Also
Fast Parse
Data Flow
Integration Services Transformations
Convert Data Type with Data Conversion
Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To add and configure a Data Conversion transformation, the package must already include at least one Data Flow
task and one source.
To convert data to a different data type
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Data Flow tab, and then, from the Toolbox , drag the Data Conversion transformation to the
design surface.
4. Connect the Data Conversion transformation to the data flow by dragging a connector from the source or
the previous transformation to the Data Conversion transformation.
5. Double-click the Data Conversion transformation.
6. In the Data ConversionTransformation Editor dialog box, in the Available Input Columns table, select
the check box next to the columns whose data type you want to convert.
NOTE
You can apply multiple data conversions to an input column.
See Also
Data Conversion Transformation
Integration Services Transformations
Integration Services Paths
Integration Services Data Types
Data Flow Task
Data Mining Query Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Data Mining Query transformation performs prediction queries against data mining models. This
transformation contains a query builder for creating Data Mining Extensions (DMX) queries. The query builder lets
you create custom statements for evaluating the transformation input data against an existing mining model using
the DMX language. For more information, see Data Mining Extensions (DMX) Reference.
One transformation can execute multiple prediction queries if the models are built on the same data mining
structure. For more information, see Data Mining Query Tools.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The DQS Cleansing transformation uses Data Quality Services (DQS) to correct data from a connected data source,
by applying approved rules that were created for the connected data source or a similar data source. For more
information about data correction rules, see DQS Knowledge Bases and Domains. For more information DQS, see
Data Quality Services Concepts.
To determine whether the data has to be corrected, the DQS Cleansing transformation processes data from an
input column when the following conditions are true:
The column is selected for data correction.
The column data type is supported for data correction.
The column is mapped a domain that has a compatible data type.
The transformation also includes an error output that you configure to handle row-level errors. To configure the
error output, use the DQS Cleansing Transformation Editor .
You can include the Fuzzy Grouping Transformation in the data flow to identify rows of data that are likely to be
duplicates.
Related Tasks
Open Integration Services Projects in Data Quality Client
Import Cleansing Project Values into a Domain
Apply Data Quality Rules to Data Source
Related Content
Open, Unlock, Rename, and Delete a Data Quality Project
Article, Cleansing complex data using composite domains, on social.technet.microsoft.com.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A DQS Cleansing connection manager enables a package to connect to a Data Quality Services server. The DQS
Cleansing transformation uses the DQS Cleansing connection manager.
For more information about Data Quality Services, see Data Quality Services Concepts.
IMPORTANT
The DQS Cleansing connection manager supports only Windows Authentication.
Related Tasks
You can set properties through SSIS Designer or programmatically. For more information about the properties that
you can set in SSIS Designer, see DQS Cleansing Transformation Editor Dialog Box.
For information about configuring a connection manager programmatically, see documentation for the
ConnectionManager class in the Developer Guide.
Apply Data Quality Rules to Data Source
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can use Data Quality Services (DQS) to correct data in the package data flow by connecting the DQS Cleansing
transformation to the data source. For more information about DQS, see Data Quality Services Concepts. For more
information about the transformation, see DQS Cleansing Transformation.
When you process data with the DQS Cleansing transformation, a data quality project is created on the Data
Quality Server. You use the Data Quality Client to manage the project. For more information, see Open, Unlock,
Rename, and Delete a Data Quality Project.
To correct data in the data flow
1. Create a package.
2. Add and configure the DQS Cleansing transformation. For more information, see DQS Cleansing
Transformation Editor Dialog Box.
3. Connect the DQS Cleansing transformation to a data source.
Map Columns to Composite Domains
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A composite domain consists of two or more single domains. You can map multiple columns to the domain, or you
can map a single column with delimited values to the domain.
When you have multiple columns, you must map a column to each single domain in the composite domain to
apply the composite domain rules to data cleansing. You select the single domains contained in the composite
domain, in the Data Quality Client. For more information, see Create a Composite Domain.
When you have a single column with delimited values, you must map the single column to the composite domain.
The values must appear in the same order as the single domains appear in the composite domain. The delimiter in
the data source must match the delimiter that is used to parse the composite domain values. You select the
delimiter for the composite domain, as well as set other properties, in the Data Quality Client. For more
information, see Create a Composite Domain.
To map multiple columns to a composite domain
1. Right-click the DQS Cleansing transformation, and then click Edit .
2. On the Connection Manager tab, confirm that the composite domain appears in the list of available
domains.
3. On the Mapping tab, select the columns in the Available Input Columns area.
4. For each column listed in the Input Column field, select a single domain in the Domain field. Select only
single domains that are in the composite domain.
5. As needed, modify the names that appear in the Source Alias , Output Alias , and Status Alias fields.
6. As needed, set properties on the Advanced tab. For more information about the properties, see DQS
Cleansing Transformation Editor Dialog Box.
To map a column with delimited values to a composite domain
1. Right-click the DQS Cleansing transformation, and then click Edit .
2. On the Connection Manager tab, confirm that the composite domain appears in the list of available
domains.
3. On the Mapping tab, select the column in the Available Input Columns area.
4. For the column listed in the Input Column field, select the composite domain in the Domain field.
5. As needed, modify the names that appear in the Source Alias , Output Alias , and Status Alias fields.
6. As needed, set properties on the Advanced tab. For more information about the properties, see DQS
Cleansing Transformation Editor Dialog Box.
See Also
DQS Cleansing Transformation
Derived Column Transformation
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Derived Column transformation creates new column values by applying expressions to transformation input
columns. An expression can contain any combination of variables, functions, operators, and columns from the
transformation input. The result can be added as a new column or inserted into an existing column as a
replacement value. The Derived Column transformation can define multiple derived columns, and any variable or
input columns can appear in multiple expressions.
You can use this transformation to perform the following tasks:
Concatenate data from different columns into a derived column. For example, you can combine values
from the FirstName and LastName columns into a single derived column named FullName , by using
the expression FirstName + " " + LastName .
Extract characters from string data by using functions such as SUBSTRING, and then store the result in a
derived column. For example, you can extract a person's initial from the FirstName column, by using the
expression SUBSTRING(FirstName,1,1) .
Apply mathematical functions to numeric data and store the result in a derived column. For example, you
can change the length and precision of a numeric column, SalesTax , to a number with two decimal places,
by using the expression ROUND(SalesTax, 2) .
Create expressions that compare input columns and variables. For example, you can compare the variable
Version against the data in the column ProductVersion , and depending on the comparison result, use
the value of either Version or ProductVersion , by using the expression
ProductVersion == @Version? ProductVersion : @Version .
Extract parts of a datetime value. For example, you can use the GETDATE and DATEPART functions to extract
the current year, by using the expression DATEPART("year",GETDATE()) .
Convert date strings to a specific format using an expression.
NOTE
If an expression references an input column that is overwritten by the Derived Column transformation, the
expression uses the original value of the column, not the derived value.
If adding results to new columns and the data type is string , specify a code page. For more information,
see Comparing String Data.
The Derived Column transformation includes the FriendlyExpression custom property. This property can be
updated by a property expression when the package is loaded. For more information, see Use Property
Expressions in Packages, and Transformation Custom Properties.
This transformation has one input, one regular output, and one error output.
You can set properties through SSIS Designer or programmatically.
The Advanced Editor dialog box reflects the properties that can be set programmatically. For more information
about the properties that you can set in the Advanced Editor dialog box or programmatically, click one of the
following topics:
Common Properties
Transformation Custom Properties
For more information about how to set properties, click one of the following topics:
Set the Properties of a Data Flow Component
Related Tasks
Derive Column Values by Using the Derived Column Transformation
Related Content
Technical article, SSIS Expression Examples, on social.technet.microsoft.com
Derive Column Values with the Derived Column
Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To add and configure a Derived Column transformation, the package must already include at least one Data Flow
task and one source.
The Derived Column transformation uses expressions to update the values of existing or to add values to new
columns. When you choose to add values to new columns, the Derived Column Transformation Editor dialog
box evaluates the expression and defines the metadata of the columns accordingly. For example, if an expression
concatenates two columns-each with the DT_WSTR data type and a length of 50-with a space between the two
column values, the new column has the DT_WSTR data type and a length of 101. You can update the data type of
new columns. The only requirement is that data type be compatible with the inserted data. For example, the
Derived Column Transformation Editor dialog box generates a validation error when you assign a date value
to a column with an integer data type. Depending on the data type that you selected, you can specify the length,
precision, scale, and code page of the column.
To derive column values
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Data Flow tab, and then, from the Toolbox , drag the Derived Column transformation to the
design surface.
4. Connect the Derived Column transformation to the data flow by dragging the connector from the source or
the previous transformation to the Derived Column transformation.
5. Double-click the Derived Column transformation.
6. In the Derived Column Transformation Editor dialog box, build the expressions to use as conditions by
dragging variables, columns, functions, and operators to the Expression column in the grid. Alternatively,
you can type the expression in the Expression column.
NOTE
If the expression is not valid, the expression text is highlighted and a ToolTip on the column describes the errors.
7. In the Derived Column list, select <add as new column> to write the evaluation result of the expression
to a new column, or select an existing column to update with the evaluation result.
If you chose to use a new column, the Derived Column Transformation Editor dialog box evaluates the
expression and assigns a data type to the column, depending on the data type, length, precisions, scale, and
code page.
8. If using a new column, select a data type in the Data Type list. Depending on the selected data type,
optionally update the values in the Length , Precision , Scale , and Code Page columns. Metadata of
existing columns cannot be changed.
9. Optionally, modify the values in the Derived Column Name column.
10. To configure the error output, click Configure Error Output . For more information, see Debugging Data
Flow.
11. Click OK .
12. To save the updated package, click Save Selected Items on the File menu.
See Also
Derived Column Transformation
Integration Services Data Types
Integration Services Transformations
Integration Services Paths
Data Flow Task
Integration Services (SSIS) Expressions
Export Column Transformation
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Export Column transformation reads data in a data flow and inserts the data into a file. For example, if the data
flow contains product information, such as a picture of each product, you could use the Export Column
transformation to save the images to files.
NOTE
A BOM is written only when the data is not appended to an existing file and the data has the DT_NTEXT data type.
The transformation uses pairs of input columns: One column contains a file name, and the other column contains
data. Each row in the data set can specify a different file. As the transformation processes a row, the data is inserted
into the specified file. At run time, the transformation creates the files, if they do not already exist, and then the
transformation writes the data to the files. The data to be written must have a DT_TEXT, DT_NTEXT, or DT_IMAGE
data type. For more information, see Integration Services Data Types.
This transformation has one input, one output, and one error output.
You can set properties through SSIS Designer or programmatically.
The Advanced Editor dialog box reflects the properties that can be set programmatically. For more information
about the properties that you can set in the Advanced Editor dialog box or programmatically, click one of the
following topics:
Common Properties
Transformation Custom Properties
For more information about how to set properties, see Set the Properties of a Data Flow Component.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Fuzzy Grouping transformation performs data cleaning tasks by identifying rows of data that are likely to be
duplicates and selecting a canonical row of data to use in standardizing the data.
NOTE
For more detailed information about the Fuzzy Grouping transformation, including performance and memory limitations,
see the white paper, Fuzzy Lookup and Fuzzy Grouping in SQL Server Integration Services 2005.
The Fuzzy Grouping transformation requires a connection to an instance of SQL Server to create the temporary
SQL Server tables that the transformation algorithm requires to do its work. The connection must resolve to a
user who has permission to create tables in the database.
To configure the transformation, you must select the input columns to use when identifying duplicates, and you
must select the type of match-fuzzy or exact-for each column. An exact match guarantees that only rows that have
identical values in that column will be grouped. Exact matching can be applied to columns of any Integration
Services data type except DT_TEXT, DT_NTEXT, and DT_IMAGE. A fuzzy match groups rows that have approximately
the same values. The method for approximate matching of data is based on a user-specified similarity score. Only
columns with the DT_WSTR and DT_STR data types can be used in fuzzy matching. For more information, see
Integration Services Data Types.
The transformation output includes all input columns, one or more columns with standardized data, and a column
that contains the similarity score. The score is a decimal value between 0 and 1. The canonical row has a score of 1.
Other rows in the fuzzy group have scores that indicate how well the row matches the canonical row. The closer
the score is to 1, the more closely the row matches the canonical row. If the fuzzy group includes rows that are
exact duplicates of the canonical row, these rows also have a score of 1. The transformation does not remove
duplicate rows; it groups them by creating a key that relates the canonical row to similar rows.
The transformation produces one output row for each input row, with the following additional columns:
_key_in , a column that uniquely identifies each row.
_key_out , a column that identifies a group of duplicate rows. The _key_out column has the value of the
_key_in column in the canonical data row. Rows with the same value in _key_out are part of the same
group. The _key_out value for a group corresponds to the value of _key_in in the canonical data row.
_score , a value between 0 and 1 that indicates the similarity of the input row to the canonical row.
These are the default column names and you can configure the Fuzzy Grouping transformation to use other
names. The output also provides a similarity score for each column that participates in a fuzzy grouping.
The Fuzzy Grouping transformation includes two features for customizing the grouping it performs: token
delimiters and similarity threshold. The transformation provides a default set of delimiters used to tokenize the
data, but you can add new delimiters that improve the tokenization of your data.
The similarity threshold indicates how strictly the transformation identifies duplicates. The similarity thresholds
can be set at the component and the column levels. The column-level similarity threshold is only available to
columns that perform a fuzzy match. The similarity range is 0 to 1. The closer to 1 the threshold is, the more
similar the rows and columns must be to qualify as duplicates. You specify the similarity threshold among rows
and columns by setting the MinSimilarity property at the component and column levels. To satisfy the similarity
that is specified at the component level, all rows must have a similarity across all columns that is greater than or
equal to the similarity threshold that is specified at the component level.
The Fuzzy Grouping transformation calculates internal measures of similarity, and rows that are less similar than
the value specified in MinSimilarity are not grouped.
To identify a similarity threshold that works for your data, you may have to apply the Fuzzy Grouping
transformation several times using different minimum similarity thresholds. At run time, the score columns in
transformation output contain the similarity scores for each row in a group. You can use these values to identify
the similarity threshold that is appropriate for your data. If you want to increase similarity, you should set
MinSimilarity to a value larger than the value in the score columns.
You can customize the grouping that the transformation performs by setting the properties of the columns in the
Fuzzy Grouping transformation input. For example, the FuzzyComparisonFlags property specifies how the
transformation compares the string data in a column, and the ExactFuzzy property specifies whether the
transformation performs a fuzzy match or an exact match.
The amount of memory that the Fuzzy Grouping transformation uses can be configured by setting the
MaxMemoryUsage custom property. You can specify the number of megabytes (MB) or use the value 0 to allow
the transformation to use a dynamic amount of memory based on its needs and the physical memory available.
The MaxMemoryUsage custom property can be updated by a property expression when the package is loaded.
For more information, see Integration Services (SSIS) Expressions, Use Property Expressions in Packages, and
Transformation Custom Properties.
This transformation has one input and one output. It does not support an error output.
Row Comparison
When you configure the Fuzzy Grouping transformation, you can specify the comparison algorithm that the
transformation uses to compare rows in the transformation input. If you set the Exhaustive property to true , the
transformation compares every row in the input to every other row in the input. This comparison algorithm may
produce more accurate results, but it is likely to make the transformation perform more slowly unless the number
of rows in the input is small. To avoid performance issues, it is advisable to set the Exhaustive property to true
only during package development.
Related Tasks
For details about how to set properties of this task, click one of the following topics:
Identify Similar Data Rows by Using the Fuzzy Grouping Transformation
Set the Properties of a Data Flow Component
NOTE
The server specified by the connection must be running SQL Server. The Fuzzy Grouping transformation creates temporary
data objects in tempdb that may be as large as the full input to the transformation. While the transformation executes, it
issues server queries against these temporary objects. This can affect overall server performance.
Options
OLE DB connection manager
Select an existing OLE DB connection manager by using the list box, or create a new connection by using the New
button.
New
Create a new connection by using the Configure OLE DB Connection Manager dialog box.
VA L UE DESC RIP T IO N
Comparison Flags
For information about the string comparison options, see Comparing String Data.
NOTE
The Exhaustive and the MaxMemor yUsage properties of the Fuzzy Grouping transformation are not available in the
Fuzzy Grouping Transformation Editor , but can be set by using the Advanced Editor . For more information on these
properties, see the Fuzzy Grouping Transformation section of Transformation Custom Properties.
Options
Input key column name
Specify the name of an output column that contains the unique identifier for each input row. The _key_in column
has a value that uniquely identifies each row.
Output key column name
Specify the name of an output column that contains the unique identifier for the canonical row of a group of
duplicate rows. The _key_out column corresponds to the _key_in value of the canonical data row.
Similarity score column name
Specify a name for the column that contains the similarity score. The similarity score is a value between 0 and 1
that indicates the similarity of the input row to the canonical row. The closer the score is to 1, the more closely the
row matches the canonical row.
Similarity threshold
Set the similarity threshold by using the slider. The closer the threshold is to 1, the more the rows must resemble
each other to qualify as duplicates. Increasing the threshold can improve the speed of matching because fewer
candidate records have to be considered.
Token delimiters
The transformation provides a default set of delimiters for tokenizing data, but you can add or remove delimiters
as needed by editing the list.
See Also
Fuzzy Lookup Transformation
Integration Services Transformations
Identify Similar Data Rows with the Fuzzy Grouping
Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To add and configure a Fuzzy Grouping transformation, the package must already include at least one Data Flow
task and a source.
To implement Fuzzy Grouping transformation in a data flow
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Data Flow tab, and then, from the Toolbox , drag the Fuzzy Grouping transformation to the design
surface.
4. Connect the Fuzzy Grouping transformation to the data flow by dragging the connector from the data
source or a previous transformation to the Fuzzy Grouping transformation.
5. Double-click the Fuzzy Grouping transformation.
6. In the Fuzzy Grouping Transformation Editor dialog box, on the Connection Manager tab, select an
OLE DB connection manager that connects to a SQL Server database.
NOTE
The transformation requires a connection to a SQL Server database to create temporary tables and indexes.
7. Click the Columns tab and, in the Available Input Columns list, select the check box of the input columns
to use to identify similar rows in the dataset.
8. Select the check box in the Pass Through column to identify the input columns to pass through to the
transformation output. Pass-through columns are not included in the process of identification of duplicate
rows.
NOTE
Input columns that are used for grouping are automatically selected as pass-through columns, and they cannot be
unselected while used for grouping.
9. Optionally, update the names of output columns in the Output Alias column.
10. Optionally, update the names of cleaned columns in the Group OutputAlias column.
NOTE
The default names of columns are the names of the input columns with a "_clean" suffix.
11. Optionally, update the type of match to use in the Match Type column.
NOTE
At least one column must use fuzzy matching.
12. Specify the minimum similarity level columns in the Minimum Similarity column. The value must be
between 0 and 1. The closer the value is to 1, the more similar the values in the input columns must be to
form a group. A minimum similarity of 1 indicates an exact match.
13. Optionally, update the names of similarity columns in the Similarity Output Alias column.
14. To specify the handling of numbers in data values, update the values in the Numerals column.
15. To specify how the transformation compares the string data in a column, modify the default selection of
comparison options in the Comparison Flags column.
16. Click the Advanced tab to modify the names of the columns that the transformation adds to the output for
the unique row identifier (_key_in), the duplicate row identifier (_key_out), and the similarity value (_score).
17. Optionally, adjust the similarity threshold by moving the slider bar.
18. Optionally, clear the token delimiter check boxes to ignore delimiters in the data.
19. Click OK .
20. To save the updated package, click Save Selected Items on the File menu.
See Also
Fuzzy Grouping Transformation
Integration Services Transformations
Integration Services Paths
Data Flow Task
Fuzzy Lookup Transformation
11/2/2020 • 15 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Fuzzy Lookup transformation performs data cleaning tasks such as standardizing data, correcting data, and
providing missing values.
NOTE
For more detailed information about the Fuzzy Lookup transformation, including performance and memory limitations, see
the white paper, Fuzzy Lookup and Fuzzy Grouping in SQL Server Integration Services 2005.
The Fuzzy Lookup transformation differs from the Lookup transformation in its use of fuzzy matching. The Lookup
transformation uses an equi-join to locate matching records in the reference table. It returns records with at least
one matching record, and returns records with no matching records. In contrast, the Fuzzy Lookup transformation
uses fuzzy matching to return one or more close matches in the reference table.
A Fuzzy Lookup transformation frequently follows a Lookup transformation in a package data flow. First, the
Lookup transformation tries to find an exact match. If it fails, the Fuzzy Lookup transformation provides close
matches from the reference table.
The transformation needs access to a reference data source that contains the values that are used to clean and
extend the input data. The reference data source must be a table in a SQL Server database. The match between the
value in an input column and the value in the reference table can be an exact match or a fuzzy match. However, the
transformation requires at least one column match to be configured for fuzzy matching. If you want to use only
exact matching, use the Lookup transformation instead.
This transformation has one input and one output.
Only input columns with the DT_WSTR and DT_STR data types can be used in fuzzy matching. Exact matching
can use any DTS data type except DT_TEXT , DT_NTEXT , and DT_IMAGE . For more information, see Integration
Services Data Types. Columns that participate in the join between the input and the reference table must have
compatible data types. For example, it is valid to join a column with the DTS DT_WSTR data type to a column with
the SQL Server nvarchar data type, but invalid to join a column with the DT_WSTR data type to a column with
the int data type.
You can customize this transformation by specifying the maximum amount of memory, the row comparison
algorithm, and the caching of indexes and reference tables that the transformation uses.
The amount of memory that the Fuzzy Lookup transformation uses can be configured by setting the
MaxMemoryUsage custom property. You can specify the number of megabytes (MB), or use the value 0, which
lets the transformation use a dynamic amount of memory based on its needs and the physical memory available.
The MaxMemoryUsage custom property can be updated by a property expression when the package is loaded.
For more information, see Integration Services (SSIS) Expressions, Use Property Expressions in Packages, and
Transformation Custom Properties.
O P T IO N DESC RIP T IO N
GenerateAndMaintainNewIndex Create a new index, save it, and maintain it. The
transformation installs triggers on the reference table to keep
the reference table and index table synchronized.
GenerateAndPersistNewIndex Create a new index and save it, but do not maintain it.
NOTE
When you select Maintain stored index on the Reference Table tab of the Fuzzy Lookup Transformation Editor ,
the transformation uses managed stored procedures to maintain the index. These managed stored procedures use the
common language runtime (CLR) integration feature in SQL Server. By default, CLR integration in SQL Server is not enabled.
To use the Maintain stored index functionality, you must enable CLR integration. For more information, see Enabling CLR
Integration.
Because the Maintain stored index option requires CLR integration, this feature works only when you select a reference
table on an instance of SQL Server where CLR integration is enabled.
Row Comparison
When you configure the Fuzzy Lookup transformation, you can specify the comparison algorithm that the
transformation uses to locate matching records in the reference table. If you set the Exhaustive property to True ,
the transformation compares every row in the input to every row in the reference table. This comparison
algorithm may produce more accurate results, but it is likely to make the transformation perform more slowly
unless the number of rows is the reference table is small. If the Exhaustive property is set to True , the entire
reference table is loaded into memory. To avoid performance issues, it is advisable to set the Exhaustive property
to True during package development only.
If the Exhaustive property is set to False , the Fuzzy Lookup transformation returns only matches that have at least
one indexed token or substring (the substring is called a q-gram) in common with the input record. To maximize
the efficiency of lookups, only a subset of the tokens in each row in the table is indexed in the inverted index
structure that the Fuzzy Lookup transformation uses to locate matches. When the input dataset is small, you can
set Exhaustive to True to avoid missing matches for which no common tokens exist in the index table.
NOTE
The Fuzzy Lookup transformation creates a working copy of the reference table. The indexes described below are created on
this working table by using a special table, not an ordinary SQL Server index. The transformation does not modify the
existing source tables unless you select Maintain stored index. In this case, it creates a trigger on the reference table that
updates the working table and the lookup index table based on changes to the reference table.
NOTE
The Exhaustive and the MaxMemor yUsage properties of the Fuzzy Lookup transformation are not available in the
Fuzzy Lookup Transformation Editor , but can be set by using the Advanced Editor . In addition, a value greater than
100 for MaxOutputMatchesPerInput can be specified only in the Advanced Editor . For more information on these
properties, see the Fuzzy Lookup Transformation section of Transformation Custom Properties.
Options
OLE DB connection manager
Select an existing OLE DB connection manager from the list, or create a new connection by clicking New .
New
Create a new connection by using the Configure OLE DB Connection Manager dialog box.
Generate new index
Specify that the transformation should create a new index to use for the lookup.
Reference table name
Select the existing table to use as the reference (lookup) table.
Store new index
Select this option if you want to save the new lookup index.
New index name
If you have chosen to save the new lookup index, type a descriptive name for the index.
Maintain stored index
If you have chosen to save the new lookup index, specify whether you also want SQL Server to maintain the index.
NOTE
When you select Maintain stored index on the Reference Table tab of the Fuzzy Lookup Transformation Editor ,
the transformation uses managed stored procedures to maintain the index. These managed stored procedures use the
common language runtime (CLR) integration feature in SQL Server. By default, CLR integration in SQL Server is not enabled.
To use the Maintain stored index functionality, you must enable CLR integration. For more information, see Enabling CLR
Integration.
Because the Maintain stored index option requires CLR integration, this feature works only when you select a reference
table on an instance of SQL Server where CLR integration is enabled.
See Also
Lookup Transformation
Fuzzy Grouping Transformation
Integration Services Transformations
Import Column Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Import Column transformation reads data from files and adds the data to columns in a data flow. Using this
transformation, a package can add text and images stored in separate files to a data flow. For example, a data flow
that loads data into a table that stores product information can include the Import Column transformation to
import customer reviews of each product from files and add the reviews to the data flow.
You can configure the Import Column transformation in the following ways:
Specify the columns to which the transformation adds data.
Specify whether the transformation expects a byte-order mark (BOM).
NOTE
A BOM is only expected if the data has the DT_NTEXT data type.
A column in the transformation input contains the names of files that hold the data. Each row in the dataset can
specify a different file. When the Import Column transformation processes a row, it reads the file name, opens the
corresponding file in the file system, and loads the file content into an output column. The data type of the output
column must be DT_TEXT, DT_NTEXT, or DT_IMAGE. For more information, see Integration Services Data Types.
This transformation has one input, one output, and one error output.
Related Tasks
For information about how to set properties of this component, see Set the Properties of a Data Flow Component.
See Also
Export Column Transformation
Data Flow
Integration Services Transformations
Lookup Transformation
11/2/2020 • 12 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Lookup transformation performs lookups by joining data in input columns with columns in a reference
dataset. You use the lookup to access additional information in a related table that is based on values in common
columns.
The reference dataset can be a cache file, an existing table or view, a new table, or the result of an SQL query. The
Lookup transformation uses either an OLE DB connection manager or a Cache connection manager to connect
to the reference dataset. For more information, see OLE DB Connection Manager and Cache Connection
Manager
You can configure the Lookup transformation in the following ways:
Select the connection manager that you want to use. If you want to connect to a database, select an OLE
DB connection manager. If you want to connect to a cache file, select a Cache connection manager.
Specify the table or view that contains the reference dataset.
Generate a reference dataset by specifying an SQL statement.
Specify joins between the input and the reference dataset.
Add columns from the reference dataset to the Lookup transformation output.
Configure the caching options.
The Lookup transformation supports the following database providers for the OLE DB connection manager:
SQL Server
Oracle
DB2
The Lookup transformation tries to perform an equi-join between values in the transformation input and values
in the reference dataset. (An equi-join means that each row in the transformation input must match at least one
row from the reference dataset.) If an equi-join is not possible, the Lookup transformation takes one of the
following actions:
If there is no matching entry in the reference dataset, no join occurs. By default, the Lookup
transformation treats rows without matching entries as errors. However, you can configure the Lookup
transformation to redirect such rows to a no match output.
If there are multiple matches in the reference table, the Lookup transformation returns only the first
match returned by the lookup query. If multiple matches are found, the Lookup transformation generates
an error or warning only when the transformation has been configured to load all the reference dataset
into the cache. In this case, the Lookup transformation generates a warning when the transformation
detects multiple matches as the transformation fills the cache.
The join can be a composite join, which means that you can join multiple columns in the transformation input to
columns in the reference dataset. The transformation supports join columns with any data type, except for
DT_R4, DT_R8, DT_TEXT, DT_NTEXT, or DT_IMAGE. For more information, see Integration Services Data Types.
Typically, values from the reference dataset are added to the transformation output. For example, the Lookup
transformation can extract a product name from a table using a value from an input column, and then add the
product name to the transformation output. The values from the reference table can replace column values or
can be added to new columns.
The lookups performed by the Lookup transformation are case sensitive. To avoid lookup failures that are caused
by case differences in data, first use the Character Map transformation to convert the data to uppercase or
lowercase. Then, include the UPPER or LOWER functions in the SQL statement that generates the reference table.
For more information, see Character Map Transformation, UPPER (Transact-SQL), and LOWER (Transact-SQL).
The Lookup transformation has the following inputs and outputs:
Input.
Match output. The match output handles the rows in the transformation input that match at least one
entry in the reference dataset.
No Match output. The no match output handles rows in the input that do not match at least one entry in
the reference dataset. If you configure the Lookup transformation to treat the rows without matching
entries as errors, the rows are redirected to the error output. Otherwise, the transformation would
redirect those rows to the no match output.
Error output.
NOTE
The Cache connection manager does not support cache files that are created or modified by using the Raw File
destination.
Perform operations and set attributes on the cache file by using the File System task. For more
information, see and File System Task.
The following are the caching options:
The reference dataset is generated by using a table, view, or SQL query and loaded into cache, before the
Lookup transformation runs. You use the OLE DB connection manager to access the dataset.
This caching option is compatible with the full caching option that is available for the Lookup
transformation in SQL Server 2005 Integration Services (SSIS).
The reference dataset is generated from a connected data source in the data flow or from a cache file, and
is loaded into cache before the Lookup transformation runs. You use the Cache connection manager, and,
optionally, the Cache transformation, to access the dataset. For more information, see Cache Connection
Manager and Cache Transform.
The reference dataset is generated by using a table, view, or SQL query during the execution of the
Lookup transformation. The rows with matching entries in the reference dataset and the rows without
matching entries in the dataset are loaded into cache.
When the memory size of the cache is exceeded, the Lookup transformation automatically removes the
least frequently used rows from the cache.
This caching option is compatible with the partial caching option that is available for the Lookup
transformation in SQL Server 2005 Integration Services (SSIS).
The reference dataset is generated by using a table, view, or SQL query during the execution of the
Lookup transformation. No data is cached.
This caching option is compatible with the no caching option that is available for the Lookup
transformation in SQL Server 2005 Integration Services (SSIS).
Integration Services and SQL Server differ in the way they compare strings. If the Lookup transformation is
configured to load the reference dataset into cache before the Lookup transformation runs, Integration Services
does the lookup comparison in the cache. Otherwise, the lookup operation uses a parameterized SQL statement
and SQL Server does the lookup comparison. This means that the Lookup transformation might return a
different number of matches from the same lookup table depending on the cache type.
Related Tasks
You can set properties through SSIS Designer or programmatically. For more details, see the following topics.
Implement a Lookup in No Cache or Partial Cache Mode
Implement a Lookup Transformation in Full Cache Mode Using the Cache Connection Manager
Implement a Lookup Transformation in Full Cache Mode Using the OLE DB Connection Manager
Set the Properties of a Data Flow Component
Related Content
Video, How to: Implement a Lookup Transformation in Full Cache Mode, on msdn.microsoft.com
Blog entry, Best Practices for Using the Lookup Transformation Cache Modes, on blogs.msdn.com
Blog entry, Lookup Pattern: Case Insensitive, on blogs.msdn.com
Sample, Lookup Transformation, on msftisprodsamples.codeplex.com.
For information on installing Integration Services product samples and sample databases, see SQL Server
Integration Services Product Samples.
New
Create a new table by using the Create Table dialog box.
Use results of an SQL quer y
Choose this option to browse to a preexisting query, build a new query, check query syntax, and preview query
results.
Build quer y
Create the Transact-SQL statement to run by using Quer y Builder , a graphical tool that is used to create queries
by browsing through data.
Browse
Use this option to browse to a preexisting query saved as a file.
Parse Quer y
Check the syntax of the query.
Preview
Preview results by using the Preview Quer y Results dialog box. This option displays up to 200 rows.
External Resources
Blog entry, Lookup cache modes on blogs.msdn.com
NOTE
The optional SQL statement that you specify on this page overrides and replaces the table name that you specified on the
Connection page of the Lookup Transformation Editor . For more information, see .
Lookup Transf ormation Edit or ( Connection Page)
Set Parameters
Map input columns to parameters by using the Set Quer y Parameters dialog box.
External Resources
Blog entry, Lookup cache modes on blogs.msdn.com
See Also
Fuzzy Lookup Transformation
Term Lookup Transformation
Data Flow
Integration Services Transformations
Implement a Lookup in No Cache or Partial Cache
Mode
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can configure the Lookup transformation to use the partial cache or no cache mode:
Partial cache
The rows with matching entries in the reference dataset and, optionally, the rows without matching entries
in the dataset are stored in cache. When the memory size of the cache is exceeded, the Lookup
transformation automatically removes the least frequently used rows from the cache.
No cache
No data is loaded into cache.
Whether you select partial cache or no cache, you use an OLE DB connection manager to connect to the reference
dataset. The reference dataset is generated by using a table, view, or SQL query during the execution of the Lookup
transformation
To implement a Lookup transformation in no cache or partial cache mode
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want,
and then open the package.
2. On the Data Flow tab, add a Lookup transformation.
3. Connect the Lookup transformation to the data flow by dragging a connector from a source or a previous
transformation to the Lookup transformation.
NOTE
A Lookup transformation that is configured to use the no cache mode might not validate if that transformation
connects to a flat file that contains an empty date field. Whether the transformation validates depends on whether
the connection manager for the flat file has been configured to retain null values. To ensure that the Lookup
transformation validates, in the Flat File Source Editor , on the Connection Manager Page , select the Retain
null values from the source as null values in the data flow option.
NOTE
The Lookup transformation automatically maps columns that have the same name and the same data type.
NOTE
Columns must have matching data types to be mapped. For more information, see Integration Services Data Types.
10. Include lookup columns in the output by doing the following steps:
a. From the Available Lookup Columns list, select columns.
b. In Lookup Operation list, specify whether the values from the lookup columns replace values in the
input column or are written to a new column.
11. If you selected Par tial cache in step 5, on the Advanced page, set the following cache options:
From the Cache size (32-bit) list, select the cache size for 32-bit environments.
From the Cache size (64-bit) list, select the cache size for 64-bit environments.
To cache the rows without matching entries in the reference, select Enable cache for rows with no
matching entries .
From the Allocation from cache list, select the percentage of the cache to use to store the rows
without matching entries.
12. To modify the SQL statement that generates the reference dataset, select Modify the SQL statement , and
change the SQL statement displayed in the text box.
If the statement includes parameters, click Parameters to map the parameters to input columns.
NOTE
The optional SQL statement that you specify on this page overrides and replaces the table name that you specified
on the Connection page of the Lookup Transformation Editor .
13. To configure the error output, click the Error Output page and set the error handling options. For more
information, see Lookup Transformation Editor (Error Output Page).
14. Click OK to save your changes to the Lookup transformation, and then run the package.
See Also
Integration Services Transformations
Lookup Transformation Full Cache Mode - Cache
Connection Manager
11/2/2020 • 13 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can configure the Lookup transformation to use full cache mode and a Cache connection manager. In full
cache mode, the reference dataset is loaded into cache before the Lookup transformation runs.
NOTE
The Cache connection manager does not support the Binary Large Object (BLOB) data types DT_TEXT, DT_NTEXT, and
DT_IMAGE. If the reference dataset contains a BLOB data type, the component will fail when you run the package. You can
use the Cache Connection Manager Editor to modify column data types. For more information, see Cache Connection
Manager Editor.
The Lookup transformation performs lookups by joining data in input columns from a connected data source with
columns in a reference dataset. For more information, see Lookup Transformation.
You use one of the following to generate a reference dataset:
Cache file (.caw)
You configure the Cache connection manager to read data from an existing cache file.
Connected data source in the data flow
You use a Cache Transform transformation to write data from a connected data source in the data flow to a
Cache connection manager. The data is always stored in memory.
You must add the Lookup transformation to a separate data flow. This enables the Cache Transform to
populate the Cache connection manager before the Lookup transformation is executed. The data flows can
be in the same package or in two separate packages.
If the data flows are in the same package, use a precedence constraint to connect the data flows. This
enables the Cache Transform to run before the Lookup transformation runs.
If the data flows are in separate packages, you can use the Execute Package task to call the child package
from the parent package. You can call multiple child packages by adding multiple Execute Package tasks to a
Sequence Container task in the parent package.
You can share the reference dataset stored in cache, between multiple Lookup transformations by using one of the
following methods:
Configure the Lookup transformations in a single package to use the same Cache connection manager.
Configure the Cache connection managers in different packages to use the same cache file.
For more information, see the following topics:
Cache Transform
Cache Connection Manager
Precedence Constraints
Execute Package Task
Sequence Container
For a video that demonstrates how to implement a Lookup transformation in Full Cache mode using the Cache
connection manager, see How to: Implement a Lookup Transformation in Full Cache Mode (SQL Server Video).
To implement a Lookup transformation in full cache mode in one package by using Cache connection manager
and a data source in the data flow
1. In SQL Server Data Tools (SSDT), open a Integration Services project, and then open a package.
2. On the Control Flow tab, add two Data Flow tasks, and then connect the tasks by using a green connector:
3. In the first data flow, add a Cache Transform transformation, and then connect the transformation to a data
source.
Configure the data source as needed.
4. Double-click the Cache Transform, and then in the Cache Transformation Editor , on the Connection
Manager page, click New to create a new Cache connection manager.
5. Click the Columns tab of the Cache Connection Manager Editor dialog box, and then specify which
columns are the index columns by using the Index Position option.
For non-index columns, the index position is 0. For index columns, the index position is a sequential,
positive number.
NOTE
When the Lookup transformation is configured to use a Cache connection manager, only index columns in the
reference dataset can be mapped to input columns. Also, all index columns must be mapped. For more information,
see Cache Connection Manager Editor.
6. To save the cache to a file, in the Cache Connection Manager Editor , on the General tab, configure the
Cache connection manager by setting the following options:
Select Use file cache .
For File name , either type the file path or click Browse to select the file.
If you type a path for a file that does not exist, the system creates the file when you run the package.
NOTE
The protection level of the package does not apply to the cache file. If the cache file contains sensitive information,
use an access control list (ACL) to restrict access to the location or folder in which you store the file. You should
enable access only to certain accounts. For more information, see Access to Files Used by Packages.
7. Configure the Cache Transform as needed. For more information, see Cache Transformation Editor
(Connection Manager Page) and Cache Transformation Editor (Mappings Page).
8. In the second data flow, add a Lookup transformation, and then configure the transformation by doing the
following tasks:
a. Connect the Lookup transformation to the data flow by dragging a connector from a source or a
previous transformation to the Lookup transformation.
NOTE
A Lookup transformation might not validate if that transformation connects to a flat file that contains an
empty date field. Whether the transformation validates depends on whether the connection manager for the
flat file has been configured to retain null values. To ensure that the Lookup transformation validates, in the
Flat File Source Editor , on the Connection Manager Page , select the Retain null values from the
source as null values in the data flow option.
NOTE
The Lookup transformation automatically maps columns that have the same name and the same data type.
NOTE
Columns must have matching data types to be mapped. For more information, see Integration Services Data
Types.
h. In the Available Lookup Columns list, select columns. Then in the Lookup Operation list, specify
whether the values from the lookup columns replace values in the input column or are written to a
new column.
i. To configure the error output, click the Error Output page and set the error handling options. For
more information, see Lookup Transformation Editor (Error Output Page).
j. Click OK to save your changes to the Lookup transformation.
9. Run the package.
To implement a Lookup transformation in full cache mode in two packages by using Cache connection manager
and a data source in the data flow
1. In SQL Server Data Tools (SSDT), open a Integration Services project, and then open two packages.
2. On the Control Flow tab in each package, add a Data Flow task.
3. In the parent package, add a Cache Transform transformation to the data flow, and then connect the
transformation to a data source.
Configure the data source as needed.
4. Double-click the Cache Transform, and then in the Cache Transformation Editor , on the Connection
Manager page, click New to create a new Cache connection manager.
5. In the Cache Connection Manager Editor , on the General tab, configure the Cache connection manager
by setting the following options:
Select Use file cache .
For File name , either type the file path or click Browse to select the file.
If you type a path for a file that does not exist, the system creates the file when you run the package.
NOTE
The protection level of the package does not apply to the cache file. If the cache file contains sensitive information,
use an access control list (ACL) to restrict access to the location or folder in which you store the file. You should
enable access only to certain accounts. For more information, see Access to Files Used by Packages.
6. Click the Columns tab, and then specify which columns are the index columns by using the Index
Position option.
For non-index columns, the index position is 0. For index columns, the index position is a sequential,
positive number.
NOTE
When the Lookup transformation is configured to use a Cache connection manager, only index columns in the
reference dataset can be mapped to input columns. Also, all index columns must be mapped. For more information,
see Cache Connection Manager Editor.
7. Configure the Cache Transform as needed. For more information, see Cache Transformation Editor
(Connection Manager Page) and Cache Transformation Editor (Mappings Page).
8. Do one of the following to populate the Cache connection manager that is used in the second package:
Run the parent package.
Double-click the Cache connection manager you created in step 4, click Columns , select the rows,
and then press CTRL+C to copy the column metadata.
9. In the child package, create a Cache connection manager by right-clicking in the Connection Managers
area, clicking New Connection , selecting CACHE in the Add SSIS Connection Manager dialog box, and
then clicking Add .
The Connection Managers area appears on the bottom of the Control Flow , Data Flow , and Event
Handlers tabs of Integration Services Designer.
10. In the Cache Connection Manager Editor , on the General tab, configure the Cache connection manager
to read the data from the cache file that you selected by setting the following options:
Select Use file cache .
For File name , either type the file path or click Browse to select the file.
NOTE
The protection level of the package does not apply to the cache file. If the cache file contains sensitive information,
use an access control list (ACL) to restrict access to the location or folder in which you store the file. You should
enable access only to certain accounts. For more information, see Access to Files Used by Packages.
11. If you copied the column metadata in step 8, click Columns , select the empty row, and then press CTRL+V
to paste the column metadata.
12. Add a Lookup transformation, and then configure the transformation by doing the following:
a. Connect the Lookup transformation to the data flow by dragging a connector from a source or a
previous transformation to the Lookup transformation.
NOTE
A Lookup transformation might not validate if that transformation connects to a flat file that contains an
empty date field. Whether the transformation validates depends on whether the connection manager for the
flat file has been configured to retain null values. To ensure that the Lookup transformation validates, in the
Flat File Source Editor , on the Connection Manager Page , select the Retain null values from the
source as null values in the data flow option.
NOTE
The Lookup transformation automatically maps columns that have the same name and the same data type.
NOTE
Columns must have matching data types to be mapped. For more information, see Integration Services Data
Types.
h. In the Available Lookup Columns list, select columns. Then in the Lookup Operation list, specify
whether the values from the lookup columns replace values in the input column or are written to a
new column.
i. To configure the error output, click the Error Output page and set the error handling options. For
more information, see Lookup Transformation Editor (Error Output Page).
j. Click OK to save your changes to the Lookup transformation.
13. Open the parent package, add an Execute Package task to the control flow, and then configure the task to
call the child package. For more information, see Execute Package Task.
14. Run the packages.
To implement a Lookup transformation in full cache mode by using Cache connection manager and an existing
cache file
1. In SQL Server Data Tools (SSDT), open a Integration Services project, and then open a package.
2. Right-click in the Connection Managers area, and then click New Connection .
The Connection Managers area appears on the bottom of the Control Flow , Data Flow , and Event
Handlers tabs of Integration Services Designer.
3. In the Add SSIS Connection Manager dialog box, select CACHE , and then click Add to add a Cache
connection manager.
4. Double-click the Cache connection manager to open the Cache Connection Manager Editor .
5. In the Cache Connection Manager Editor , on the General tab, configure the Cache connection manager
by setting the following options:
Select Use file cache .
For File name , either type the file path or click Browse to select the file.
NOTE
The protection level of the package does not apply to the cache file. If the cache file contains sensitive information,
use an access control list (ACL) to restrict access to the location or folder in which you store the file. You should
enable access only to certain accounts. For more information, see Access to Files Used by Packages.
6. Click the Columns tab, and then specify which columns are the index columns by using the Index
Position option.
For non-index columns, the index position is 0. For index columns, the index position is a sequential,
positive number.
NOTE
When the Lookup transformation is configured to use a Cache connection manager, only index columns in the
reference dataset can be mapped to input columns. Also, all index columns must be mapped. For more information,
see Cache Connection Manager Editor.
7. On the Control Flow tab, add a Data Flow task to the package, and then add a Lookup transformation to
the data flow.
8. Configure the Lookup transformation by doing the following:
a. Connect the Lookup transformation to the data flow by dragging a connector from a source or a
previous transformation to the Lookup transformation.
NOTE
A Lookup transformation might not validate if that transformation connects to a flat file that contains an
empty date field. Whether the transformation validates depends on whether the connection manager for the
flat file has been configured to retain null values. To ensure that the Lookup transformation validates, in the
Flat File Source Editor , on the Connection Manager Page , select the Retain null values from the
source as null values in the data flow option.
NOTE
The Lookup transformation automatically maps columns that have the same name and the same data type.
NOTE
Columns must have matching data types to be mapped. For more information, see Integration Services Data
Types.
h. In the Available Lookup Columns list, select columns. Then in the Lookup Operation list, specify
whether the values from the lookup columns replace values in the input column or are written to a
new column.
i. To configure the error output, click the Error Output page and set the error handling options. For
more information, see Lookup Transformation Editor (Error Output Page).
j. Click OK to save your changes to the Lookup transformation.
9. Run the package.
See Also
Implement a Lookup Transformation in Full Cache Mode Using the OLE DB Connection Manager
Implement a Lookup in No Cache or Partial Cache Mode
Integration Services Transformations
Lookup Transformation Full Cache Mode - OLE DB
Connection Manager
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can configure the Lookup transformation to use full cache mode and an OLE DB connection manager. In the
full cache mode, the reference dataset is loaded into cache before the Lookup transformation runs.
The Lookup transformation performs lookups by joining data in input columns from a connected data source with
columns in a reference dataset. For more information, see Lookup Transformation.
When you configure the Lookup transformation to use an OLE DB connection manager, you select a table, view, or
SQL query to generate the reference dataset.
To implement a Lookup transformation in full cache mode by using OLE DB connection manager
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want,
and then double-click the package in Solution Explorer.
2. On the Data Flow tab, from the Toolbox , drag the Lookup transformation to the design surface.
3. Connect the Lookup transformation to the data flow by dragging a connector from a source or a previous
transformation to the Lookup transformation.
NOTE
A Lookup transformation might not validate if that transformation connects to a flat file that contains an empty date
field. Whether the transformation validates depends on whether the connection manager for the flat file has been
configured to retain null values. To ensure that the Lookup transformation validates, in the Flat File Source Editor ,
on the Connection Manager Page , select the Retain null values from the source as null values in the
data flow option.
NOTE
The Lookup transformation automatically maps columns that have the same name and the same data type.
NOTE
Columns must have matching data types to be mapped. For more information, see Integration Services Data Types.
11. Include lookup columns in the output by doing the following tasks:
a. In the Available Lookup Columns list. select columns.
b. In Lookup Operation list, specify whether the values from the lookup columns replace values in the
input column or are written to a new column.
12. To configure the error output, click the Error Output page and set the error handling options. For more
information, see Lookup Transformation Editor (Error Output Page).
13. Click OK to save your changes to the Lookup transformation, and then run the package.
See Also
Implement a Lookup Transformation in Full Cache Mode Using the Cache Connection Manager
Implement a Lookup in No Cache or Partial Cache Mode
Integration Services Transformations
Create and Deploy a Cache for the Lookup
Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can create and deploy a cache file (.caw) for the Lookup transformation. The reference dataset is stored in the
cache file.
The Lookup transformation performs lookups by joining data in input columns from a connected data source with
columns in the reference dataset.
You create a cache file by using a Cache connection manager and a Cache Transform transformation. For more
information, see Cache Connection Manager and Cache Transform.
To learn more about the Lookup transformation and cache files, see Lookup Transformation.
To create a cache file
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want,
and then open the package.
2. On the Control Flow tab, add a Data Flow task.
3. On the Data Flow tab, add a Cache Transform transformation to the data flow, and then connect the
transformation to a data source.
Configure the data source as needed.
4. Double-click the Cache Transform, and then in the Cache Transformation Editor , on the Connection
Manager page, click New to create a new Cache connection manager.
5. In the Cache Connection Manager Editor , on the General tab, configure the Cache connection manager
to save the cache by selecting the following options:
a. Select Use file cache .
b. For File name , type the file path.
The system creates the file when you run the package.
NOTE
The protection level of the package does not apply to the cache file. If the cache file contains sensitive information,
use an access control list (ACL) to restrict access to the location or folder in which you store the file. You should
enable access only to certain accounts. For more information, see Access to Files Used by Packages.
6. Click the Columns tab, and then specify which columns are the index columns by using the Index Position
option.
For non-index columns, the index position is 0. For index columns, the index position is a sequential, positive
number.
NOTE
When the Lookup transformation is configured to use a Cache connection manager, only index columns in the
reference dataset can be mapped to input columns. Also all index columns must be mapped.
See Also
Create a Deployment Utility
Create Relationships
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Create Relationships dialog box to edit mappings between the source columns and the lookup table
columns that you configured in the Fuzzy Lookup Transformation Editor, the Lookup Transformation Editor, and the
Term Lookup Transformation Editor.
NOTE
The Create Relationships dialog box displays only the Input Column and Lookup Column lists when invoked from the
Term Lookup Transformation Editor.
To learn more about the transformations that use the Create Relationships dialog box, see Fuzzy Lookup
Transformation, Lookup Transformation, and Term Lookup Transformation.
Options
Input Column
Select from the list of available input columns.
Lookup Column
Select from the list of available lookup columns.
Mapping Type
Select fuzzy or exact matching.
When you use fuzzy matching, rows are considered duplicates if they are sufficiently similar across all columns that
have a fuzzy match type. To obtain better results from fuzzy matching, you can specify that some columns should
use exact matching instead of fuzzy matching. For example, if you know that a certain column contains no errors or
inconsistencies, you can specify exact matching on that column, so that only rows which contain identical values in
this column are considered as possible duplicates. This increases the accuracy of fuzzy matching on other columns.
Comparison Flags
For information about the string comparison options, see Comparing String Data.
Minimum Similarity
Set the similarity threshold at the column level by using the slider. The closer the value is to 1, the more the lookup
value must resemble the source value to qualify as a match. Increasing the threshold can improve the speed of
matching because fewer candidate records have to be considered.
Similarity Output Alias
Specify the name for a new output column that contains the similarity scores for the selected column. If you leave
this value empty, the output column is not created.
See Also
Integration Services Error and Message Reference
Fuzzy Lookup Transformation Editor (Columns Tab)
Lookup Transformation Editor (Columns Page)
Term Lookup Transformation Editor (Term Lookup Tab)
Cache Transform
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Cache Transform transformation generates a reference dataset for the Lookup Transformation by writing
data from a connected data source in the data flow to a Cache connection manager. The Lookup transformation
performs lookups by joining data in input columns from a connected data source with columns in the reference
database.
You can use the Cache connection manager when you want to configure the Lookup Transformation to run in the
full cache mode. In this mode, the reference dataset is loaded into cache before the Lookup Transformation runs.
For instructions on how to configure the Lookup transformation in full cache mode with the Cache connection
manager and Cache Transform transformation, see Implement a Lookup Transformation in Full Cache Mode
Using the Cache Connection Manager.
For more information on caching the reference dataset, see Lookup Transformation.
NOTE
The Cache Transform writes only unique rows to the Cache connection manager.
In a single package, only one Cache Transform can write data to the same Cache connection manager. If the
package contains multiple Cache Transforms, the first Cache Transform that is called when the package runs,
writes the data to the connection manager. The write operations of subsequent Cache Transforms fail.
For more information, see Cache Connection Manager.
NOTE
Each input column must be mapped to a destination column, and the column data types must match. Otherwise,
Integration Services Designer displays an error message.
You can use the Cache Connection Manager Editor to modify column data types, names, and other
column properties.
You can set properties through Integration Services Designer. For more information about the properties that
you can set in the Advanced Editor dialog box, see Transformation Custom Properties.
For more information about how to set properties, see Set the Properties of a Data Flow Component.
Cache Transformation Editor (Connection Manager Page)
Use the Connection Manager page of the Cache Transformation Editor dialog box to select an existing
Cache connection manager or create a new one.
To learn more about the Cache connection manager, see Cache Connection Manager.
Options
Cache connection manager
Select an existing Cache connection manager by using the list, or create a new connection by using the New
button.
New
Create a new connection by using the Cache Connection Manager Editor dialog box.
Edit
Modify an existing connection.
See Also
Integration Services Transformations
Data Flow
Cache Connection Manager
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Cache connection manager reads data from the Cache transform or from a cache file (.caw), and can save
the data to a cache file. Whether you configure the Cache connection manager to use a cache file, the data is
always stored in memory.
The Cache Transform transformation writes data from a connected data source in the data flow to a Cache
connection manager. The Lookup transformation in a package performs lookups on the data.
NOTE
The Cache connection manager does not support the Binary Large Object (BLOB) data types DT_TEXT, DT_NTEXT, and
DT_IMAGE. If the reference dataset contains a BLOB data type, the component will fail when you run the package. You can
use the Cache Connection Manager Editor to modify column data types. For more information, see .
Cache Connection Manager Edit or
NOTE
The protection level of the package does not apply to the cache file. If the cache file contains sensitive information, use an
access control list (ACL) to restrict access to the location or folder in which you store the file. You should enable access
only to certain accounts. For more information, see Access to Files Used by Packages.
NOTE
The Cache connection manager does not support the Binary Large Object (BLOB) data types DT_TEXT, DT_NTEXT, and
DT_IMAGE. If the reference dataset contains a BLOB data type, the component will fail when you run the package. You can
use the Cache Connection Manager Editor to modify column data types.
NOTE
The protection level of the package does not apply to the cache file. If the cache file contains sensitive information, use an
access control list (ACL) to restrict access to the location or folder in which you store the file. You should enable access
only to certain accounts. For more information, see Access to Files Used by Packages.
If you configure the cache connection manager to use a cache file, the connection manager will do one of the
following actions:
Save data to the file when a Cache Transform transformation is configured to write data from a data
source in the data flow to the Cache connection manager. For more information, see Cache Transform.
Read data from the cache file.
File name
Type the path and file name of the cache file.
Browse
Locate the cache file.
Refresh Metadata
Delete the column metadata in the Cache connection manager and repopulate the Cache connection manager
with column metadata from a selected cache file.
Columns Tab
Use the Columns tab of the Cache Connection Manager Editor dialog box to configure the properties of
each column in the cache.
Options
Column
Specify the column name.
Index Position
Specify which columns are index columns by specifying the index position of each column. The index is a
collection of one or more columns.
For non-index columns, the index position is 0.
For index columns, the index position is a sequential, positive number. This number indicates the order in which
the Lookup transformation compares rows in the reference dataset to rows in the input data source. The column
with the most unique values should have the lowest index position.
NOTE
When the Lookup transformation is configured to use a Cache connection manager, only index columns in the reference
dataset can be mapped to input columns. Also, all index columns must be mapped.
Type
Specify the data type of the column.
Length
Specifies the column data type. If applicable to the data type, you can update Length .
Precision
Specifies the precision for certain column data types. Precision is the number of digits in a number. If applicable
to the data type, you can update Precision .
Scale
Specifies the scale for certain column data types. Scale is the number of digits to the right of the decimal point
in a number. If applicable to the data type, you can update Scale .
Code Page
Specifies the code page for the column type. If applicable to the data type, you can update Code Page .
Related Tasks
Implement a Lookup Transformation in Full Cache Mode Using the Cache Connection Manager
Merge Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Merge transformation combines two sorted datasets into a single dataset. The rows from each dataset are
inserted into the output based on values in their key columns.
By including the Merge transformation in a data flow, you can perform the following tasks:
Merge data from two data sources, such as tables and files.
Create complex datasets by nesting Merge transformations.
Remerge rows after correcting errors in the data.
The Merge transformation is similar to the Union All transformations. Use the Union All transformation instead of
the Merge transformation in the following situations:
The transformation inputs are not sorted.
The combined output does not need to be sorted.
The transformation has more than two inputs.
Input Requirements
The Merge Transformation requires sorted data for its inputs. For more information about this important
requirement, see Sort Data for the Merge and Merge Join Transformations.
The Merge transformation also requires that the merged columns in its inputs have matching metadata. For
example, you cannot merge a column that has a numeric data type with a column that has a character data type. If
the data has a string data type, the length of the column in the second input must be less than or equal to the
length of the column in the first input with which it is merged.
In the SSIS Designer, the user interface for the Merge transformation automatically maps columns that have the
same metadata. You can then manually map other columns that have compatible data types.
This transformation has two inputs and one output. It does not support an error output.
Related Tasks
For details about how to set properties, see the following topics:
Set the Properties of a Data Flow Component
Sort Data for the Merge and Merge Join Transformations
IMPORTANT
The Merge Transformation requires sorted data for its inputs. For more information about this important requirement, see
Sort Data for the Merge and Merge Join Transformations.
Options
Output Column Name
Specify the name of the output column.
Merge Input 1
Select the column to merge as Merge Input 1.
Merge Input 2
Select the column to merge as Merge Input 2.
See Also
Merge Join Transformation
Union All Transformation
Data Flow
Integration Services Transformations
Merge Join Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Merge Join transformation provides an output that is generated by joining two sorted datasets using a FULL,
LEFT, or INNER join. For example, you can use a LEFT join to join a table that includes product information with a
table that lists the country/region in which a product was manufactured. The result is a table that lists all products
and their country/region of origin.
You can configure the Merge Join transformation in the following ways:
Specify the join is a FULL, LEFT, or INNER join.
Specify the columns the join uses.
Specify whether the transformation handles null values as equal to other nulls.
NOTE
If null values are not treated as equal values, the transformation handles null values like the SQL Server Database
Engine does.
This transformation has two inputs and one output. It does not support an error output.
Input Requirements
The Merge Join Transformation requires sorted data for its inputs. For more information about this important
requirement, see Sort Data for the Merge and Merge Join Transformations.
Join Requirements
The Merge Join transformation requires that the joined columns have matching metadata. For example, you
cannot join a column that has a numeric data type with a column that has a character data type. If the data has a
string data type, the length of the column in the second input must be less than or equal to the length of the
column in the first input with which it is merged.
Buffer Throttling
You no longer have to configure the value of the MaxBuffersPerInput property because Microsoft has made
changes that reduce the risk that the Merge Join transformation will consume excessive memory. This problem
sometimes occurred when the multiple inputs of the Merge Join produced data at uneven rates.
Related Tasks
You can set properties through the SSIS Designer or programmatically.
For information about how to set properties of this transformation, click one of the following topics:
Extend a Dataset by Using the Merge Join Transformation
Set the Properties of a Data Flow Component
Sort Data for the Merge and Merge Join Transformations
IMPORTANT
The Merge Join Transformation requires sorted data for its inputs. For more information about this important requirement,
see Sort Data for the Merge and Merge Join Transformations.
Options
Join type
Specify whether you want to use an inner join, left outer join, or full join.
Swap Inputs
Switch the order between inputs by using the Swap Inputs button. This selection may be useful with the Left
outer join option.
Input
For each column that you want in the merged output, first select from the list of available inputs.
Inputs are displayed in two separate tables. Select columns to include in the output. Drag columns to create a join
between the tables. To delete a join, select it and then press the DELETE key.
Input Column
Select a column to include in the merged output from the list of available columns on the selected input.
Output Alias
Type an alias for each output column. The default is the name of the input column; however, you can choose any
unique, descriptive name.
See Also
Merge Transformation
Union All Transformation
Integration Services Transformations
Extend a Dataset by Using the Merge Join
Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To add and configure a Merge Join transformation, the package must already include at least one Data Flow task
and two data flow components that provide inputs to the Merge Join transformation.
The Merge Join transformation requires two sorted inputs. For more information, see Sort Data for the Merge and
Merge Join Transformations.
To extend a dataset
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Data Flow tab, and then, from the Toolbox , drag the Merge Join transformation to the design
surface.
4. Connect the Merge Join transformation to the data flow by dragging the connector from a data source or a
previous transformation to the Merge Join transformation.
5. Double-click the Merge Join transformation.
6. In the Merge Join Transformation Editor dialog box, select the type of join to use in the Join type list.
NOTE
If you select the Left outer join type, you can click Swap Inputs to switch the inputs and convert the left outer
join to a right outer join.
7. Drag columns in the left input to columns in the right input to specify the join columns. If the columns have
the same name, you can select the Join Key check box and the Merge Join transformation automatically
creates the join.
NOTE
You can create joins only between columns that have the same sort position, and the joins must be created in the
order specified by the sort position. If you attempt to create the joins out of order, the Merge Join
Transformation Editor prompts you to create additional joins for the skipped sort order positions.
NOTE
By default, the output is sorted on the join columns.
8. In the left and right inputs, select the check boxes of additional columns to include in the output. Join
columns are included by default.
9. Optionally, update the names of output columns in the Output Alias column.
10. Click OK .
11. To save the updated package, click Save Selected Items on the File menu.
See Also
Merge Join Transformation
Integration Services Transformations
Integration Services Paths
Data Flow Task
Sort Data for the Merge and Merge Join
Transformations
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In Integration Services, the Merge and Merge Join transformations require sorted data for their inputs. The
input data must be sorted physically, and sort options must be set on the outputs and the output columns in
the source or in the upstream transformation. If the sort options indicate that the data is sorted, but the data is
not actually sorted, the results of the merge or merge join operation are unpredictable.
IMPORTANT
You cannot use the ORDER BY clause alone because the ORDER BY clause uses a SQL Server collation to sort
string values. The use of the SQL Server collation might result in a different sort order than Windows collation,
which can cause the Merge or Merge Join transformation to produce unexpected results.
IMPORTANT
Setting the value of the IsSor ted property to True does not sort the data. This property only provides a hint to
downstream components that the data has been previously sorted.
The Sor tKeyPosition property of output columns that indicates whether a column is sorted, the
column's sort order, and the sequence in which multiple columns are sorted. This property must be set
for each column of sorted data.
If you use a Sort transformation to sort the data, the Sort transformation sets both of these properties as
required by the Merge or Merge Join transformation. That is, the Sort transformation sets the IsSor ted
property of its output to True , and sets the Sor tKeyPosition properties of its output columns.
However, if you do not use a Sort transformation to sort the data, you must set these sort properties manually
on the source or the upstream transformation. To manually set the sort properties on the source or upstream
transformation, use the following procedure.
To manually set sort attributes on a source or transformation component
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you
want.
2. In Solution Explorer, double-click the package to open it.
3. On the Data Flow tab, locate the appropriate source or upstream transformation, or drag it from the
Toolbox to the design surface.
4. Right-click the component and click Show Advanced Editor .
5. Click the Input and Output Proper ties tab.
6. Click <component name> Output , and set the IsSor ted property to True .
NOTE
If you manually set the IsSor ted property of the output to True and the data is not sorted, there might be
missing data or bad data comparisons in the downstream Merge or Merge Join transformation when you run
the package.
For this statement, you would set the Sor tKeyPosition property for each column as follows:
Set the Sor tKeyPosition property of ColumnA to 1. This indicates that ColumnA is the first
column to be sorted and is sorted in ascending order.
Set the Sor tKeyPosition property of ColumnB to -2. This indicates that ColumnB is the second
column to be sorted and is sorted in descending order
Set the Sor tKeyPosition property of ColumnC to 3. This indicates that ColumnC is the third
column to be sorted and is sorted in ascending order.
9. Repeat step 8 for each sorted column.
10. Click OK .
11. To save the updated package, click Save Selected Items on the File menu.
See Also
Merge Transformation
Merge Join Transformation
Integration Services Transformations
Integration Services Paths
Data Flow Task
Multicast Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Multicast transformation distributes its input to one or more outputs. This transformation is similar to the
Conditional Split transformation. Both transformations direct an input to multiple outputs. The difference between
the two is that the Multicast transformation directs every row to every output, and the Conditional Split directs a
row to a single output. For more information, see Conditional Split Transformation.
You configure the Multicast transformation by adding outputs.
Using the Multicast transformation, a package can create logical copies of data. This capability is useful when the
package needs to apply multiple sets of transformations to the same data. For example, one copy of the data is
aggregated and only the summary information is loaded into its destination, while another copy of the data is
extended with lookup values and derived columns before it is loaded into its destination.
This transformation has one input and multiple outputs. It does not support an error output.
Related Tasks
For information about how to set properties of this component, see Set the Properties of a Data Flow Component.
See Also
Data Flow
Integration Services Transformations
OLE DB Command Transformation
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The OLE DB Command transformation runs an SQL statement for each row in a data flow. For example, you can
run an SQL statement that inserts, updates, or deletes rows in a database table.
You can configure the OLE DB Command Transformation in the following ways:
Provide the SQL statement that the transformation runs for each row.
Specify the number of seconds before the SQL statement times out.
Specify the default code page.
Typically, the SQL statement includes parameters. The parameter values are stored in external columns in the
transformation input, and mapping an input column to an external column maps an input column to a parameter.
For example, to locate rows in the DimProduct table by the value in their ProductKey column and then delete
them, you can map the external column named Param_0 to the input column named ProductKey, and then run
the SQL statement DELETE FROM DimProduct WHERE ProductKey = ? .. The OLE DB Command transformation provides
the parameter names and you cannot modify them. The parameter names are Param_0 , Param_1 , and so on.
If you configure the OLE DB Command transformation by using the Advanced Editor dialog box, the parameters
in the SQL statement may be mapped automatically to external columns in the transformation input, and the
characteristics of each parameter defined, by clicking the Refresh button. However, if the OLE DB provider that the
OLE DB Command transformation uses does not support deriving parameter information from the parameter, you
must configure the external columns manually. This means that you must add a column for each parameter to the
external input to the transformation, update the column names to use names like Param_0 , specify the value of
the DBParamInfoFlags property, and map the input columns that contain parameter values to the external
columns.
The value of DBParamInfoFlags represents the characteristics of the parameter. For example, the value 1 specifies
that the parameter is an input parameter, and the value 65 specifies that the parameter is an input parameter and
may contain a null value. The values must match the values in the OLE DB DBPARAMFLAGSENUM enumeration.
For more information, see the OLE DB reference documentation.
The OLE DB Command transformation includes the SQLCommand custom property. This property can be
updated by a property expression when the package is loaded. For more information, see Integration Services
(SSIS) Expressions, Use Property Expressions in Packages, and Transformation Custom Properties.
This transformation has one input, one regular output, and one error output.
Logging
You can log the calls that the OLE DB Command transformation makes to external data providers. You can use this
logging capability to troubleshoot the connections and commands to external data sources that the OLE DB
Command transformation performs. To log the calls that the OLE DB Command transformation makes to external
data providers, enable package logging and select the Diagnostic event at the package level. For more
information, see Troubleshooting Tools for Package Execution.
Related Tasks
You can configure the transformation by either using the SSIS Designer or the object model. See the Developer
Guide for details about programmatically configuring this transformation.
See Also
Data Flow
Integration Services Transformations
Percentage Sampling Transformation
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Percentage Sampling transformation creates a sample data set by selecting a percentage of the transformation
input rows. The sample data set is a random selection of rows from the transformation input, to make the resultant
sample representative of the input.
NOTE
In addition to the specified percentage, the Percentage Sampling transformation uses an algorithm to determine whether a
row should be included in the sample output. This means that the number of rows in the sample output may not exactly
reflect the specified percentage. For example, specifying 10 percent for an input data set that has 25,000 rows may not
generate a sample with 2,500 rows; the sample may have a few more or a few less rows.
The Percentage Sampling transformation is especially useful for data mining. By using this transformation, you can
randomly divide a data set into two data sets: one for training the data mining model, and one for testing the
model.
The Percentage Sampling transformation is also useful for creating sample data sets for package development. By
applying the Percentage Sampling transformation to a data flow, you can uniformly reduce the size of the data set
while preserving its data characteristics. The test package can then run more quickly because it uses a small, but
representative, data set.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Pivot transformation makes a normalized data set into a less normalized but more compact version by
pivoting the input data on a column value. For example, a normalized Orders data set that lists customer name,
product, and quantity purchased typically has multiple rows for any customer who purchased multiple products,
with each row for that customer showing order details for a different product. By pivoting the data set on the
product column, the Pivot transformation can output a data set with a single row per customer. That single row
lists all the purchases by the customer, with the product names shown as column names, and the quantity shown
as a value in the product column. Because not every customer purchases every product, many columns may
contain null values.
When a dataset is pivoted, input columns perform different roles in the pivoting process. A column can participate
in the following ways:
The column is passed through unchanged to the output. Because many input rows can result only in one
output row, the transformation copies only the first input value for the column.
The column acts as the key or part of the key that identifies a set of records.
The column defines the pivot. The values in this column are associated with columns in the pivoted dataset.
The column contains values that are placed in the columns that the pivot creates.
This transformation has one input, one regular output, and one error output.
Y EA R P RO DUC T N A M E TOTA L
The following table shows a data set after the data has been pivoted on the Year column.
P RO DUC T N A M E 2002 2003 2004
To pivot the data on the Year column, as shown above, the following options are set in the Pivot dialog box.
Year is selected in the Pivot Key list box.
Product Name is selected in the Set Key list box.
Total is selected in the Pivot Value list box.
The following values are entered in the Generate pivot output columns from values box.
[2002],[2003],[2004]
Related Content
For information about how to set the properties of this component, see Set the Properties of a Data Flow
Component.
See Also
Unpivot Transformation
Data Flow
Integration Services Transformations
Row Count Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Row Count transformation counts rows as they pass through a data flow and stores the final count in a
variable.
A SQL Server Integration Services package can use row counts to update the variables used in scripts, expressions,
and property expressions. (For example, the variable that stores the row count can update the message text in an
e-mail message to include the number of rows.) The variable that the Row Count transformation uses must
already exist, and it must be in the scope of the Data Flow task to which the data flow with the Row Count
transformation belongs.
The transformation stores the row count value in the variable only after the last row has passed through the
transformation. Therefore, the value of the variable is not updated in time to use the updated value in the data flow
that contains the Row Count transformation. You can use the updated variable in a separate data flow.
This transformation has one input and one output. It does not support an error output.
Related Tasks
For information about how to set the properties of this component, see Set the Properties of a Data Flow
Component.
See Also
Integration Services (SSIS) Variables
Data Flow
Integration Services Transformations
Row Sampling Transformation
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Row Sampling transformation is used to obtain a randomly selected subset of an input dataset. You can
specify the exact size of the output sample, and specify a seed for the random number generator.
There are many applications for random sampling. For example, a company that wanted to randomly select 50
employees to receive prizes in a lottery could use the Row Sampling transformation on the employee database to
generate the exact number of winners.
The Row Sampling transformation is also useful during package development for creating a small but
representative dataset. You can test package execution and data transformation with richly representative data, but
more quickly because a random sample is used instead of the full dataset. Because the sample dataset used by the
test package is always the same size, using the sample subset also makes it easier to identify performance
problems in the package.
This transformation is similar to the Percentage Sampling transformation, which creates a sample dataset by
selecting a percentage of the input rows. See Percentage Sampling Transformation.
Related Tasks
Set the Properties of a Data Flow Component
Script Component
11/2/2020 • 8 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Script component hosts script and enables a package to include and run custom script code. You can use the
Script component in packages for the following purposes:
Apply multiple transformations to data instead of using multiple transformations in the data flow. For
example, a script can add the values in two columns and then calculate the average of the sum.
Access business rules in an existing .NET assembly. For example, a script can apply a business rule that
specifies the range of values that are valid in an Income column.
Use custom formulas and functions in addition to the functions and operators that the Integration
Services expression grammar provides. For example, validate credit card numbers that use the LUHN
formula.
Validate column data and skip records that contain invalid data. For example, a script can assess the
reasonableness of a postage amount and skip records with extremely high or low amounts.
The Script component provides an easy and quick way to include custom functions in a data flow. However, if
you plan to reuse the script code in multiple packages, you should consider programming a custom component
instead of using the Script component. For more information, see Developing a Custom Data Flow Component.
NOTE
If the Script component contains a script that tries to read the value of a column that is NULL, the Script component fails
when you run the package. We recommend that your script use the IsNull method to determine whether the column is
NULL before trying to read the column value.
The Script component can be used as a source, a transformation, or a destination. This component supports one
input and multiple outputs. Depending on how the component is used, it supports either an input or outputs or
both. The script is invoked by every row in the input or output.
If used as a source, the Script component supports multiple outputs.
If used as a transformation, the Script component supports one input and multiple outputs.
If used as a destination, the Script component supports one input.
The Script component does not support error outputs.
After you decide that the Script component is the appropriate choice for your package, you have to configure the
inputs and outputs, develop the script that the component uses, and configure the component itself.
The Script component provides a VSTA project that includes an auto-generated class, named ScriptMain, that
represents the component metadata. For example, if the Script component is used as a transformation that has
three outputs, ScriptMain includes a method for each output. ScriptMain is the entry point to the script.
VSTA includes all the standard features of the Visual Studio environment, such as the color-coded Visual Studio
editor, IntelliSense, and Object Browser. The script that the Script component uses is stored in the package
definition. When you are designing the package, the script code is temporarily written to a project file.
VSTA supports the Microsoft Visual C# and Microsoft Visual Basic programming languages.
For information about how to program the Script component, see Extending the Data Flow with the Script
Component. For more specific information about how to configure the Script component as a source,
transformation, or destination, see Developing Specific Types of Script Components. For additional examples
such as an ODBC destination that demonstrate the use of the Script component, see Additional Script
Component Examples.
NOTE
Unlike earlier versions where you could indicate whether the scripts were precompiled, all scripts are precompiled in SQL
Server 2008 Integration Services (SSIS) and later versions. When a script is precompiled, the language engine is not loaded
at run time and the package runs more quickly. However, precompiled binary files consume significant disk space.
NOTE
You can configure only one input when you use the SSIS Designer.
To learn more about the Script component, see Configuring the Script Component in the Script Component
Editor. To learn about programming the Script component, see Extending the Data Flow with the Script
Component.
Options
Input name
Select from the list of available inputs.
Available Input Columns
Using the check boxes, specify the columns that the script transformation will use.
Input Column
Select from the list of available input columns for each row. Your selections are reflected in the check box
selections in the Available Input Columns table.
Output Alias
Type an alias for each output column. The default is the name of the input column; however, you can choose any
unique, descriptive name.
Usage Type
Specify whether the Script Transformation will treat each column as ReadOnly or ReadWrite .
NOTE
Source components have outputs and no inputs, while destination components have inputs but no outputs.
Transformations have both inputs and outputs.
To learn more about the Script component, see Configuring the Script Component in the Script Component
Editor. To learn about programming the Script component, see Extending the Data Flow with the Script
Component.
Options
Inputs and outputs
Select an input or output on the left to view its properties in the table on the right. Properties available for
editing vary according to the selection. Many of the properties displayed are read-only. For more information on
the individual properties, see the following topics.
Common Properties
Transformation Custom Properties
Add Output
Add an additional output to the list.
Add Column
Select a folder in which to place the new output column, and then add the column by clicking Add Column .
Remove Output
Select an output, and then remove it by clicking Remove Output .
Remove Column
Select a column, and then remove it by clicking Remove Column .
VA L UE DESC RIP T IO N
Edit Script
Use Microsoft Visual Studio Tools for Applications (VSTA) to create or modify a script.
Related Content
Integration Services Transformations
Extending the Data Flow with the Script Component
Slowly Changing Dimension Transformation
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Slowly Changing Dimension transformation coordinates the updating and inserting of records in data
warehouse dimension tables. For example, you can use this transformation to configure the transformation
outputs that insert and update records in the DimProduct table of the AdventureWorksDW2012 database with
data from the Production.Products table in the AdventureWorks OLTP database.
IMPORTANT
The Slowly Changing Dimension Wizard only supports connections to SQL Server.
The Slowly Changing Dimension transformation provides the following functionality for managing slowly
changing dimensions:
Matching incoming rows with rows in the lookup table to identify new and existing rows.
Identifying incoming rows that contain changes when changes are not permitted.
Identifying inferred member records that require updating.
Identifying incoming rows that contain historical changes that require insertion of new records and the
updating of expired records.
Detecting incoming rows that contain changes that require the updating of existing records, including
expired ones.
The Slowly Changing Dimension transformation supports four types of changes: changing attribute, historical
attribute, fixed attribute, and inferred member.
Changing attribute changes overwrite existing records. This kind of change is equivalent to a Type 1
change. The Slowly Changing Dimension transformation directs these rows to an output named
Changing Attributes Updates Output .
Historical attribute changes create new records instead of updating existing ones. The only change that is
permitted in an existing record is an update to a column that indicates whether the record is current or
expired. This kind of change is equivalent to a Type 2 change. The Slowly Changing Dimension
transformation directs these rows to two outputs: Historical Attribute Inser ts Output and New
Output .
Fixed attribute changes indicate the column value must not change. The Slowly Changing Dimension
transformation detects changes and can direct the rows with changes to an output named Fixed
Attribute Output .
Inferred member indicates that the row is an inferred member record in the dimension table. An inferred
member exists when a fact table references a dimension member that is not yet loaded. A minimal
inferred-member record is created in anticipation of relevant dimension data, which is provided in a
subsequent loading of the dimension data. The Slowly Changing Dimension transformation directs these
rows to an output named Inferred Member Updates . When data for the inferred member is loaded, you
can update the existing record rather than create a new one.
NOTE
The Slowly Changing Dimension transformation does not support Type 3 changes, which require changes to the dimension
table. By identifying columns with the fixed attribute update type, you can capture the data values that are candidates for
Type 3 changes.
At run time, the Slowly Changing Dimension transformation first tries to match the incoming row to a record in
the lookup table. If no match is found, the incoming row is a new record; therefore, the Slowly Changing
Dimension transformation performs no additional work, and directs the row to New Output .
If a match is found, the Slowly Changing Dimension transformation detects whether the row contains changes. If
the row contains changes, the Slowly Changing Dimension transformation identifies the update type for each
column and directs the row to the Changing Attributes Updates Output , Fixed Attribute Output ,
Historical Attributes Inser ts Output , or Inferred Member Updates Output . If the row is unchanged, the
Slowly Changing Dimension transformation directs the row to the Unchanged Output .
Changing Attributes Updates The record in the lookup table is An OLE DB Command transformation
Output updated. This output is used for updates the record using an UPDATE
changing attribute rows. statement.
Fixed Attribute Output The values in rows that must not No default data flow is created. If the
change do not match values in the transformation is configured to
lookup table. This output is used for continue after it encounters changes to
fixed attribute rows. fixed attribute columns, you should
create a data flow that captures these
rows.
Historical Attributes Inser ts The lookup table contains at least one Derived Column transformations create
Output matching row. The row marked as columns for the expired row and the
"current" must now be marked as current row indicators. An OLE DB
"expired". This output is used for Command transformation updates the
historical attribute rows. record that must now be marked as
"expired". The row with the new column
values is directed to the New Output,
where the row is inserted and marked
as "current".
Inferred Member Updates Output Rows for inferred dimension members An OLE DB Command transformation
are inserted. This output is used for updates the record using an SQL
inferred member rows. UPDATE statement.
New Output The lookup table contains no matching A Derived Column transformation sets
rows. The row is added to the the current row indicator, and an OLE
dimension table. This output is used for DB destination inserts the row.
new rows and changes to historical
attributes rows.
O UT P UT DESC RIP T IO N DATA F LO W REQ UIREM EN T S
Unchanged Output The values in the lookup table match No default data flow is created because
the row values. This output is used for the Slowly Changing Dimension
unchanged rows. transformation performs no work. If
you want to capture these rows, you
should create a data flow for this
output.
Business Keys
The Slowly Changing Dimension transformation requires at least one business key column.
The Slowly Changing Dimension transformation does not support null business keys. If the data include rows in
which the business key column is null, those rows should be removed from the data flow. You can use the
Conditional Split transformation to filter rows whose business key columns contain null values. For more
information, see Conditional Split Transformation.
Related Tasks
Set the Properties of a Data Flow Component
Related Content
Handling Slowly Changing Dimensions in SSIS
Optimizing the Slowly Changing Dimension Wizard
Configure Outputs Using the Slowly Changing
Dimension Wizard
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Slowly Changing Dimension Wizard functions as the editor for the Slowly Changing Dimension
transformation. Building and configuring the data flow for slowly changing dimension data can be a complex task.
The Slowly Changing Dimension Wizard offers the simplest method of building the data flow for the Slowly
Changing Dimension transformation outputs by guiding you through the steps of mapping columns, selecting
business key columns, setting column change attributes, and configuring support for inferred dimension
members.
You must choose at least one business key column in the dimension table and map it to an input column. The
value of the business key links a record in the source to a record in the dimension table. The transformation uses
this mapping to locate the record in the dimension table and to determine whether a record is new or changing.
The business key is typically the primary key in the source, but it can be an alternate key as long as it uniquely
identifies a record and its value does not change. The business key can also be a composite key, consisting of
multiple columns. The primary key in the dimension table is usually a surrogate key, which means a numeric value
generated automatically by an identity column or by a custom solution such as a script.
Before you can run the Slowly Changing Dimension Wizard, you must add a source and a Slowly Changing
Dimension transformation to the data flow, and then connect the output from the source to the input of the Slowly
Changing Dimension transformation. Optionally, the data flow can include other transformations between the
data source and the Slowly Changing Dimension transformation.
To open the Slowly Changing Dimension Wizard in SSIS Designer, double-click the Slowly Changing Dimension
transformation.
See Also
Slowly Changing Dimension Transformation
Slowly Changing Dimension Wizard F1 Help
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Slowly Changing Dimension Wizard to configure the loading of data into various types of slowly
changing dimensions. This section provides F1 Help for the pages of the Slowly Changing Dimension Wizard .
The following table describes the topics in this section.
To learn more about this wizard, see Slowly Changing Dimension Transformation.
Welcome to the Slowly Changing Dimension Wizard
Introduces the Slowly Changing Dimension Wizard.
Select a Dimension Table and Keys (Slowly Changing Dimension Wizard)
Select a slowly changing dimension table and specify its key columns.
Slowly Changing Dimension Columns (Slowly Changing Dimension Wizard)
Select the type of change for selected slowly changing dimension columns.
Fixed and Changing Attribute Options (Slowly Changing Dimension Wizard
Specify options for fixed and changing attribute dimension columns.
Historical Attribute Options (Slowly Changing Dimension Wizard)
Specify options for historical attribute dimension columns.
Inferred Dimension Members (Slowly Changing Dimension Wizard)
Specify options for inferred dimension members.
Finish the Slowly Changing Dimension Wizard
Displays the configuration options selected by the user.
See Also
Slowly Changing Dimension Transformation
Configure Outputs Using the Slowly Changing Dimension Wizard
Welcome to the Slowly Changing Dimension Wizard
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Slowly Changing Dimension Wizard to configure the loading of data into various types of slowly
changing dimensions.
To learn more about this wizard, see Slowly Changing Dimension Transformation.
Options
Don't show this page again
Skip the welcome page the next time you open the wizard.
See Also
Configure Outputs Using the Slowly Changing Dimension Wizard
Select a Dimension Table and Keys (Slowly Changing
Dimension Wizard)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Select a Dimension Table and Keys page to select a dimension table to load. Map columns from the
data flow to the columns that will be loaded.
To learn more about this wizard, see Slowly Changing Dimension Transformation.
Options
Connection manager
Select an existing OLE DB connection manager from the list, or click New to create an OLE DB connection manager.
NOTE
The Slowly Changing Dimension Wizard only supports OLE DB connection managers, and only supports connections to SQL
Server.
New
Use the Configure OLE DB Connection Manager dialog box to select an existing connection manager, or click
New to create a new OLE DB connection.
Table or View
Select a table or view from the list.
Input Columns
Select from the list of input columns for which you may specify mapping.
Dimension Columns
View all available dimension columns.
Key Type
Select one of the dimension columns to be the business key. You must have one business key.
See Also
Configure Outputs Using the Slowly Changing Dimension Wizard
Slowly Changing Dimension Columns (Slowly
Changing Dimension Wizard)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Slowly Changing Dimensions Columns dialog box to select a change type for each slowly changing
dimension column.
To learn more about this wizard, see Slowly Changing Dimension Transformation.
Options
Dimension Columns
Select a dimension column from the list.
Change Type
Select a Fixed Attribute , or select one of the two types of changing attributes. Use Fixed Attribute when the
value in a column should not change; Integration Services then treats changes as errors. Use Changing Attribute
to overwrite existing values with changed values. Use Historical Attribute to save changed values in new records,
while marking previous records as outdated.
Remove
Select a dimension column, and remove it from the list of mapped columns by clicking Remove .
See Also
Configure Outputs Using the Slowly Changing Dimension Wizard
Fixed and Changing Attribute Options (Slowly
Changing Dimension Wizard
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Fixed and Changing Attribute Options dialog box to specify how to respond to changes in fixed and
changing attributes.
To learn more about this wizard, see Slowly Changing Dimension Transformation.
Options
Fixed attributes
For fixed attributes, indicate whether the task should fail if a change is detected in a fixed attribute.
Changing attributes
For changing attributes, indicate whether the task should change outdated or expired records, in addition to current
records, when a change is detected in a changing attribute. An expired record is a record that has been replaced
with a newer record by a change in a historical attribute (a Type 2 change). Selecting this option may impose
additional processing requirements on a multidimensional object constructed on the relational data warehouse.
See Also
Configure Outputs Using the Slowly Changing Dimension Wizard
Historical Attribute Options (Slowly Changing
Dimension Wizard)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Historical Attributes Options dialog box to show historical attributes by start and end dates, or to
record historical attributes in a column specially created for this purpose.
To learn more about this wizard, see Slowly Changing Dimension Transformation.
Options
Use a single column to show current and expired records
If you choose to use a single column to record the status of historical attributes, the following options are available:
O P T IO N DESC RIP T IO N
Column to indicate current record Select a column in which to indicate the current record.
Value when current Use either True or Current to show whether the record is
current.
Expiration value Use either False or Expired to show whether the record is a
historical value.
Use star t and end dates to identify current and expired records
The dimension table for this option must include a date column. If you choose to show historical attributes by start
and end dates, the following options are available:
O P T IO N DESC RIP T IO N
Star t date column Select the column in the dimension table to contain the start
date.
End date column Select the column in the dimension table to contain the end
date.
Variable to set date values Select a date variable from the list.
See Also
Configure Outputs Using the Slowly Changing Dimension Wizard
Inferred Dimension Members (Slowly Changing
Dimension Wizard)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Inferred Dimension Members dialog box to specify options for using inferred members. Inferred
members exist when a fact table references dimension members that are not yet loaded. When data for the
inferred member is loaded, you can update the existing record rather than create a new one.
To learn more about this wizard, see Slowly Changing Dimension Transformation.
Options
Enable inferred member suppor t
If you choose to enable inferred members, you must select one of the two options that follow.
All columns with a change type are null
Specify whether to enter null values in all columns with a change type in the new inferred member record.
Use a Boolean column to indicate whether the current record is an inferred member
Specify whether to use an existing Boolean column to indicate whether the current record is an inferred member.
Inferred member indicator
If you have chosen to use a Boolean column to indicate inferred members as described above, select the column
from the list.
See Also
Configure Outputs Using the Slowly Changing Dimension Wizard
Finish the Slowly Changing Dimension Wizard
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Finish the Slowly Changing Dimension Wizard dialog box to verify your choices before the wizard
builds support for slowly changing dimensions.
To learn more about this wizard, see Slowly Changing Dimension Transformation.
Options
The following outputs will be configured
Confirm that the list of outputs is appropriate for your purposes.
See Also
Configure Outputs Using the Slowly Changing Dimension Wizard
Sort Transformation
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Sort transformation sorts input data in ascending or descending order and copies the sorted data to the
transformation output. You can apply multiple sorts to an input; each sort is identified by a numeral that
determines the sort order. The column with the lowest number is sorted first, the sort column with the second
lowest number is sorted next, and so on. For example, if a column named Countr yRegion has a sort order of 1
and a column named City has a sort order of 2, the output is sorted by country/region and then by city. A positive
number denotes that the sort is ascending, and a negative number denotes that the sort is descending. Columns
that are not sorted have a sort order of 0. Columns that are not selected for sorting are automatically copied to
the transformation output together with the sorted columns.
The Sort transformation includes a set of comparison options to define how the transformation handles the string
data in a column. For more information, see Comparing String Data.
NOTE
The Sort transformation does not sort GUIDs in the same order as the ORDER BY clause does in Transact-SQL. While the
Sort transformation sorts GUIDs that start with 0-9 before GUIDs that start with A-F, the ORDER BY clause, as
implemented in the SQL Server Database Engine, sorts them differently. For more information, see ORDER BY Clause
(Transact-SQL).
The Sort transformation can also remove duplicate rows as part of its sort. Duplicate rows are rows with the same
sort key values. The sort key value is generated based on the string comparison options being used, which means
that different literal strings may have the same sort key values. The transformation identifies rows in the input
columns that have different values but the same sort key as duplicates.
The Sort transformation includes the MaximumThreads custom property that can be updated by a property
expression when the package is loaded. For more information, see Integration Services (SSIS) Expressions, Use
Property Expressions in Packages, and Transformation Custom Properties.
This transformation has one input and one output. It does not support error outputs.
Related Tasks
For more information about how to set properties of the component, see Set the Properties of a Data Flow
Component.
Related Content
Sample, SortDeDuplicateDelimitedString Custom SSIS Component, on codeplex.com.
See Also
Data Flow
Integration Services Transformations
Term Extraction Transformation
11/2/2020 • 12 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Term Extraction transformation extracts terms from text in a transformation input column, and then writes the
terms to a transformation output column. The transformation works only with English text and it uses its own
English dictionary and linguistic information about English.
You can use the Term Extraction transformation to discover the content of a data set. For example, text that contains
e-mail messages may provide useful feedback about products, so that you could use the Term Extraction
transformation to extract the topics of discussion in the messages, as a way of analyzing the feedback.
Exclusion Terms
Optionally, the Term Extraction transformation can reference a column in a table that contains exclusion terms,
meaning terms that the transformation should skip when it extracts terms from a data set. This is useful when a set
of terms has already been identified as inconsequential in a particular business and industry, typically because the
term occurs with such high frequency that it becomes a noise word. For example, when extracting terms from a
data set that contains customer support information about a particular brand of cars, the brand name itself might
be excluded because it is mentioned too frequently to have significance. Therefore, the values in the exclusion list
must be customized to the data set you are working with.
When you add a term to the exclusion list, all the terms-words or noun phrases-that contain the term are also
excluded. For example, if the exclusion list includes the single word data, then all the terms that contain this word,
such as data, data mining, data integrity, and data validation will also be excluded. If you want to exclude only
compounds that contain the word data, you must explicitly add those compound terms to the exclusion list. For
example, if you want to extract incidences of data, but exclude data validation, you would add data validation to the
exclusion list, and make sure that data is removed from the exclusion list.
The reference table must be a table in a SQL Server or an Access database. The Term Extraction transformation
uses a separate OLE DB connection to connect to the reference table. For more information, see OLE DB
Connection Manager.
The Term Extraction transformation works in a fully precached mode. At run time, the Term Extraction
transformation reads the exclusion terms from the reference table and stores them in its private memory before it
processes any transformation input rows.
NOTE
The tagging of parts of speech is based on a statistical model and the tagging may not be completely accurate.
If the Term Extraction transformation is configured to extract only nouns, only the words that are tagged as
singular or plural forms of nouns and proper nouns are extracted.
If the Term Extraction transformation is configured to extract only noun phrases, words that are tagged as nouns,
proper nouns, adjectives, and numbers may be combined to make a noun phrase, but the phrase must include at
least one word that is tagged as a singular or plural form of a noun or a proper noun. For example, the noun
phrase highest mountain combines a word tagged as a superlative adjective (highest) and a word tagged as noun
(mountain).
If the Term Extraction is configured to extract both nouns and noun phrases, both the rules for nouns and the rules
for noun phrases apply. For example, the transformation extracts bicycle and beautiful blue bicycle from the text
many beautiful blue bicycles.
NOTE
The extracted terms remain subject to the maximum term length and frequency threshold that the transformation uses.
Stemmed Words
The Term Extraction transformation also stems nouns to extract only the singular form of a noun. For example, the
transformation extracts man from men, mouse from mice, and bicycle from bicycles. The transformation uses its
dictionary to stem nouns. Gerunds are treated as nouns if they are in the dictionary.
The Term Extraction transformation stems words to their dictionary form as shown in these examples by using the
dictionary internal to the Term Extraction transformation.
Removing s from nouns. For example, bicycles becomes bicycle.
Removing es from nouns. For example, stories becomes story.
Retrieving the singular form for irregular nouns from the dictionary. For example, geese becomes goose.
Normalized Words
The Term Extraction transformation normalizes terms that are capitalized only because of their position in a
sentence, and uses their non-capitalized form instead. For example, in the phrases Dogs chase cats and Mountain
paths are steep, Dogs and Mountain would be normalized to dog and mountain.
The Term Extraction transformation normalizes words so that the capitalized and noncapitalized versions of words
are not treated as different terms. For example, in the text You see many bicycles in Seattle and Bicycles are blue,
bicycles and Bicycles are recognized as the same term and the transformation keeps only bicycle. Proper nouns
and words that are not listed in the internal dictionary are not normalized.
Case -Sensitive Normalization
The Term Extraction transformation can be configured to consider lowercase and uppercase words as either
distinct terms, or as different variants of the same term.
If the transformation is configured to recognize differences in case, terms like Method and method are
extracted as two different terms. Capitalized words that are not the first word in a sentence are never
normalized, and are tagged as proper nouns.
If the transformation is configured to be case-insensitive, terms like Method and method are recognized as
variants of a single term. The list of extracted terms might include either Method or method, depending on
which word occurs first in the input data set. If Method is capitalized only because it is the first word in a
sentence, it is extracted in normalized form.
NOTE
Acronyms that include one or more periods (.) are not separated into multiple sentences.
The Term Extraction transformation then separates the sentence into words using the following word boundaries:
Space
Tab
ASCII 0x0d (carriage return)
ASCII 0x0a (line feed)
NOTE
If an apostrophe is in a word that is a contraction, such as we're or it's, the word is broken at the apostrophe;
otherwise, the letters following the apostrophe are trimmed. For example, we're is split into we and 're, and bicycle's is
trimmed to bicycle.
See Also
Integration Services Error and Message Reference
Term Lookup Transformation
Term Lookup Transformation
11/2/2020 • 7 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Term Lookup transformation matches terms extracted from text in a transformation input column with terms
in a reference table. It then counts the number of times a term in the lookup table occurs in the input data set, and
writes the count together with the term from the reference table to columns in the transformation output. This
transformation is useful for creating a custom word list based on the input text, complete with word frequency
statistics.
Before the Term Lookup transformation performs a lookup, it extracts words from the text in an input column
using the same method as the Term Extraction transformation:
Text is broken into sentences.
Sentences are broken into words.
Words are normalized.
To further customize which terms to match, the Term Lookup transformation can be configured to perform a case-
sensitive match.
Matches
The Term Lookup performs a lookup and returns a value using the following rules:
If the transformation is configured to perform case-sensitive matches, matches that fail a case-sensitive
comparison are discarded. For example, student and STUDENT are treated as separate words.
NOTE
A non-capitalized word can be matched with a word that is capitalized at the beginning of a sentence. For example,
the match between student and Student succeeds when Student is the first word in a sentence.
If a plural form of the noun or noun phrase exists in the reference table, the lookup matches only the plural
form of the noun or noun phrase. For example, all instances of students would be counted separately from
the instances of student.
If only the singular form of the word is found in the reference table, both the singular and the plural forms
of the word or phrase are matched to the singular form. For example, if the lookup table contains student,
and the transformation finds the words student and students, both words would be counted as a match for
the lookup term student.
If the text in the input column is a lemmatized noun phrase, only the last word in the noun phrase is
affected by normalization. For example, the lemmatized version of doctors appointments is doctors
appointment.
When a lookup item contains terms that overlap in the reference set-that is, a sub-term is found in more than one
reference record-the Term Lookup transformation returns only one lookup result. The following example shows
the result when a lookup item contains an overlapping sub-term. The overlapping sub-term in this case is
Windows, which is found within two reference terms. However, the transformation does not return two results,
but returns only a single reference term, Windows. The second reference term, Windows 7 Professional, is not
returned.
IT EM VA L UE
Output Windows
The Term Lookup transformation can match nouns and noun phrases that contain special characters, and the data
in the reference table may include these characters. The special characters are as follows: %, @, &, $, #, *, :, ;, ., , , !,
?, <, >, +, =, ^, ~, |, \, /, (, ), [, ], {, }, ", and '.
Data Types
The Term Lookup transformation can only use a column that has either the DT_WSTR or the DT_NTEXT data type.
If a column contains text, but does not have one of these data types, the Data Conversion transformation can add
a column with the DT_WSTR or DT_NTEXT data type to the data flow and copy the column values to the new
column. The output from the Data Conversion transformation can then be used as the input to the Term Lookup
transformation. For more information, see Data Conversion Transformation.
See Also
Integration Services Error and Message Reference
Term Extraction Transformation
Union All Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Union All transformation combines multiple inputs into one output. For example, the outputs from five
different Flat File sources can be inputs to the Union All transformation and combined into one output.
Related Tasks
Merge Data by Using the Union All Transformation
Merge Data by Using the Union All Transformation
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To add and configure a Union All transformation, the package must already include at least one Data Flow task and
two data sources.
The Union All transformation combines multiple inputs. The first input that is connected to the transformation is
the reference input, and the inputs connected subsequently are the secondary inputs. The output includes the
columns in the reference input.
To combine inputs in a data flow
1. In SQL Server Data Tools (SSDT), double-click the package in Solution Explorer to open the package in SSIS
Designer, and then click the Data Flow tab.
2. From the Toolbox , drag the Union All transformation to the design surface of the Data Flow tab.
3. Connect the Union All transformation to the data flow by dragging a connector from the data source or a
previous transformation to the Union All transformation.
4. Double-click the Union All transformation.
5. In the Union All Transformation Editor , map a column from an input to a column in the Output
Column Name list by clicking a row and then selecting a column in the input list. Select <ignore> in the
input list to skip mapping the column.
NOTE
The mapping between two columns requires that the metadata of the columns match.
NOTE
Columns in a secondary input that are not mapped to reference columns are set to null values in the output.
6. Optionally, modify the names of columns in the Output Column Name column.
7. Repeat steps 5 and 6 for each column in each input.
8. Click OK .
9. To save the updated package, click Save Selected Items on the File menu.
See Also
Union All Transformation
Integration Services Transformations
Integration Services Paths
Data Flow Task
Unpivot Transformation
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Unpivot transformation makes an unnormalized dataset into a more normalized version by expanding values
from multiple columns in a single record into multiple records with the same values in a single column. For
example, a dataset that lists customer names has one row for each customer, with the products and the quantity
purchased shown in columns in the row. After the Unpivot transformation normalizes the data set, the data set
contains a different row for each product that the customer purchased.
The following diagram shows a data set before the data is unpivoted on the Product column.
The following diagram shows a data set after it has been unpivoted on the Product column.
Under some circumstances, the unpivot results may contain rows with unexpected values. For example, if the
sample data to unpivot shown in the diagram had null values in all the Qty columns for Fred, then the output
would include only one row for Fred, not five. The Qty column would contain either null or zero, depending on
the column data type.
Options
Available Input Columns
Using the check boxes, specify the columns to pivot into rows.
Name
View the name of the available input column.
Pass Through
Indicate whether to include the column in the unpivoted output.
Input Column
Select from the list of available input columns for each row. Your selections are reflected in the check box
selections in the Available Input Columns table.
In the Unpivot scenario described in Unpivot Transformation, the Input Columns are the Ham , Soda , Milk , Beer ,
and Chips columns.
Destination Column
Provide a name for the data column.
In the Unpivot scenario described in Unpivot Transformation, the Destination Column is the quantity (Qty )
column.
Pivot Key Value
Provide a name for the pivot value. The default is the name of the input column; however, you can choose any
unique, descriptive name.
The value of this property can be specified by using a property expression.
In the Unpivot scenario described in Unpivot Transformation, the Pivot Values will appear in the new Product
column designated by the Pivot Key Value Column Name option, as the text values Ham , Soda , Milk , Beer ,
and Chips .
Pivot Key Value Column Name
Provide a name for the pivot value column. The default is "Pivot Key Value"; however, you can choose any unique,
descriptive name.
In the Unpivot scenario described in Unpivot Transformation, the Pivot Key Value Column Name is Product and
designates the new Product column into which the Ham , Soda , Milk , Beer , and Chips columns are unpivoted.
See Also
Integration Services Error and Message Reference
Pivot Transformation
Transform Data with Transformations
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services includes three types of data flow components: sources, transformations, and destinations.
The following diagram shows a simple data flow that has a source, two transformations, and a destination.
See Also
Data Flow Task
Data Flow
Connect Components with Paths
Error Handling in Data
Data Flow
Transformation Custom Properties
11/2/2020 • 34 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data
Factory
In addition to the properties that are common to most data flow objects in the SQL Server Integration
Services object model, many data flow objects have custom properties that are specific to the object.
These custom properties are available only at run time, and are not documented in the Integration
Services Managed Programming Reference Documentation.
This topic lists and describes the custom properties of the various data flow transformations. For
information about the properties common to most data flow objects, see Common Properties.
Some properties of transformations can be set by using property expressions. For more information, see
Data Flow Properties that Can Be Set by Using Expressions.
Medium (2)-indicates up to 5
million key values
Unspecified (0)-indicates no
CountDistinctScale value is used.
Using the Unspecified (0) option
may affect performance in large
data sets.
Medium (2)-indicates up to 5
million key values.
The following table describes the custom properties of the output of the Aggregate transformation. All
properties are read/write.
Medium (2)-indicates up to 5
million key values,
Unspecified (0)-indicates no
KeyScale value is used.
The following table describes the custom properties of the output columns of the Aggregate
transformation. All properties are read/write.
Group by (0)
Count (1)
Countdistinct (3)
Sum (4)
Average (5)
Maximum (7)
Minimum (6)
Medium (2)-indicates up to 5
million key values,
Unspecified (0)-indicates no
CountDistinctScale value is used.
P RO P ERT Y DATA T Y P E DESC RIP T IO N
The input and the input columns of the Aggregate transformation have no custom properties.
For more information, see Aggregate Transformation.
Package ID (1)
Task ID (8)
Version ID (3)
The input, the input columns, and the output of the Audit transformation have no custom properties.
For more information, see Audit Transformation.
Hiragana (3)
Katakana (4)
Lowercase (0)
Uppercase (1)
The input, the input columns, and the output of the Character Map transformation have no custom
properties.
For more information, see Character Map Transformation.
The input, the input columns, and the output columns of the Conditional Split transformation have no
custom properties.
For more information, see Conditional Split Transformation.
The input, the input columns, and the output of the Copy Column transformation have no custom
properties.
For more information, see Copy Column Transformation.
The input, the input columns, and the output of the Data Conversion transformation have no custom
properties.
For more information, see Data Conversion Transformation.
The input, the input columns, the output, and the output columns of the Data Mining Query
transformation have no custom properties.
For more information, see Data Mining Query Transformation.
The input and output of the Derived Column transformation have no custom properties.
For more information, see Derived Column Transformation.
The input, the output, and the output columns of the Export Column transformation have no custom
properties.
For more information, see Export Column Transformation.
The input, the output, and the output columns of the Import Column transformation have no custom
properties.
For more information, see Import Column Transformation.
The following table describes the custom properties of the input columns of the Fuzzy Grouping
transformation. All properties are read/write.
P RO P ERT Y DATA T Y P E DESC RIP T IO N
FullySensitive
IgnoreCase
IgnoreKanaType
IgnoreNonSpace
IgnoreSymbols
IgnoreWidth
NumeralsNotSpecial (0)-use if
numerals are not significant.
LeadingNumeralsSignificant (1)-
use if leading numerals are
significant.
TrailingNumeralsSignificant (2)-
use if trailing numerals are
significant.
LeadingAndTrailingNumeralsSig
nificant (3)-use if both leading and
trailing numerals are significant.
The following table describes the custom properties of the output columns of the Fuzzy Grouping
transformation. All properties are read/write.
Undefined (0)
KeyIn (1)
KeyOut (2)
Similarity (3)
ColumnSimilarity (4)
PassThru (5)
Canonica l (6)
The input and output of the Fuzzy Grouping transformation have no custom properties.
For more information, see Fuzzy Grouping Transformation.
ReuseExistingIndex (0)
GenerateNewIndex (1)
GenerateAndPersistNewIndex
(2)
GenerateAndMaintainNewInde
x (3)
The following table describes the custom properties of the input columns of the Fuzzy Lookup
transformation. All properties are read/write.
The following table describes the custom properties of the output columns of the Fuzzy Lookup
transformation. All properties are read/write.
NOTE
For output columns that contain passthrough values from the corresponding input columns,
CopyFromReferenceColumn is empty and SourceInputColumnLineageID contains the LineageID of the
corresponding input column. For output columns that contain lookup results, CopyFromReferenceColumn
contains the name of the lookup column, and SourceInputColumnLineageID is empty.
P RO P ERT Y DATA T Y P E DESC RIP T IO N
Undefined (0)
Similarity (1)
Confidence (2)
ColumnSimilarity (3)
The input and output of the Fuzzy Lookup transformation have no custom properties.
For more information, see Fuzzy Lookup Transformation.
CacheType Integer (enumeration) The cache type for the lookup table.
The values are Full (0), Par tial (1),
and None (2). The default value of
this property is Full.
The following table describes the custom properties of the input columns of the Lookup transformation.
All properties are read/write.
The following table describes the custom properties of the output columns of the Lookup
transformation. All properties are read/write.
P RO P ERT Y N A M E DATA T Y P E DESC RIP T IO N
The input and output of the Lookup transformation have no custom properties.
For more information, see Lookup Transformation.
The following table describes the custom properties of the output columns of the Merge Join
transformation. All properties are read/write.
The input, the input columns, and the output of the Merge Join transformation have no custom
properties.
For more information, see Merge Join Transformation.
OLE DB Command Transformation Custom Properties
The OLE DB Command transformation has both custom properties and the properties common to all
data flow components.
The following table describes the custom properties of the OLE DB Command transformation.
The following table describes the custom properties of the external columns of the OLE DB Command
transformation. All properties are read/write.
The input, the input columns, the output, and the output columns of the OLE DB Command
transformation have no custom properties.
For more information, see OLE DB Command Transformation.
The following table describes the custom properties of the outputs of the Percentage Sampling
transformation. All properties are read/write.
The input, the input columns, and the output columns of the Percentage Sampling transformation have
no custom properties.
For more information, see Percentage Sampling Transformation.
The following table describes the custom properties of the input columns of the Pivot transformation. All
properties are read/write.
0:
The column is not pivoted, and the
column values are passed through
to the transformation output.
1:
The column is part of the set key
that identifies one or more rows as
part of one set. All input rows with
the same set key are combined into
one output row.
2:
The column is a pivot column. At
least one column is created from
each column value.
3:
The values from this column are put
in columns that are created as a
result of the pivot.
The following table describes the custom properties of the output columns of the Pivot transformation.
All properties are read/write.
The input, the input columns, the output, and the output columns of the Row Count transformation have
no custom properties.
For more information, see Row Count Transformation.
The following table describes the custom properties of the outputs of the Row Sampling transformation.
All properties are read/write.
The following table describes the custom properties of the output columns of the Row Sampling
transformation. All properties are read/write.
The input and input columns of the Row Sampling transformation have no custom properties.
For more information, see Row Sampling Transformation.
Script Component Custom Properties
The Script Component has both custom properties and the properties common to all data flow
components. The same custom properties are available whether the Script Component functions as a
source, transformation, or destination.
The following table describes the custom properties of the Script Component. All properties are
read/write.
The input, the input columns, the output, and the output columns of the Script Component have no
custom properties, unless the script developer creates custom properties for them.
For more information, see Script Component.
The following table describes the custom properties of the input columns of the Slowly Changing
Dimension transformation. All properties are read/write.
The input, the outputs, and the output columns of the Slowly Changing Dimension transformation have
no custom properties.
For more information, see Slowly Changing Dimension Transformation.
The following table describes the custom properties of the input columns of the Sort transformation. All
properties are read/write.
The following table describes the custom properties of the output columns of the Sort transformation.
All properties are read/write.
The input and output of the Sort transformation have no custom properties.
For more information, see Sort Transformation.
The input, the input columns, the output, and the output columns of the Term Extraction transformation
have no custom properties.
For more information, see Term Extraction Transformation.
The following table describes the custom properties of the input columns of the Term Lookup
transformation. All properties are read/write.
The following table describes the custom properties of the output columns of the Term Lookup
transformation. All properties are read/write.
The input and output of the Term Lookup transformation have no custom properties.
For more information, see Term Lookup Transformation.
NOTE
This section relies on the Unpivot scenario described in Unpivot Transformation to illustrate the use of the
options described here.
The following table describes the custom properties of the input columns of the Unpivot transformation.
All properties are read/write.
P RO P ERT Y DATA T Y P E DESC RIP T IO N
The following table describes the custom properties of the output columns of the Unpivot
transformation. All properties are read/write.
The input and output of the Unpivot transformation have no custom properties.
For more information, see Unpivot Transformation.
See Also
Integration Services Transformations
Common Properties
Path Properties
Data Flow Properties that Can Be Set by Using Expressions
XML Source
11/2/2020 • 7 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The XML source reads an XML data file and populates the columns in the source output with the data.
The data in XML files frequently includes hierarchical relationships. For example, an XML data file can represent
catalogs and items in catalogs. Before the data can enter the data flow, the relationship of the elements in XML
data file must be determined, and an output must be generated for each element in the file.
Schemas
The XML source uses a schema to interpret the XML data. The XML source supports use of a XML Schema
Definition (XSD) file or inline schemas to translate the XML data into a tabular format. If you configure the XML
source by using the XML Source Editor dialog box, the user interface can generate an XSD from the specified
XML data file.
NOTE
DTDs are not supported.
The schemas can support a single namespace only; they do not support schema collections.
NOTE
The XML source does not validate the data in the XML file against the XSD.
VA L UE DESC RIP T IO N
XML file from variable Specify the XML file name in a variable.
Related Tasks
Extract Data by Using the XML Source
Extract Data by Using the XML Source
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To add and configure an XML source, the package must already include at least one Data Flow task.
To extract data using an XML source
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want.
2. In Solution Explorer, double-click the package to open it.
3. Click the Data Flow tab, and then, from the Toolbox , drag the XML source to the design surface.
4. Double-click the XML source.
5. In the XML Source Editor , on the Connection Manager page, select a data access mode:
For the XML file location access mode, click Browse and locate the folder that contains the XML
file.
For the XML file from variable access mode, select the user-defined variable that contains the path
of the XML file.
For the XML data from variable access mode, select the user-defined variable that contains the
XML data.
NOTE
The variables must be defined in the scope of the Data Flow task that contains the XML source, or in the scope of the
package; additionally, the variable must have a string data type.
6. Optionally, select Use inline schema to indicate that the XML document includes schema information.
7. To specify an external XML Schema definition language (XSD) schema for the XML file, do one of the
following:
Click Browse to locate an existing XSD file.
Click Generate XSD to create an XSD from the XML file.
8. To update the names of output columns, click Columns and edit the values in the Output Column list.
9. To configure the error output, click Error Output . For more information, see Debugging Data Flow.
10. Click OK .
11. To save the updated package, click Save Selected Items on the File menu.
See Also
XML Source
Integration Services Transformations
Integration Services Paths
Data Flow Task
XML Source Custom Properties
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The XML source has both custom properties and the properties common to all data flow components.
The following table describes the custom properties of the XML source. All properties are read/write.
The following table describes the custom properties of the output of the XML source. All properties are read/write.
See Also
Common Properties
Integration Services (SSIS) Variables
11/2/2020 • 16 minutes to read • Edit Online
You can create user-defined variables for all Integration Services container types:
packages, Foreach Loop containers, For Loop containers, Sequence containers,
tasks, and event handlers. User-defined variables are members of the Variables
collection of the container.
If you create the package using SSIS Designer, you can see the members of the
Variables collections in the Variables folders on the Package Explorer tab of
SSIS Designer. The folders list user-defined variables and system variables.
You can configure user-defined variables in the following ways:
Provide a name and description for the variable.
Specify a namespace for the variable.
Indicate whether the variable raises an event when its value changes.
Indicate whether the variable is read-only or read/write.
Use the evaluation result of an expression to set the variable value.
Create the variable in the scope of the package or a package object such as
a task.
Specify the value and data type of the variable.
The only configurable option on system variables is specifying whether they raise
an event when they change value.
A different set of system variables is available for different container types. For
more information about the system variables used by packages and their
elements, see System Variables.
For more information about real-life use scenarios for variables, see .
Use Variables in Packages
Properties of variables
You can configure user-defined variables by setting the following properties in
either the Variables window or the Proper ties window. Certain properties are
available only in the Properties window.
NOTE
The only configurable option on system variables is specifying whether they raise an
event when they change value.
Description
Specifies the description of the variable.
EvaluateAsExpression
When the property is set to True , the expression provided is used to set the
variable value.
Expression
Specifies the expression that is assigned to the variable.
Name
Specifies the variable name.
Namespace
Integration Services provides two namespaces, User and System . By default,
custom variables are in the User namespace, and system variables are in the
System namespace. You can create additional namespaces for user-defined
variables and change the name of the User namespace, but you cannot change
the name of the System namespace, add variables to the System namespace, or
assign system variables to a different namespace.
RaiseChangedEvent
When the property is set to True , the OnVariableValueChanged event is raised
when the variable changes value.
ReadOnly
When the property is set to False , the variable is read\write.
Scope
NOTE
You can change this property setting only by clicking Move Variable in the Variables
window.
Boolean False
Object System.Object
A variable has options for setting the variable value and the data type of the value.
The two properties must be compatible: for example, the use of a string value
together with an integer data type is not valid.
If the variable is configured to evaluate as an expression, you must provide an
expression. At run time, the expression is evaluated, and the variable is set to the
evaluation result. For example, if a variable uses the expression
DATEPART("month", GETDATE()) the value of the variable is the number equivalent
of the month for the current date. The expression must be a valid expression that
uses the SSIS expression grammar syntax. When an expression is used with
variables, the expression can use literals and the operators and functions that the
expression grammar provides, but the expression cannot reference the columns
from a data flow in the package. The maximum length of an expression is 4000
characters. For more information, see Integration Services (SSIS) Expressions.
ValueType
NOTE
The property value appears in the Data type column in the Variables window.
8. To save the updated package, click Save Selected Items on the File menu.
Add Variable dialog box
Use the Add Variable dialog box to specify the properties of a new variable.
Options
Container
Select a container in the list. The container defines the scope of the variable. The
container can be either the package or an executable in the package.
Name
Type the variable name.
Namespace
Specify the namespace of the variable. By default, user-defined variables are in the
User namespace.
Value type
Select a data type.
Value
Type a value. The value must be compatible with the data type specified in the
Value type option.
Read-only
Select to make the variable read-only.
Delete a variable
1. In SQL Server Data Tools (SSDT), open the Integration Services project that
contains the package you want.
2. In Solution Explorer, right-click the package to open it.
3. On the SSIS menu, click Variables . You can optionally display the
Variables window by mapping the View.Variables command to a key
combination of your choosing on the Keyboard page of the Options
dialog box.
4. Select the variable to delete, and then click Delete Variable .
If you don't see the variable in the Variables window, click Grid Options
and then select Show variables of all scopes .
5. If the Confirm Deletion of Variables dialog box opens, click Yes to
confirm.
6. To save the updated package, click Save Selected Items on the File menu.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Variables window to create and modify user-defined variables and view system variables.
By default, the Variables window is located below the Connection Managers area in the SSIS Designer, in SQL
Server Data Tools (SSDT). If you don't see the Variables window, click Variables on the SSIS menu to display the
window.
You can optionally display the Variables window by mapping the View.Variables command to a key combination of
your choosing on the Keyboard page of the Options dialog box.
NOTE
The values of the Name and Namespace properties must begin with an alphabetic character letter as defined by the
Unicode Standard 2.0, or an underscore (_). Subsequent characters can be letters or numbers as defined in the Unicode
Standard 2.0, or the underscore (_).
Options
Add Variable
Add a user-defined variable.
Move Variable
Click a variable in the list, and then click Move Variable to change the variable scope. In the Select New Scope
dialog box, select the package or a container, task, or event handler in the package, to change the variable scope.
For more information about variable scope, see Integration Services (SSIS) Variables.
Delete Variable
Select a variable from the list, and then click Delete Variable .
Grid Options
Click to open the Variable Grid Options dialog box where you can change the column selection and apply filters
to the Variables window. For more information, see .
Variable Grid O ptions
Name
View the variable name. You can update the name for user-defined variables.
Scope
View the scope of the variable. A variable has either the scope of the entire package, or the scope of a container or
task. The scope of the variable must be sufficient so that the variable is visible to any other tasks or components
that need to read or set its value.
You can change the scope by clicking the variable and then clicking Move Variable in the Variables window.
Data Type
View the data type of the variable. You can select a data type from the list for user-defined variables.
NOTE
If you assign an expression to the variable, you cannot change the data type.
Value
View the variable value. You can update the value for user-defined variables. This value can be a literal or an
expression, and the value can be a multi-line string. To assign an expression to the variable, click the ellipse button
that is next to the Expression column in the Variables window.
Namespace
View the namespace name. User-defined variables are initially created in the User namespace, but you can change
the namespace name in the Namespace field. To display this column, click Grid Options .
Raise Change Event
Indicate whether to raise the OnVariableValueChanged event when a value changes. You can update the value
for user-defined and system variables. By default, the Variables window does not list this column. To display this
column, click Grid Options .
Description
View the variable description. You can change the description for user-defined variables. By default, the Variables
window does not list this column. To display this column, click Grid Options .
Expression
View the expression assigned to the variable. To assign an expression, click the ellipse button.
If you assign an expression to a variable, a special icon marker displays next to the variable. This special icon marker
also displays next to connection managers and tasks that have expressions set on them.
See Also
Integration Services (SSIS) Variables
Use Variables in Packages
Integration Services (SSIS) Expressions
Generating Dump Files for Package Execution
System Variables
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SQL Server Integration Services provides a set of system variables that store information about the running
package and its objects. These variables can be used in expressions and property expressions to customize
packages, containers, tasks, and event handlers.
All variables-system and user-defined- can be used in the parameter bindings that the Execute SQL task uses to
map variables to parameters.
LocaleId Int32 The locale that the container For Loop container
uses.
Foreach Loop container
Sequence container
OnInformation event
handler
OnInformation event
handler
LocaleId Int32 The locale that the event All event handlers
handler uses.
Related Tasks
Map Query Parameters to Variables in an Execute SQL Task
Integration Services (SSIS) Expressions
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An expression is a combination of symbols-identifiers, literals, functions, and operators-that yields a
single data value. Simple expressions can be a single constant, variable, or function. More frequently,
expressions are complex, using multiple operators and functions and referencing multiple columns and
variables. In Integration Services, expressions can be used to define conditions for CASE statements,
create and update values in data columns, assign values to variables, update or populate properties at
run time, define constraints in precedence constraints, and provide the expressions used by the For Loop
container.
Expressions are based on an expression language, and the expression evaluator. The expression evaluator
parses the expression and determines whether the expression follows the rules of the expression
language. For more information about the expression syntax and supported literals and identifiers, see
the following topics.
Syntax (SSIS)
Literals (SSIS)
Identifiers (SSIS)
Expression Builder
The expression builder is a graphical tool for building expressions. It is available in the Conditional Split
Transformation Editor , Derived Column Transformation Editor dialog boxes, and in the
Expression Builder dialog box, is a graphical tool for building expressions.
The expression builder provides folders that contain package-specific elements, and folders that contain
the functions, type casts, and operators that the expression language provides. The package-specific
elements include system variables and user-defined variables. In the Conditional Split
Transformation Editor and Derived Column Transformation Editor dialog boxes, you can also
view data columns. To build expressions for the transformations, you can drag items from the folders to
the Condition or Expression column or you can type the expression directly in the column. The
expression builder automatically adds needed syntax elements such as the @ prefix on variable names.
NOTE
The names of user-defined and system variables are case-sensitive.
Variables have scope, and the Variables folder in the expression builder lists only variables that are in
scope and available to use. For more information, see Integration Services (SSIS) Variables.
Related Tasks
Use an Expression in a Data Flow Component
Related Content
Technical article, SSIS Expression Examples, on social.technet.microsoft.com
See Also
SQL Server Integration Services
Examples of Advanced Integration Services
Expressions
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This section provides examples of advanced expressions that combine multiple operators and functions. If an
expression is used in a precedence constraint or the Conditional Split transformation, it must evaluate to a
Boolean. That restriction, however, does not apply to expressions used in property expressions, variables, the
Derived Column transformation, or the For Loop container.
The following examples use the AdventureWorks and the AdventureWorksDW2012 Microsoft SQL Server
databases. Each example identifies the tables it uses.
Boolean Expressions
This example uses the Product table. The expression evaluates the month entry in the SellStar tDate
column and returns TRUE if the month is June or later.
DATEPART("mm",SellStartDate) > 6
This example uses the Product table. The expression evaluates the rounded result of dividing the ListPrice
column by the StandardCost column, and returns TRUE if the result is greater than 1.5.
This example uses the Product table. The expression returns TRUE if all three operations evaluate to TRUE.
If the Size column and the BikeSize variable have incompatible data types, the expression requires an
explicit cast as shown the second example. The cast to DT_WSTR includes the length of the string.
This example uses the CurrencyRate table. The expression compares values in tables and variables. It
returns TRUE if entries in the FromCurrencyCode or ToCurrencyCode columns are equal to variable
values and if the value in AverageRate is greater that the value in EndOfDayRate .
This example uses the Currency table. The expression returns TRUE if the first character in the Name
column is not a or A.
SUBSTRING(UPPER(Name),1,1) != "A"
The following expression provides the same results, but it is more efficient because only one character is
converted to uppercase.
UPPER(SUBSTRING(Name,1,1)) != "A"
Non-Boolean Expressions
Non-Boolean expressions are used in the Derived Column transformation, property expressions, and the For Loop
container.
This example uses the Contact table. The expression removes leading and trailing spaces from the
FirstName , MiddleName , and LastName columns. It extracts the first letter of the MiddleName column
if it is not null, concatenates the middle initial and the values in FirstName and LastName , and inserts
appropriate spaces between values.
This example uses the Contact table. The expression validates entries in the Salutation column. It returns a
Salutation entry or an empty string.
This example uses the Product table. The expression converts the first character in the Color column to
uppercase and converts remaining characters to lowercase.
UPPER(SUBSTRING(Color,1,1)) + LOWER(SUBSTRING(Color,2,15))
This example uses the Product table. The expression calculates the number of months a product has been
sold and returns the string "Unknown" if either the SellStar tDate or the SellEndDate column contains
NULL.
This example uses the Product table. The expression calculates the markup on the StandardCost column
and rounds the result to a precision of two. The result is presented as a percentage.
Related Tasks
Use an Expression in a Data Flow Component
Related Content
Technical article, SSIS Expression Cheat Sheet, on pragmaticworks.com
Use Property Expressions in Packages
11/2/2020 • 10 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A property expression is an expression that is assigned to a property to enable dynamic update of the
property at run time. For example, a property expression can update the To line that a Send Mail task uses
by inserting an e-mail address that is stored in a variable.
An expression can be added to a package, task, Foreach Loop, For Loop, Sequence, Foreach enumerator,
event handler, a package or project level connection manager, or log provider. Any property of these objects
that is read/write can implement a property expression. Integration Services also supports the use of
property expressions in some custom properties of data flow components. Variables and precedence
constraints do not support property expressions, but they include special properties in which you can use
expressions.
Property expressions can be updated in different ways:
User-defined variables can be included in package configurations and then updated when the
package is deployed. At run time, the property expression is evaluated using the updated variable
value.
System variables that are included in expressions are updated at run time, which changes the results
of the property evaluation.
Date and time functions are evaluated at run time and provide the updated values to property
expressions.
Variables in expressions can be updated by the scripts that the Script task and the Script component
run.
The expressions are built using the Microsoft Integration Services expression language. The expressions can
use system or user-defined variables, together with the operators, functions, and type casts that the
expression language provides.
NOTE
The names of user-defined and system variables are case-sensitive.
In the Proper ties window and the Expressions page, click the browse button (...) at the Expressions
collection level to open the Proper ty Expressions Editor dialog box. The Property Expressions Editor
allows you to map a property to an expression and to type a property expression. If you want to use the
graphical expression tools to create and then validate the expression, click the browse button (...) at the
expression level to open the Expression Builder dialog box, and then create or modify and optionally
validate the expression.
You can also open the Expression Builder dialog box from the Proper ty Expressions Editor dialog box.
To work with property expressions
Add or Change a Property Expression
Setting Property Expressions of Data Flow Components
If you construct a package in SQL Server Data Tools (SSDT), the properties of data flow components that
support property expressions are exposed on the Data Flow task to which they belong. To add, change, and
remove the property expressions of data flow components, you right-click the Data Flow task for the data
flow to which the data flow components belong and click Proper ties . The Properties window lists the
properties of data flow components with which you can use property expressions. For example, to create or
modify a property expression for the SamplingValue property of a Row Sampling transformation in a data
flow named SampleCustomer, right-click the Data Flow task for the data flow to which the Row Sampling
transformation belongs and click Proper ties . The SamplingValue property is listed in the Properties
window, and has the format [SampleCustomer].[SamplingValue].
In the Properties window, you add, change, and remove property expressions for data flow components in
the same way as property expressions for other Integration Services object types. The Properties window
also provides access to the various dialog boxes and builders that you use to add, change, or remove
property expressions for data flow components. For more information about the properties of data flow
components that can be updated by property expressions, see Transformation Custom Properties.
NOTE
You cannot use the Set option of the dtexec utility to populate a property expression.
The following table summarizes when property expressions of Integration Services are evaluated and
loaded.
Package, Foreach loop, For Loop, Sequence, tasks, and After loading configurations
data flow components
Before validation
Before execution
O B JEC T T Y P E LO A D A N D EVA L UAT E
Before validation
Before execution
Before validation
Before execution
Before validation
Before execution
If the package name is EmailRowCountPP, was run on 3/4/2005, and the duration of the run was 9 seconds,
the expression evaluates to the following string.
PExpression-->Package: (EmailRowCountPP) Started:3/4/2005 11:06:18 AM Duration:9 seconds.
Property Expression for the Message of an E-mail Message
The following property expression can be used to set the MessageSource property of a Send Mail task. The
expression uses a combination of string literals, user-defined variables, and the concatenation (+) operator.
The user-defined variables are named nasdaqrawrows , nyserawrows , and amexrawrows . The string "\n"
indicates a carriage return.
"Rows Processed: " + "\n" +" NASDAQ: " + (dt_wstr,9)@[nasdaqrawrows] + "\n" + " NYSE: " +
(dt_wstr,9)@[nyserawrows] + "\n" + " Amex: " + (dt_wstr,9)@[amexrawrows]
If nasdaqrawrows is 7058, nyserawrows is 3528, and amexrawrows is 1102, the expression evaluates to the
following string.
Rows Processed:
NASDAQ: 7058
NYSE: 3528
AMEX: 1102
Property Expression for the Executable Property of an Execute Process Task
The following property expression can be used to set the Executable property of an Execute Process task.
The expression uses a combination of string literals, operators, and functions. The expression uses the
DATEPART and GETDATE functions and the conditional operator.
DATEPART("weekday", GETDATE()) ==2?"notepad.exe":"mspaint.exe"
If it is the second day in the week, the Execute Process task runs notepad.exe, otherwise the task runs
mspaint.exe.
Property Expression for the ConnectionString Property of a Flat File Connection Manager
The following property expression can be used to set the ConnectionString property of a Flat File
connection manager. The expression uses a single user-defined variable, myfilenamefull , which contains the
path to a text file.
@[User::myfilenamefull]
NOTE
Property expressions for connection managers can be accessed only by using the Properties window. To view the
properties for a connection manager, you must select the connection manager in the Connection Managers area
of SSIS Designer when the Properties window is open, or right-click the connection manager and select Proper ties .
Property Expression for the ConfigString Property of a Text File Log Provider
The following property expression can be used to set the ConfigString property of a Text File log provider.
The expression uses a single user-defined variable, varConfigString , which contains the name of the File
connection manager to use. The File connection manager specifies the path of the text file to which log
entries are written.
@[User::varConfigString]
NOTE
Property expressions for log providers can be accessed only by using the Properties window. To view the properties
of a log provider, you must select the log provider on the Package Explorer tab of SSIS Designer when the
Properties window is open, or right-click the log provider in Package Explorer and click Proper ties .
External Resources
Expression and Configuration Highlighter (CodePlex Project)
Technical article, SSIS Expression Examples, on social.technet.microsoft.com
See Also
Use Variables in Packages
Enumerated Constants in Property Expressions
11/2/2020 • 9 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
If property expressions include values from an enumerator member list, the expression must use the numeric value
of the enumerator member instead of the friendly name of the member. For example, if an expression sets the
LoggingMode property then you must use the numeric value 2 instead of the friendly name Disabled.
This topic lists only the numeric values equivalent to friendly names of enumerators whose members are
commonly used in property expressions. The Integration Services object model includes many additional
enumerators that you use when you program the object model to build packages programmatically or code
custom package elements such as tasks and data flow components.
In addition to the custom properties for packages and package objects, the Properties window in SQL Server Data
Tools (SSDT) includes a set of properties that are available to packages, tasks, and the Foreach Loop, For Loop, and
Sequence containers. The common properties that are set by values from enumerators-ForceExecutionResult ,
LoggingMode , IsolationLevel , and Transaction Option -are listed in Common Properties section.
The following sections provide information about enumerated constants:
Package
Foreach Loop Enumerators
Tasks
Maintenance Plan Tasks
Common Properties
Package
The following tables lists the friendly names and the numeric value equivalents for properties of packages that you
set by using values from an enumerator.
PackageType property-Set by using values from the DTSPackageType enumeration.
Default 0
DTSWizard 1
DTSDesigner 2
SQLReplication 3
DTSDesigner100 5
SQLDBMaint 6
Never 0
IfExists 1
Always 2
Default 0
AboveNormal 1
Normal 2
BelowNormal 3
Idle 4
DontSaveSensitive 0
EncryptSensitiveWithUserKey 1
EncryptSensitiveWithPassword 2
EncryptAllWithPassword 3
EncryptAllWithUserKey 4
ServerStorage 5
Precedence Constraints
EvalOp property-Set by using values from the DTSPrecedenceEvalOp enumeration.
Expression 1
Constraint 2
ExpressionAndConstraint 3
ExpressionOrConstraint 4
Success 0
Failure 1
Completion 2
Canceled 3
EnumerateTables 0
EnumerateAllRows 1
EnumerateRowsInFirstTable 2
FileConnection 0
Variable 1
DirectInput 2
Navigator 0
Node 1
NodeText 2
ElementCollection 3
Navigator 0
Node 1
NodeText 2
Tasks
Integration Services includes numerous tasks with properties that can be set by property expressions.
Analysis Services Execute DDL Task
SourceType property-Set by using values from the DDLSourceType enumeration.
DirectInput 0
FileConnection 1
Variable 2
DTSBulkInsert_DataFileType_Char 0
DTSBulkInsert_DataFileType_Native 1
DTSBulkInsert_DataFileType_WideChar 2
DTSBulkInsert_DataFileType_WideNative 3
ResultSetType_None 1
ResultSetType_SingleRow 2
ResultSetType_Rowset 3
ResultSetType_XML 4
DirectInput 1
FileConnection 2
Variable 3
CopyFile 0
MoveFile 1
DeleteFile 2
RenameFile 3
SetAttributes 4
CreateDirectory 5
CopyDirectory 6
MoveDirectory 7
DeleteDirectory 8
DeleteDirectoryContent 9
Normal 0
Archive 1
Hidden 2
ReadOnly 4
System 8
FTP Task
Operation property-Set by using values from the DTSFTPOp enumeration.
F RIEN DLY N A M E IN DT SF T P O P N UM ERIC VA L UE
Send 0
Receive 1
DeleteLocal 2
DeleteRemote 3
MakeDirLocal 4
MakeDirRemote 5
RemoveDirLocal 6
RemoveDirRemote 7
DTSMQMessageType_String 0
DTSMQMessageType_DataFile 1
DTSMQMessageType_Variables 2
DTSMQMessagType_StringMessageToVariable 3
DTSMQStringMessageCompare_None 0
DTSMQStringMessageCompare_Exact 1
DTSMQStringMessageCompare_IgnoreCase 2
DTSMQStringMessageCompare_Contains 3
DTSMQType_Sender 0
DTSMQType_Receiver 1
DirectInput 0
FileConnection 1
Variable 2
High 1
Normal 3
Low 5
Copy 0
Move 1
DatabaseOffline 0
DatabaseOnline 1
FailTask 0
Overwrite 1
Skip 2
FailTask 0
Overwrite 1
Skip 2
FailTask 0
Overwrite 1
Skip 2
AllLogins 0
SelectedLogins 1
AllLoginsFromSelectedDatabases 2
FailTask 0
Overwrite 1
Skip 2
Replace 0
Append 1
File 0
Variable 1
OverwriteDestination 0
AppendToDestination 1
KeepOriginal 2
DataTable 0
PropertyValue 1
PropertyNameAndValue 2
FileConnection 0
Variable 1
WqlQuer ySourceType property-Set by using values from the Quer ySourceType enumeration.
FileConnection 0
DirectInput 1
Variable 2
WMI Event Watcher ActionAtEvent property-Set by using values from the ActionAtEvent enumeration.
LogTheEventAndFireDTSEvent 0
LogTheEvent 1
ActionAtTimeout property-Set by using values from the ActionAtTimeout enumeration.
LogTimeoutAndFireDTSEvent 0
LogTimeout 1
ReturnWithSuccess 0
ReturnWithFailure 1
WatchfortheEventAgain 2
ReturnWithSuccess 0
ReturnWithFailure 1
WatchfortheEventAgain 2
WqlQuer ySourceType property-Set by using values from the Quer ySourceType enumeration.
FileConnection 0
DirectInput 1
Variable 2
XML Task
OperationType property-Set by using values from the DTSXMLOperation enumeration.
Validate 0
XSLT 1
XPATH 2
Merge 3
Diff 4
F RIEN DLY N A M E IN DT SXM LO P ERAT IO N N UM ERIC VA L UE
Patch 5
FileConnection 0
Variable 1
DirectInput 2
FileConnection 0
Variable 1
DTD 0
XSD 1
Evaluation 0
Values 1
NodeList 2
DiffOptions property-Set by using values from the DTSXMLDiffOptions enumeration. The options in this
enumerator are not mutually exclusive. To use multiple options, provide a comma-separated list of the options to
apply.
None 0
IgnoreChildOrder 1
IgnoreComments 2
F RIEN DLY N A M E IN DT SXM L DIF F O P T IO N S N UM ERIC VA L UE
IgnorePI 4
IgnoreWhitespace 8
IgnoreNamespaces 16
IgnorePrefixes 32
IgnoreXmlDecl 64
IgnoreDtd 128
Auto 0
Fast 1
Precise 2
None 0
All 1
System 2
User 3
Specific 4
None 0
All 1
Specific 2
Table 0
View 1
TableView 2
Auto 0
Manual 1
Append 0
Overwrite 1
BackupAction property-Set by using values from the BackupTaskType enumeration. This property works with
the BackupIsIncremental property to define the type of backup that the task performs.
Database 0
Files 1
Log 2
BackupDevice property-Set by using values from the SQL Server Management Objects (SMO) DeviceType
enumeration.
LogicalDevice 0
F RIEN DLY N A M E IN DEVIC ET Y P E N UM ERIC VA L UE
Tape 1
File 2
Pipe 3
VirtualDevice 4
FileBackup 0
FileReport 1
Day 0
Week 1
Month 2
Year 3
Column 1
Index 2
All 3
Common Properties
Packages, tasks, and the Foreach Loop, For Loop, and Sequence containers can use the following enumerations to
set the specified properties.
ForceExecutionResult property-Set by using values from the DTSForcedExecResult enumeration.
F RIEN DLY N A M E IN DT SF O RC EDEXEC RESULT N UM ERIC VA L UE
None -1
Success 0
Failure 1
Completion 2
IsolationLevel property-Set by the .NET Framework IsolationLevel enumeration. For more information, see the
.NET Framework Class Library in the MSDN Library.
LoggingMode property-Set by using values from the DTSLoggingMode enumeration.
UseParentSetting 0
Enabled 1
Disabled 2
NotSupported 0
Supported 1
Required 2
Related Tasks
Add or Change a Property Expression
See Also
Use Property Expressions in Packages
Integration Services (SSIS) Packages
Integration Services Containers
Integration Services Tasks
Precedence Constraints
Add or Change a Property Expression
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can create property expressions for packages, tasks, Foreach Loop containers, For Loop containers, Sequence
containers, event handlers, package and project level connection managers, and log providers.
To create or change property expressions, you can use either the Proper ty Expressions Editor or Expression
Builder . The Proper ty Expressions Editor can be accessed from either the custom editors that are available
for tasks and containers, or from the Proper ties window. Expression Builder can be accessed from inside the
Proper ty Expressions Editor . While you can write expressions in either the Proper ty Expressions Editor or
Expression Builder , Expression Builder provides a graphical set of tools that makes it simple to build
complex expressions.
To learn more about the syntax, operators, and functions that Integration Services provides, see Operators (SSIS
Expression) and Functions (SSIS Expression). The topic for each operator or function includes examples of using
that operator or function in an expression. For examples of more complex expressions, see Use Property
Expressions in Packages.
To create or change a property expression
1. In SQL Server Data Tools (SSDT), open the project that contains the Integration Services package you want.
2. In Solution Explorer, double-click the package to open it, and then do one of the following:
If the item is a task or a container, double-click the item, and then click Expressions in the editor.
Right-click the item and then click Proper ties .
3. Click in the Expressions box and then click the ellipsis (...).
4. In the Proper ty Expressions Editor , select a property in the Proper ty list, and then do one of the
following:
Type or change the property expression directly in the Expression column, and then click OK .
-or-
Click the ellipsis (...) in the expression row of the property to open the Expression Builder .
5. (Optional) In the Expression Builder , do any of the following tasks:
To access system and user-defined variables, expand Variables .
To access the functions, the casts, and the operators that the SSIS expression language provides,
expand Mathematical Functions , String Functions , Date/Time Functions , NULL Functions ,
Type Casts , and Operators .
To build or change an expression in the Expression Builder , drag variables, columns, functions,
operators, and casts to the Expression box, or type the expression in the box.
To view the evaluation result of the expression, click Evaluate Expression in the Expression
Builder .
If the expression is not valid, an alert appears that describes the syntax errors in the expression.
NOTE
Evaluating an expression does not assign the evaluation result to the property.
6. Click OK .
See Also
Integration Services (SSIS) Expressions
Use Property Expressions in Packages
Integration Services (SSIS) Packages
Integration Services Containers
Integration Services Tasks
Integration Services (SSIS) Event Handlers
Integration Services (SSIS) Connections
Integration Services (SSIS) Logging
Expressions Page
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Expressions page to edit property expressions and to access the Proper ty Expressions Editor and
Proper ty Expression Builder dialog boxes.
Property expressions update the values of properties when the package is run. Property expressions can be
used with the properties of packages, tasks, containers, connection managers, as well as some data flow
components. The expressions are evaluated and their results are used instead of the values to which you set
the properties when you configured the package and package objects. The expressions can include variables
and the functions and operators that the expression language provides. For example, you can generate the
subject line for the Send Mail task by concatenating the value of a variable that contains the string "Weather
forecast for " and the return results of the GETDATE() function to make the string "Weather forecast for
4/5/2006".
To learn more about writing expressions and using property expressions, see Integration Services (SSIS)
Expressions and Use Property Expressions in Packages.
Options
Expressions (...)
Click the ellipsis to open the Proper ty Expressions Editor dialog box. For more information, see Property
Expressions Editor.
<proper ty name>
Click the ellipsis to open the Expression Builder dialog box. For more information, see Expression Builder.
See Also
Integration Services (SSIS) Variables
System Variables
Integration Services (SSIS) Expressions
Property Expressions Editor
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Proper ty Expressions Editor dialog box to create, edit, or delete the property expressions that update
property values.
Options
Proper ty
Select an object property from the list.
Expression
Type a literal or an expression to update the value of the property.
NOTE
The names of user-defined and system variables are case-sensitive.
Expression (...)
Click the ellipsis to open the Expression Builder dialog box. For more information, see Expression Builder.
Delete
Select a property, and then click Delete .
See Also
Expressions Page
Integration Services (SSIS) Variables
System Variables
Integration Services (SSIS) Expressions
Use Property Expressions in Packages
Expression Builder
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Expression Builder dialog box to create and edit a property expression or write the expression that sets
the value of a variable using a graphical user interface that lists variables and provides a built-in reference to the
functions, type casts, and operators that the Integration Services expression language includes.
A property expression is an expression that is assigned to a property. When the expression is evaluated, the
property is dynamically updated to use the evaluation result of the expression. Likewise, an expression that is
used in a variable enables the variable value to be updated with the evaluation result of the expression.
There are many ways to use expressions:
Tasks Update the To line that a Send Mail task uses by inserting an e-mail address that is stored in a
variable; or update the Subject line by concatenating a string such as "Sales for: " and the current date
returned by the GETDATE function.
Variables Set the value of a variable to the current month by using an expression like
DATEPART("mm",GETDATE()) ; or set the value of a string by concatenating the string literal and the current
date by using the expression "Today's date is " + (DT_WSTR,30)(GETDATE()) .
Connection Managers Set the code page of a Flat File connection manager by using a variable that
contains a different code page identifier; or specify the number of rows in the data file to skip by entering a
positive integer like 3 in the expression.
To learn more about property expressions and writing expressions, see Use Property Expressions in Packages and
Integration Services (SSIS) Expressions.
Options
T ERM DEF IN IT IO N
Mathematical Functions Expand the folders and drag functions, type casts, and
operators to the Expression box.
String Functions
Date/Time Functions
NULL Functions
Type Casts
Operators
See Also
Expressions Page
Property Expressions Editor
Integration Services (SSIS) Variables
System Variables
Integration Services Data Types in Expressions
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The expression evaluator uses Integration Services data types. When data first enters a data flow in an
Integration Services package, the data flow engine converts all column data to an Integration Services data
type, and the column data that an expression uses already has an Integration Services data type. Expressions
used in the Conditional Split and the Derived Column transformations can reference columns because they are
part of a data flow that includes column data.
Variables
Expressions can also use variables. Variables have a Variant data type and the expression evaluator converts the
data type of a variable from a Variant subtype to an Integration Services data type before it evaluates the
expression. Variables can use only a subset of the Integration Services data types. For example, a variable
cannot use a Binary Large Object Block (BLOB) data type.
For more information about Integration Services data types and the mapping of Variant data types to
Integration Services data types, see Integration Services Data Types.
Literals
In addition, expressions can include string, Boolean, and numeric literals. For more information about
converting numeric literals to numeric Integration Services data types, see Literals (SSIS).
Strings
You can use either DT_STR or DT_WSTR as the return type of an expression. Inside an expression, however, only
DT_WSTR is supported, and DT_STR values are converted to DT_WSTR values. This behavior has several
implications when you're writing an expression.
Inside an expression, use NULL(DT_WSTR, ...) instead of NULL(DT_STR, ...). For more info about this
function, see NULL (SSIS Expression).
Inside an expression, you can only use the CAST function to cast a value to the DT_STR type at the root of
the expression - that is, when you are returning the final result of the expression. Otherwise, use the
DT_WSTR type within in expression.
Consider the expressions in the following screen shot.
1. The first expression runs without error because the NULL(DT_STR, ...) function is at the root level of the
expression.
2. The second expression runs without error because it uses NULL(DT_WSTR, ...).
3. The third expression raises an error because it uses NULL(DT_STR, ...) inside the expression.
4. The fourth expression runs without error because it casts the result of NULL(DT_STR, ...) inside the
expression.
The expression evaluator handles this cast intelligently and casts to DT_WSTR, not to DT_STR, because it
recognizes that the operation is not at the root level of the expression.
The following examples demonstrate the effects of casting.
1. In the first expression, the cast is not at the root level of the expression. The expression evaluator handles
this cast intelligently and casts to DT_WSTR, not to DT_STR. The expression returns DT_WSTR.
2. In the second expression, the cast is at the root level of the expression. The expression returns DT_STR.
The intersection of a signed and an unsigned integer is a signed integer that is potentially larger than either
argument.
Operators compare strings, dates, Booleans, and other data types. Before an operator compares two values, the
expression evaluator performs certain implicit conversions. The expression evaluator always converts string
literals to the DT_WSTR data type and converts Boolean literals to the DT_BOOL data type. The expression
evaluator interprets all values enclosed in quotation marks as strings. Numeric literals are converted to one of
the numeric Integration Services data types.
NOTE
Boolean values are logical values, not numbers. Although Boolean values may be displayed as numbers in some
environments, they are not stored as numbers, and various programming languages represent Boolean values as
numeric values differently, as do the .NET Framework methods.
For example, the conversion functions available in Visual Basic convert True to -1; however, the
System.Conver t.ToInt32 method in the .NET Framework converts True to +1. The Integration Services Expression
Language converts True to -1.
To avoid errors or unexpected results, you should not write code that relies on particular numeric values for True and
False . Wherever possible, you should restrict usage of Boolean variables to the logical values for which they are
designed.
Arguments passed to mathematical functions must evaluate to a numeric data type. Depending on the
function or operation, a specific numeric data type may be required. For example, the HEX function
requires a signed or unsigned integer.
Arguments passed to string functions must evaluate to a character data type: DT_STR or DT_WSTR. For
example, UPPER("flower"). Some string functions, such as SUBSTRING, require additional integer
arguments for the start position and the length of the string.
Arguments passed to date and time functions must evaluate to a valid date. For example,
DAY(GETDATE()). Some functions, such as DATEADD, require an additional integer argument for the
number of days the function adds to a date.
Operations that combine an unsigned eight-byte integer and a signed integer require an explicit cast to clarify
the result format. For more information, see Cast (SSIS Expression).
Results of many operations and functions have predetermined data types. This can be the data type of the
argument or the data type to which the expression evaluator casts the result. For example, the result of a logical
OR operator (||) is always a Boolean, the result of the ABS function is the numeric data type of the argument,
and the result of multiplication is the smallest numeric data type that can hold the result without loss. For more
information about the data types of results, see Operators (SSIS Expression) and Functions (SSIS Expression).
Related Tasks
Use an Expression in a Data Flow Component
Related Content
Technical article, SSIS Expression Cheat Sheet, on pragmaticworks.com
Technical article, SSIS Expression Examples, on social.technet.microsoft.com
Data Truncation (SSIS)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Converting values from one data type to another may cause values to be truncated.
Truncation can occur when:
Translating string data from a DT_WSTR to a DT_STR with the same length if the original string contains
double-byte characters.
Casting an integer from a DT_I4 to a DT_I2 significant digits can be lost.
Casting an unsigned integer to a signed integer significant digits can be lost.
Casting a real number from a DT_R8 to a DT_R4 insignificant digits can be lost
Casting an integer from a DT_I4 to a DT_R4 insignificant digits can be lost.
The expression evaluator identifies explicit casts that may cause truncation and issues a warning when the
expression is parsed. For example, the expression evaluator warns you if a 30-character string is cast into a 20-
character string.
However, truncation is not checked at run time. At runtime data is truncated without warning. Most data adapters
and transformations support error outputs that can handle the disposition of error rows.
For more information about handling truncation of data, see Error Handling in Data
String Padding (SSIS)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The expression evaluator does not check if a string contains leading and trailing spaces, and it does not pad strings
to make them the same length before it compares them. If expressions requires string padding, you can use the +
operator to concatenate column values and blank strings. For more information, see + (Concatenate) (SSIS
Expression).
On the other hand, if you want to remove spaces, the expression evaluator provides the LTRIM, RTRIM, and TRIM
functions, which remove leading or trailing spaces, or both. For more information, see LTRIM (SSIS Expression),
RTRIM (SSIS Expression), and TRIM (SSIS Expression).
NOTE
The LEN function includes leading and trailing blanks in its count.
Related Content
Technical article, SSIS Expression Cheat Sheet, on pragmaticworks.com
Syntax (SSIS)
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Integration Services expression syntax is similar to the syntax that the C and C# languages use. Expressions
include elements such as identifiers (columns and variables), literals, operators, and functions. This topic
summarizes the unique requirements of the expression evaluator syntax as they apply to different expression
elements.
NOTE
In previous releases of Integration Services, there was a 4000-character limit on the evaluation result of an expression when
the result had the Integration Services data type DT_WSTR or DT_STR. This limit has been removed.
For sample expressions that use specific operators and functions, see the topic about each operator and function in
the topics: Operators (SSIS Expression) and Functions (SSIS Expression).
For sample expressions that use multiple operators and functions as well as identifiers and literals, see Examples of
Advanced Integration Services Expressions.
For sample expressions to use in property expressions, see Use Property Expressions in Packages.
Identifiers
Expressions can include column and variable identifiers. The columns can originate in the data source or can be
created by transformations in the data flow. Expressions can use lineage identifiers to refer to columns. Lineage
identifiers are numbers that uniquely identify package elements. Lineage identifiers, referenced in an expression,
must include the pound (#) prefix. For example, the lineage identifier 138 is referenced using #138.
Expressions can include the system variables that SSIS provides and custom variables. Variables, when referenced
in an expression, must include the @ prefix. For example, the Counter variable is referenced using @Counter. The
@ character is not part of the variable name; it only indicates to the expression evaluator that the identifier is a
variable. For more information, see Identifiers (SSIS).
Literals
Expressions can include numeric, string, and Boolean literals. String literals used in expressions must be enclosed in
quotation marks. Numeric and Boolean literals do not take quotation marks. The expression language includes
escape sequences for characters that are frequently escaped. For more information, see Literals (SSIS).
Operators
The expression evaluator provides a set of operators that provides functionality similar to the set of operators in
languages such as Transact-SQL, C++, and C#. However, the expression language includes additional operators and
uses different symbols than those you may be familiar with. For more information, see Operators (SSIS
Expression).
Namespace Resolution Operator
Expressions use the namespace resolution operator (::) to disambiguate variables that have the same name. By
using the namespace resolution operator, you can qualify the variable with its namespace, which makes it possible
to use multiple variables with the same name in a package.
Cast Operator
The cast operator converts expression results, column values, variable values, and constants from one data type to
another. The cast operator provided by the expression language is similar to the one provided by the C and C#
languages. In Transact-SQL, the CAST and CONVERT functions provide this functionality. The syntax of the cast
operator is different from ones used by CAST and CONVERT in the following ways:
It can use an expression as an argument.
Its syntax does not include the CAST keyword.
Its syntax does not include the AS keyword.
Co n di t i o n al O per at o r
The conditional operator returns one of two expressions, based on the evaluation of a Boolean expression. The
conditional operator provided by the expression language is similar to the one provided by the C and C#
languages. In multidimensional expressions (MDX), the IIF function provides similar functionality.
L o g i c a l O p e ra t o rs
The expression language supports the ! character for the logical NOT operator. In Transact-SQL, the ! operator is
built into the set of relational operators. For example, Transact-SQL provides the > and the !> operators. The SSIS
expression language does not support the combination of the ! operator and other operators. For example, it is not
valid to combine ! and > into !>. However, the expression language does support a built-in != combination of
characters for the not-equal-to comparison.
E q u a l i t y O p e ra t o rs
The expression evaluator grammar provides the == equality operator. This operator is the equivalent of the =
operator in Transact-SQL and the == operator in C#.
Functions
The expression language includes date and time functions, mathematical functions, and string functions that are
similar to Transact-SQL functions and C# methods.
A few functions have the same names as Transact-SQL functions, but have subtly different functionality in the
expression evaluator.
In Transact-SQL, the ISNULL function replaces null values with a specified value, whereas the expression
evaluator ISNULL function returns a Boolean based on whether an expression is null.
In Transact-SQL, the ROUND function includes an option to truncate the result set, whereas the expression
evaluator ROUND function does not.
For more information, see Functions (SSIS Expression).
Related Tasks
Use an Expression in a Data Flow Component
Related Content
Technical article, SSIS Expression Cheat Sheet, on pragmaticworks.com
Technical article, SSIS Expression Examples, on social.technet.microsoft.com
Identifiers (SSIS)
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In expressions, identifiers are columns and variables that are available to the operation. Expressions can use
regular and qualified identifiers.
Regular Identifiers
A regular identifier is an identifier that needs no additional qualifiers. For example, MiddleName , a column in the
Contacts table of the AdventureWorks database, is a regular identifier.
The naming of regular identifiers must follow these rules:
The first character of the name must be a letter as defined by the Unicode Standard 2.0, or an underscore
(_).
Subsequent characters can be letters or numbers as defined in the Unicode Standard 2.0, the underscore (_),
@, $, and # characters.
IMPORTANT
Embedded spaces and special characters, other than the ones listed, are not valid in regular identifiers. In order to use
spaces and special characters, you must use a qualified identifier instead of a regular identifier.
Qualified Identifiers
A qualified identifier is an identifier that is delimited by brackets. An identifier may require a delimiter because the
name of the identifier includes spaces, or because the identifier name does not begin with either a letter or the
underscore character. For example, the column name Middle Name must be qualified by brackets and written as
[Middle Name] in an expression.
If the name of the identifier includes spaces, or if the name is not a valid regular identifier name, the identifier
must be qualified. The expression evaluator uses the opening and closing ([]) brackets to qualify identifiers. The
brackets are put in the first and the last position of the string. For example, the identifier 5$> becomes [5$>].
Brackets can be used with column names, variable names, and function names.
If you build expressions using the SSIS Designer dialog boxes, regular identifiers are automatically enclosed in
brackets. However, brackets are required only if the name include invalid characters. For example, the column
named MiddleName is valid without brackets.
You cannot reference column names that include brackets in expressions. For example, the column name
Column[1] cannot be used in an expression. To use the column in an expression it must be renamed to a name
without brackets.
Lineage Identifiers
Expressions can use lineage identifiers to refer to columns. The lineage identifiers are assigned automatically when
you first create the package. You can view the lineage identifier for a column on the Column Proper ties tab of
the Advanced Editor dialog box in the SSIS Designer.
If you refer to a column using its lineage identifier, the identifier must include the pound (#) character prefix. For
example, a column with the lineage identifier 147 must be referenced as #147.
If an expression parses successfully, the expression evaluator replaces the lineage identifiers with column names in
the dialog box.
[MySo urce].Age
MySource.[#Age]
The source component and the column names contain invalid characters.
[MySource?].[#Age]
IMPORTANT
If both elements in dotted notation are enclosed in one pair of brackets, the expression evaluator interprets the pair as a
single identifier, not a source-column combination.
Variables in Expressions
Variables, when referenced in expressions, must include the @ prefix. For example, the Counter variable is
referenced by using @Counter. The @ character is not part of the variable name; it only identifies the variable to
the expression evaluator. If you build expressions by using the dialog boxes that SSIS Designer provides, the @
character is automatically added to the variable name. It is not valid to include spaces between the @ character
and the variable name.
Variable names follow the same rules as those for other regular identifiers:
The first character of the name must be a letter as defined by the Unicode Standard 2.0, or an underscore
(_).
Subsequent characters can be letters or numbers as defined in the Unicode Standard 2.0, the underscore (_),
@, $, and # characters.
If a variable name contains characters other than those listed, the variable must be enclosed in brackets. For
example, variable names with spaces must be enclosed in brackets. The opening bracket follows the @ character.
For example, the My Name variable is referenced as @[My Name]. It is not valid to include spaces between the
variable name and the brackets.
NOTE
The names of user-defined and system variables are case-sensitive.
IMPORTANT
You must enclose the combination of namespace and qualified variable name in brackets for the expression evaluator to
recognize the variable.
If the value of Count in the User namespace is 10 and the value of Count in MyNamespace is 2, the expression
evaluates to true because the expression evaluator recognizes two different variables.
If variable names are not unique, no error occurs. Instead, the expression evaluator uses only one instance of the
variable to evaluate the expression and returns an incorrect result. For example, the following expression was
intended to compare the values (10 and 2) for two separate Count variables but the expression evaluates to false
because the expression evaluator uses the same instance of the Count variable two times.
Related Content
Technical article, SSIS Expression Cheat Sheet, on pragmaticworks.com
Numeric, string, and Boolean literals
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Expressions can include numeric, string, and Boolean literals. The expression evaluator supports a variety of
numeric literals such as integers, decimals, and floating-point constants. The expression evaluator also supports
the long and float suffixes, which specify how the expression evaluator handles values, and scientific notation in
numeric literals.
Numeric Literals
The expression evaluator supports integral and nonintegral numeric data types. It also supports lineage identifiers
(the unique numeric identifiers for package elements). Lineage identifiers are numbers, but they cannot be used in
mathematical operations.
The expression evaluator supports suffixes, which you can use to indicate how the expression evaluator treats the
numeric literal. For example, you can indicate the integer 37 be treated as a long integer data type by writing 37L
or 37l.
The following table lists suffixes for numeric literals.
The following table lists numeric expression elements and their regular expressions.
The following table describes valid numeric literals using the regular expression language.
REGUL A R EXP RESSIO N DESC RIP T IO N
{D}+{IS} An integral numeric literal with at least one digit (D) and,
optionally, the long and/or the unsigned suffix (IS). Examples:
457, 785u, 986L, and 7945ul.
For more information about the data types the expression evaluator uses, see Integration Services Data Types.
Expressions can include numeric literals with different data types. When the expression evaluator evaluates these
expressions, it converts the data to compatible types. For more information, see Integration Services Data Types in
Expressions.
However, conversion between some data types requires an explicit cast. The expression evaluator provides the cast
operator for performing explicit data type conversion. For more information, see Cast (SSIS Expression).
Mapping Numeric Literals to Integration Services Data Types
The expression evaluator performs the following conversions when evaluating numeric literals:
An integral numeric literal is mapped to an integer data type as follows.
SUF F IX RESULT T Y P E
None DT_I4
SUF F IX RESULT T Y P E
U DT_UI4
L DT_I8
UL DT_UI8
IMPORTANT!! If the long (L or l) suffix is absent, the expression evaluator maps signed values to the
DT_I4 data type and unsigned values to the DT_UI4 data type even though the value overflows the data
type.
A numeric literal that includes an exponent is converted to either the DT_R4 or the DT_R8 data type. If the
expression includes the long suffix, it is converted to DT_R8; if it includes the float suffix, it is converted to
the DT_R4 data type.
If a nonintegral numeric literal includes F or f, it maps to the DT_R4 data type. If it includes L or l and the
number is an integer, it maps to the DT_I8 data type. If it is a real number, it maps to the DT_R8 data type. If it
includes the long suffix, it is converted to the DT_R8 data type.
A nonintegral numeric literal with precision and scale maps to the DT_NUMERIC data type.
String Literals
String literals must be enclosed in quotation marks. The expression language provides a set of escape sequences
for commonly escaped characters such as nonprinting characters and quotation marks.
A string literal consists of zero or more characters surrounded by quotation marks. If a string contains quotation
marks, these must be escaped in order for the expression to parse. Any two-byte character except \x0000 is
permitted in a string, because the \x0000 character is the null terminator of a string.
Strings can include other characters that require an escape sequence. The following table lists escape sequences
for string literals.
\a Alert
\b Backspace
\f Form feed
\n New line
\r Carriage return
\t Horizontal tab
\v Vertical tab
\|Backslash
ESC A P E SEQ UEN C E DESC RIP T IO N
Boolean Literals
The expression evaluator supports the usual Boolean literals: True and False . The expression evaluator is not case-
sensitive and any combination of uppercase and lowercase letters are permitted. For example, TRUE works just as
well as True.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This section describes the operators the expression language provides and the operator precedence and
associativity that the expression evaluator uses.
The following table lists topics about operators in this section.
Cast (SSIS Expression) Converts an expression from one data type to a different
data type.
- (Subtract) (SSIS Expression) Subtracts the second numeric expression from the first one.
/ (Divide) (SSIS Expression) Divides the first numeric expression by the second one.
% (Modulo) (SSIS Expression) Provides the integer remainder after dividing the first
numeric expression by the second one.
| (Bitwise Inclusive OR) (SSIS Expression) Performs a bitwise OR operation of two integer values.
^ (Bitwise Exclusive OR) (SSIS Expression) Performs a bitwise exclusive OR operation of two integer
values.
& (Bitwise AND) (SSIS Expression) Performs a bitwise AND operation of two integer values.
> (Greater Than) (SSIS Expression) Performs a comparison to determine if the first expression
is greater than the second one.
< (Less Than) (SSIS Expression) Performs a comparison to determine if the first expression
is less than the second one.
>= (Greater Than or Equal To) (SSIS Expression) Performs a comparison to determine if the first expression
is greater than or equal to the second one.
<= (Less Than or Equal To) (SSIS Expression) Performs a comparison to determine if the first expression
is less than or equal to the second one.
? : (Conditional) (SSIS Expression) Returns one of two expressions based on the evaluation of
a Boolean expression.
For information about the placement of each operator in the precedence hierarchy, see Operator Precedence
and Associativity.
See Also
Functions (SSIS Expression)
Examples of Advanced Integration Services Expressions
Integration Services (SSIS) Expressions
Operator Precedence and Associativity
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Each operator in the set of operators that the expression evaluator supports has a designated precedence in the
precedence hierarchy and includes a direction in which it is evaluated. The direction of evaluation for an
operator is operator associativity. Operators with higher precedence are evaluated before operators with lower
precedence. If a complex expression has multiple operators, operator precedence determines the order in which
the operations are performed. The order of execution can significantly affect the resulting value. Some operators
have equal precedence. If an expression contains multiple operators of equal precedence, the operators are
evaluated directionally, from left to right or right to left.
The following table lists the precedence of operators in order of high to low. Operators at the same level have
equal precedence.
See Also
Operators (SSIS Expression)
Cast (SSIS Expression)
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Explicitly converts an expression from one data type to a different data type. The cast operator can also
function as a truncation operator.
Syntax
(type_spec) expression
Arguments
type_spec
Is a valid SSIS data type.
expression
Is a valid expression.
Result Types
The data type of type_spec. For more information, see Integration Services Data Types.
Remarks
The following diagram shows legal cast operations.
Casting to some data types requires parameters. The following table lists these data types and their
parameters.
DATA T Y P E PA RA M ET ER EXA M P L E
When a string is cast to a DT_DATE, or vice versa, the locale of the transformation is used. However, the date is
in the ISO format of YYYY-MM-DD, regardless of whether the locale preference uses the ISO format.
NOTE
To convert a string to a date data type other than DT_DATE, see Integration Services Data Types.
If the code page is a multibyte character code page, the number of bytes and characters may differ. Casting
from a DT_WSTR to a DT_STR with the same charcount value may cause truncation of the final characters in the
converted string. If sufficient storage is available in the column of the destination table, set the value of the
charcount parameter to reflect the number of bytes that the multibyte code page requires. For example, if you
cast character data to a DT_STR data type using the 936 code page, you should set charcount to a value up to
two times greater than the number of characters that you expect the data to contain; if you cast character data
using the UTF-8 code page, you should set charcount to a value up to four times greater.
For more information about the structure of date data types, see Integration Services Data Types.
(DT_I4) 3.57
This example casts an integer to a character string using the 1252 code page.
(DT_STR,1,1252)5
(DT_WSTR,3)"Cat"
(DT_DECIMAl,2)500
This example casts an integer to a numeric with a precision of seven and scale of three.
(DT_NUMERIC,7,3)4000
This example casts values in the FirstName column, defined with an nvarchar data type and a length of 50, to
a character string using the 1252 code page.
(DT_STR,50,1252)FirstName
This example casts values in the DateFirstPurchase column of type DT_DBDATE, to a Unicode character string
with a length of 20.
(DT_WSTR,20)DateFirstPurchase
(DT_BOOL)"True"
(DT_DBDATE) "1999-10-11"
This example casts a string literal to the DT_DBTIME2 data type that uses 5 digits for fractional seconds. (The
DT_DBTIME2 data type can have between 0 and 7 digits specified for fractional seconds.)
(DT_DBTIME2, 5) "16:34:52.12345"
This example casts a string literal to the DT_DBTIMESTAMP2 data type that uses 4 digits for fractional seconds.
(The DT_DBTIMESTAMP2 data type can have between 0 and 7 digits specified for fractional seconds.)
This example casts a string literal to the DT_DBTIMESTAMPOFFSET data type that uses 7 digits for fractional
seconds. (The DT_DBTIMESTAMPOFFSET data typecan have between 0 and 7 digits specified for fractional
seconds.)
See Also
Operator Precedence and Associativity
Operators (SSIS Expression)
Integration Services (SSIS) Expressions
Integration Services Data Types in Expressions
() (Parentheses) (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Identifies the evaluation order of expressions. Expressions enclosed in parentheses have the highest evaluation
precedence. Nested expressions enclosed in parentheses are evaluated in inner-to-outer order.
Parentheses are also used to make complex expressions easier to understand.
Syntax
(expression)
Arguments
expression
Is any valid expression.
Result Types
The data type of expression. For more information, see Integration Services Data Types.
Expression Examples
This example shows how the use of parenthesis modifies the precedence of operators. The first expression
evaluates to 100, whereas the second one evaluates to 31.
(5 + 5) * (4 + 6)
5 + 5 * 4 + 6
See Also
Operator Precedence and Associativity
Operators (SSIS Expression)
+ (Add) (SSIS)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Adds two numeric expressions.
Syntax
numeric_expression1 + numeric_expression2
Arguments
numeric_expression1, numeric_ expression2
Is any valid expression of a numeric data type.
Result Types
Determined by data types of the two arguments. For more information, see Integration Services Data Types.
Remarks
If either operand is null, the result is null.
Expression Examples
This example adds numeric literals.
5 + 6.09 + 7.0
VacationHours + SickLeaveHours
This example adds a calculated value to the StandardCost column. The variable Profit% must be enclosed in
brackets because the name includes the % character. For more information, see Identifiers (SSIS).
See Also
Operator Precedence and Associativity
Operators (SSIS Expression)
+ (Concatenate) (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Concatenates two expressions into one expression.
Syntax
character_expression1 + character_expression2
Arguments
expression1, expression2
Is any valid DT_STR, DT_WSTR, DT_TEXT, DT_NTEXT, or DT_IMAGE data type expression.
Result Types
DT_WSTR
Remarks
The expression can use either or both of the DT_STR and DT_WSTR data types.
The concatenation of the DT_STR and DT_WSTR data types returns a result of the DT_WSTR type. The length of the
string is the sum of the lengths of the original strings expressed in characters.
Only data with the string data types DT_STR and DT_WSTR or the Binary Large Object Block (BLOB) data types
DT_TEXT, DT_NTEXT, and DT_IMAGE can be concatenated. Other data types must be explicitly converted to one of
these data types before concatenation occurs. For more information about legal casts between data types, see Cast
(SSIS Expression).
Both expressions must be of the same data type, or one expression must be implicitly convertible to the data type
of the other expression. For example, if the string "Order date is " and the column OrderDate are concatenated,
the values in OrderDate are implicitly converted to a string data type. To concatenate two numeric values, both
numeric values must be explicitly cast to a string data type.
A concatenation can use only one BLOB data type: DT_TEXT, DT_NTEXT, or DT_IMAGE.
If either element is null, the result is null.
String literals must be enclosed in quotation marks.
Expression Examples
This example concatenates the values in the FirstName and LastName columns and inserts a space between
them.
See Also
Operator Precedence and Associativity
Operators (SSIS Expression)
- (Subtract) (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Subtracts the second numeric expression from the first one.
Syntax
numeric_expression1 - numeric_expression2
Arguments
numeric_expression1, numeric_expression2
Is any valid expression of a numeric data type. For more information, see Integration Services Data Types.
Result Types
Determined by the data types of the two arguments. For more information, see Integration Services Data Types in
Expressions.
Remarks
Enclose the minus unary expression in parenthesis to ensure that the expression is evaluated in the correct
order
If either operand is null, the result is null.
Expression Examples
This example subtracts numeric literals.
5 - 6.09
This example subtracts the value in the StandardCost column from the value in the ListPrice column.
ListPrice - StandardCost
This example subtracts a calculated value from the ListPrice column. The variable Discount% must be enclosed in
brackets because the name includes the % character. For more information, see Identifiers (SSIS).
See Also
Operator Precedence and Associativity
Operators (SSIS Expression)
- (Negate) (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Negates a numeric expression.
Syntax
-numeric_expression
Arguments
numeric_expression
Is any valid expression of any numeric data type. Only signed numeric data types are supported. For more
information, see Integration Services Data Types.
Result Types
Returns the data type of numeric_expression.
Expression Examples
This example negates the value of the Counter variable and adds the numeric literal 50.
-@Counter + 50
See Also
Operator Precedence and Associativity
Operators (SSIS Expression)
* (Multiply) (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Multiplies two numeric expressions.
Syntax
numeric_expression1 * numeric_expression2
Arguments
numeric_expression1, numeric_expression2
Is any valid expression of a numeric data type. For more information, see Integration Services Data Types.
Result Types
Determined by data types of the two arguments. For more information, see Integration Services Data Types in
Expressions.
Remarks
If either operand is null, the result is null.
Expression Examples
This example multiplies numeric literals.
5 * 6.09
ListPrice * .10
This example subtracts the result of an expression from the ListPrice column. The variable Discount% must be
enclosed in brackets because the name includes the % character. For more information, see Identifiers (SSIS).
See Also
Operator Precedence and Associativity
Operators (SSIS Expression)
Divide (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Divides the first numeric expression by the second one.
Syntax
dividend / divisor
Arguments
dividend
Is the numeric expression to divide. dividend can be any valid numeric expression. For more information, see
Integration Services Data Types.
divisor
Is the numeric expression to divide the dividend by. divisor can be any valid numeric expression except zero.
Result Types
Determined by data types of the two arguments. For more information, see Integration Services Data Types in
Expressions.
Remarks
If either operand is null, the result is null.
Dividing by zero is not legal. Depending on how the divisor subexpression is evaluated, one of following errors
occurs:
If the divisor subexpression that evaluates to zero is a constant, the error appears at design time, causing the
expression to fail validation.
If the divisor subexpression that evaluates to zero contains variables, but no input columns, the component
to which the expression belongs fails the pre-execution validation that occurs before the package runs.
If the divisor subexpression that evaluates to zero contains input columns, the error appears at run time and
is handled according to the error flow rules of the data flow component.
Expression Examples
This example divides two numeric literals.
25 / 5
This example divides values in the ListPrice column by values in the StandardCost column.
ListPrice / StandardCost
See Also
Operator Precedence and Associativity
Operators (SSIS Expression)
(Modulo) (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Provides the integer remainder after dividing the first numeric expression by the second one.
Syntax
dividend % divisor
Arguments
dividend
Is the numeric expression to divide. dividend can be any valid numeric expression. For more information, see
Integration Services Data Types
divisor
Is the numeric expression to divide the dividend by. divisor can be any valid numeric expression except zero.
Result Types
Determined by data types of the two arguments. For more information, see Integration Services Data Types in
Expressions.
Remarks
Both expressions must evaluate to signed or unsigned integer data types.
If either operand is null, the result is null.
Modulo zero is not legal.
Expression Examples
This example computes the modulus from two numeric literals. The result is 3.
42 % 13
This example computes the modulus from the SalesQuota column and a numeric literal.
SalesQuota % 12
This example computes the modulus from two numeric variables Sales$ and Month . The variable Sales$ must be
enclosed in brackets because the name includes the $ character. For more information, see Identifiers (SSIS).
@[Sales$] % @Month
This example uses the modulo operator to determine if the value of the Value variable is even or odd, and uses the
conditional operator to return a string that describes the result. For more information, see ? : (Conditional) (SSIS
Expression).
@Value % 2 == 0? "even":"odd"
See Also
Operator Precedence and Associativity
Operators (SSIS Expression)
|| (Logical OR) (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Performs a logical OR operation. The expression evaluates to TRUE if one or both conditions are TRUE.
Syntax
boolean_expression1 || boolean_expression2
Arguments
boolean_expression1, boolean_expression2
Is any valid expression that evaluates to TRUE, FALSE, or NULL.
Result Types
DT_BOOL
Remarks
The following table shows the result of the || operator.
This example uses the variables SPrice and LPrice instead of numeric literals.
StandardCost < @SPrice || ListPrice > @LPrice
See Also
| (Bitwise Inclusive OR) (SSIS Expression)
^ (Bitwise Exclusive OR) (SSIS Expression)
Operator Precedence and Associativity
Operators (SSIS Expression)
&& (Logical AND) (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Performs a logical AND operation. The expression evaluates to TRUE if all conditions are TRUE.
Syntax
boolean_expression1 && boolean_expression2
Arguments
boolean _expression1, boolean_expression2
Is any valid expression that evaluates to TRUE, FALSE, or NULL.
Result Types
DT_BOOL
Remarks
The following table shows the result of the && operator.
Expression Examples
This example uses the StandardCost and the ListPrice columns. The example evaluates to TRUE if the value of
the StandardCost column is less than 300 and the ListPrice column is greater than 500.
This example uses the variables SPrice and LPrice instead of literals.
StandardCost < @SPrice && ListPrice > @LPrice
See Also
& (Bitwise AND) (SSIS Expression)
Operator Precedence and Associativity
Operators (SSIS Expression)
! (Logical Not) (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Negates a Boolean operand.
NOTE
The ! operator cannot be used in conjunction with other operators. For example, you cannot combine the ! and the >
operators into the !>. operator.
Syntax
!boolean_expression
Arguments
boolean_expression
Is any valid expression that evaluates to a Boolean. For more information, see Integration Services Data Types.
Result Types
DT_BOOL
Remarks
The following table shows the result of the ! operation.
TRUE FALSE
NULL NULL
FALSE TRUE
Expression Examples
This example evaluates to FALSE if the Color column value is "red".
!(Color == "red")
This example evaluates to TRUE if the value of the MonthNumber variable is the same as the integer that
represents the current month. For more information, see MONTH (SSIS Expression) and GETDATE (SSIS
Expression).
!(@MonthNumber != MONTH(GETDATE())
See Also
Operator Precedence and Associativity
Operators (SSIS Expression)
| (Bitwise Inclusive OR) (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Performs a bitwise OR operation of two integer values. It compares each bit of its first operand to the
corresponding bit of its second operand. If either bit is 1, the corresponding result bit is set to 1. Otherwise, the
corresponding result bit is set to zero (0).
Both conditions must be a signed integer data type or both conditions must be an unsigned integer data type.
Syntax
integer_expression1 | integer_expression2
Arguments
integer_expression1 ,integer_ expression2
Is any valid expression of a signed or unsigned integer data type. For more information, see Integration Services
Data Types.
Result Types
Determined by data types of the two arguments. For more information, see Integration Services Data Types in
Expressions.
Remarks
If either condition is null, the expression result is null.
Expression Examples
This example performs a bitwise inclusive OR operation between the variables NumberA and NumberB .
NumberA contains 3 (00000011) and NumberB contains 9 (00001001).
@NumberA | @NumberB
3 | 5
See Also
|| (Logical OR) (SSIS Expression)
^ (Bitwise Exclusive OR) (SSIS Expression)
Operator Precedence and Associativity
Operators (SSIS Expression)
^ (Bitwise Exclusive OR) (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Performs a bitwise exclusive OR operation of two integer values. It compares each bit of its first operand to the
corresponding bit of its second operand. If one bit is 0 and the other bit is 1, the corresponding result bit is set to 1.
If both bits are 0 or both bits are 1, the corresponding result bit is set to 0.
Both conditions must be a signed integer data type or both conditions must be an unsigned integer data type.
Syntax
integer_expression1 ^ integer_expression2
Arguments
integer_expression1, integer_expression2
Is any valid expression of a signed or unsigned integer data type. For more information, see Integration Services
Data Types.
Result Types
Determined by data types of the two arguments. For more information, see Integration Services Data Types in
Expressions.
Remarks
If either condition is null, the expression result is null.
Expression Examples
This example performs a bitwise exclusive OR operation between variables NumberA and NumberB . NumberA
contains 3 (00000011) and NumberB contains 7 (00000111).
@NumberA ^ @NumberB
3 ^ 5
See Also
|| (Logical OR) (SSIS Expression)
| (Bitwise Inclusive OR) (SSIS Expression)
Operator Precedence and Associativity
Operators (SSIS Expression)
& (Bitwise AND) (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Performs a bitwise AND operation of two integer values. It compares each bit of its first operand to the
corresponding bit of its second operand. If both bits are 1, the corresponding result bit is set to 1. Otherwise, the
corresponding result bit is set to 0.
Both conditions must be a signed integer type or both conditions must be an unsigned integer type.
Syntax
integer_expression1 & integer_expression2
Arguments
integer_expression1, integer_expression2
Is any valid expression of a signed or unsigned integer data type. For more information, see Integration Services
Data Types.
Result Types
Determined by data types of the two arguments. For more information, see Integration Services Data Types in
Expressions.
Remarks
If either condition is null, the expression result is null.
Expression Examples
This example performs a bitwise AND operation between the columns NumberA and NumberB . NumberA
contains 3 (0000011) and column NumberB contains 7 (00000111).
3 & 5
See Also
&& (Logical AND) (SSIS Expression)
Operator Precedence and Associativity
Operators (SSIS Expression)
~ (Bitwise Not) (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Performs a bitwise negation of an integer. This operator can be applied to signed and unsigned integer data types.
Syntax
~integer_expression
Arguments
integer_expression
Is any valid expression of an integer data type. integer_expression is an integer that is transformed into a binary
number for the bitwise operation. For more information, see Integration Services Data Types.
Result Types
Returns the data type of integer_expression.
Remarks
None
Expression Examples
This example performs a bitwise ~ (NOT) operation on the number 170 (0000 0000 1010 1010). The number is a
signed integer.
~ 170
See Also
Operator Precedence and Associativity
Operators (SSIS Expression)
== (Equal) (SSIS Expression)
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Performs a comparison to determine if two expressions are equal. The expression evaluator automatically converts
many data types before it performs the comparison. For more information, see Integration Services Data Types in
Expressions.
However, some data types require that the expression include an explicit cast before the expression can be
evaluated successfully. For more information about legal casts between data types, see Cast (SSIS Expression).
Syntax
expression1 == expression2
Arguments
expression1, expression2
Is any valid expression.
Result Types
DT_BOOL
Remarks
If either expression in the comparison is null, the comparison result is null. If both expressions are null, the result is
null.
The expression set, expression1 and expression2, must follow one of these rules:
Numeric Both expression1 and expression2 must be a numeric data type. The intersection of the data types
must be a numeric data type, as specified in the rules about the implicit numeric conversions that the
expression evaluator performs. The intersection of the two numeric data types cannot be null. For more
information, see Integration Services Data Types in Expressions.
Character Both expression1 and expression2 must evaluate to either a DT_STR or a DT_WSTR data type.
The two expressions can evaluate to different string data types.
NOTE
String comparisons are case, accent, kana, and width-sensitive.
Date, Time, or Date/Time Both expression1 and expression2 must evaluate to one of the following data
types: DT_DBDATE, DT_DATE, DT_DBTIME, DT_DBTIME2, DT_DBTIMESTAMP, DT_DBTIMESTAMP2,
DT_DBTIMESTAPMOFFSET, or DT_FILETIME.
NOTE
The system does not support comparisons between an expression that evaluates to a time data type and an
expression that evaluates to either a date or a date/time data type. The system generates an error.
When comparing the expressions, the system applies the following conversion rules in the order listed:
When the two expressions evaluate to the same data type, a comparison of that data type is
performed.
If one expression is a DT_DBTIMESTAMPOFFSET data type, the other expression is implicitly
converted to DT_DBTIMESTAMPOFFSET and a DT_DBTIMESTAMPOFFSET comparison is performed.
For more information, see Integration Services Data Types in Expressions.
If one expression is a DT_DBTIMESTAMP2 data type, the other expression is implicitly converted to
DT_DBTIMESTAMP2 and a DT_DBTIMESTAMP2 comparison is performed.
If one expression is a DT_DBTIME2 data type, the other expression is implicitly converted to
DT_DBTIME2, and a DT_DBTIME2 comparison is performed.
If one expression is of a type other than DT_DBTIMESTAMPOFFSET, DT_DBTIMESTAMP2, or
DT_DBTIME2, the expressions are converted to the DT_DBTIMESTAMP data type before they are
compared.
When comparing the expressions, the system makes the following assumptions:
If each expression is a data type that includes fractional seconds, the system assumes that the data
type with the least number of digits for fractional seconds has zeros for the remaining digits.
If each expression is a date data type, but only one has a time zone offset, the system assumes that
the date data type without the time zone offset is in Coordinated Universal Time (UTC).
Logical Both expression1 and expression2 must evaluate to a Boolean.
GUID Both expression1 and expression2 must evaluate to the DT_GUID data type.
Binar y Both expression1 and expression2 must evaluate to the DT_BYTES data type.
BLOB Both expression1 and expression2 must evaluate to the same Binary Large Object Block (BLOB) data
type: DT_TEXT, DT_NTEXT, or DT_IMAGE.
For more information about data types, see Integration Services Data Types.
Expression Examples
This example evaluates to TRUE if the current date is July 4, 2003. For more information, see GETDATE (SSIS
Expression).
"7/4/2003" == GETDATE()
This example evaluates to TRUE if the value in the ListPrice column is 500.
ListPrice == 500
This example uses the variable LPrice . It evaluates to TRUE if the value of LPrice is 500. The data type of the
variable must be numeric for the expression to parse successfully.
@LPrice == 500
See Also
!= (Unequal) (SSIS Expression)
Operator Precedence and Associativity
Operators (SSIS Expression)
!= (Unequal) (SSIS Expression)
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Performs a comparison to determine if two expressions with compatible data types are not equal. The expression
evaluator automatically converts many data types before it performs the comparison.
However, some data types require that the expression include an explicit cast before the expression can be
evaluated successfully. For more information about legal casts between data types, see Cast (SSIS Expression).
Syntax
expression1 != expression2
Arguments
expression1, expression2
Is any valid expression.
Result Types
DT_BOOL
Remarks
If either expression in the comparison is null, the comparison result is null. If both expressions are null, the result is
null.
The expression set, expression1 and expression2, must follow one of these rules:
Numeric Both expression1 and expression2 must be a numeric data type. The intersection of the data types
must be a numeric data type, as specified in the rules about the implicit numeric conversions that the
expression evaluator performs. The intersection of the two numeric data types cannot be null. For more
information, see Integration Services Data Types in Expressions.
Character Both expression1 and expression2 must evaluate to either a DT_STR or a DT_WSTR data type.
The two expressions can evaluate to different string data types.
NOTE
String comparisons are case, accent, kana, and width-sensitive.
Date, Time, or Date/Time Both expression1 and expression2 must evaluate to one of the following data
types: DT_DBDATE, DT_DATE, DT_DBTIME, DT_DBTIME2, DT_DBTIMESTAMP, DT_DBTIMESTAMP2,
DT_DBTIMESTAPMOFFSET, or DT_FILETIME.
NOTE
The system does not support comparisons between an expression that evaluates to a time data type and an
expression that evaluates to either a date or a date/time data type. The system generates an error.
When comparing the expressions, the system applies the following conversion rules in the order listed:
When the two expressions evaluate to the same data type, a comparison of that data type is
performed.
If one expression is a DT_DBTIMESTAMPOFFSET data type, the other expression is implicitly
converted to DT_DBTIMESTAMPOFFSET and a DT_DBTIMESTAMPOFFSET comparison is performed.
For more information, see Integration Services Data Types in Expressions.
If one expression is a DT_DBTIMESTAMP2 data type, the other expression is implicitly converted to
DT_DBTIMESTAMP2 and a DT_DBTIMESTAMP2 comparison is performed.
If one expression is a DT_DBTIME2 data type, the other expression is implicitly converted to
DT_DBTIME2, and a DT_DBTIME2 comparison is performed.
If one expression is of a type other than DT_DBTIMESTAMPOFFSET, DT_DBTIMESTAMP2, or
DT_DBTIME2, the expressions are converted to the DT_DBTIMESTAMP data type before they are
compared.
When comparing the expressions, the system makes the following assumptions:
If each expression is a data type that includes fractional seconds, the system assumes that the data
type with the least number of digits for fractional seconds has zeros for the remaining digits.
If each expression is a date data type, but only one has a time zone offset, the system assumes that
the date data type without the time zone offset is in Coordinated Universal Time (UTC).
Logical Both expression1 and expression2 must evaluate to a Boolean.
GUID Both expression1 and expression2 must evaluate to the DT_GUID data type.
Binar y Both expression1 and expression2 must evaluate to the DT_BYTES data type.
BLOB Both expression1 and expression2 must evaluate to the same Binary Large Object Block (BLOB) data
type: DT_TEXT, DT_NTEXT, or DT_IMAGE.
For more information about data types, see Integration Services Data Types.
Expression Examples
This example evaluates to TRUE only if the current date is not July 4, 2003. For more information, see GETDATE
(SSIS Expression).
"7/4/2003" != GETDATE()
This example evaluates to TRUE if the value in the ListPrice column is not 500.
ListPrice != 500
This example uses the variable LPrice . It evaluates to TRUE if the value of LPrice is not 500. The data type on the
variable must be numeric in order for the expression to parse.
@LPrice != 500
See Also
== (Equal) (SSIS Expression)
Operator Precedence and Associativity
Operators (SSIS Expression)
> (Greater Than) (SSIS Expression)
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Performs a comparison to determine if the first expression is greater than the second one. The expression
evaluator automatically converts many data types before it performs the comparison.
NOTE
This operator does not support comparisons that use the DT_TEXT, DT_NTEXT, or DT_IMAGE data types.
However, some data types require that the expression include an explicit cast before the expression can be
evaluated successfully. For more information about legal casts between data types, see Cast (SSIS Expression).
Syntax
expression1 > expression2
Arguments
expression1, expression2
Is any valid expression. Both expressions must have implicitly convertible data types.
Result Types
DT_BOOL
Remarks
If either expression in the comparison is null, the comparison result is null. If both expressions are null, the result is
null.
The expression set, expression1 and expression2, must follow one of these rules:
Numeric Both expression1 and expression2 must be a numeric data type. The intersection of the data types
must be a numeric data type as specified in the rules about the implicit numeric conversions that the
expression evaluator performs. The intersection of the two numeric data types cannot be null. For more
information, see Integration Services Data Types in Expressions.
Character Both expression1 and expression2 must evaluate to either a DT_STR or a DT_WSTR data type.
The two expressions can evaluate to different string data types.
NOTE
String comparisons are case, accent, kana, and width-sensitive.
Date, Time, or Date/Time Both expression1 and expression2 must evaluate to one of the following data
types: DT_DBDATE, DT_DATE, DT_DBTIME, DT_DBTIME2, DT_DBTIMESTAMP, DT_DBTIMESTAMP2,
DT_DBTIMESTAPMOFFSET, or DT_FILETIME.
NOTE
The system does not support comparisons between an expression that evaluates to a time data type and an
expression that evaluates to either a date or a date/time data type. The system generates an error.
When comparing the expressions, the system applies the following conversion rules in the order listed:
When the two expressions evaluate to the same data type, a comparison of that data type is
performed.
If one expression is a DT_DBTIMESTAMPOFFSET data type, the other expression is implicitly
converted to DT_DBTIMESTAMPOFFSET and a DT_DBTIMESTAMPOFFSET comparison is performed.
For more information, see Integration Services Data Types in Expressions.
If one expression is a DT_DBTIMESTAMP2 data type, the other expression is implicitly converted to
DT_DBTIMESTAMP2 and a DT_DBTIMESTAMP2 comparison is performed.
If one expression is a DT_DBTIME2 data type, the other expression is implicitly converted to
DT_DBTIME2, and a DT_DBTIME2 comparison is performed.
If one expression is of a type other than DT_DBTIMESTAMPOFFSET, DT_DBTIMESTAMP2, or
DT_DBTIME2, the expressions are converted to the DT_DBTIMESTAMP data type before they are
compared.
When comparing the expressions, the system makes the following assumptions:
If each expression is a data type that includes fractional seconds, the system assumes that the data
type with the least number of digits for fractional seconds has zeros for the remaining digits.
If each expression is a date data type, but only one has a time zone offset, the system assumes that
the date data type without the time zone offset is in Coordinated Universal Time (UTC).
For more information about data types, see Integration Services Data Types.
Expression Examples
This example evaluates to TRUE if the current date is earlier than July 4, 2003. For more information, see GETDATE
(SSIS Expression).
This example evaluates to TRUE if the value in the ListPrice column is greater than 500.
This example uses the variable LPrice . It evaluates to TRUE if the value of LPrice is greater than 500. The data type
of the variable must be numeric in order for the expression to parse.
See Also
< (Less Than) (SSIS Expression)
>= (Greater Than or Equal To) (SSIS Expression)
<= (Less Than or Equal To) (SSIS Expression)
== (Equal) (SSIS Expression)
Operator Precedence and Associativity
Operators (SSIS Expression)
< (Less Than) (SSIS Expression)
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Performs a comparison to determine if the first expression is less than the second one. The expression evaluator
automatically converts many data types before it performs the comparison.
NOTE
This operator does not support comparisons that use the DT_TEXT, DT_NTEXT, or DT_IMAGE data types.
However, some data types require that the expression include an explicit cast before the expression can be
evaluated successfully. For more information about legal casts between data types, see Cast (SSIS Expression).
Syntax
expression1 < expression2
Arguments
expression1, expression2
Is any valid expression.
Result Types
DT_BOOL
Remarks
If either expression in the comparison is null, the comparison result is null. If both expressions are null, the result is
null.
The expression set, expression1 and expression2, must follow one of these rules:
Numeric Both expression1 and expression2 must be a numeric data type. The intersection of the data
types must be a numeric data type as specified in the rules about the implicit numeric conversions that the
expression evaluator performs. The intersection of the two numeric data types cannot be null. For more
information, see Integration Services Data Types in Expressions.
Character Both expression1 and expression2 must evaluate to either a DT_STR or a DT_WSTR data type.
The two expressions can evaluate to different string data types.
NOTE
String comparisons are case, accent, kana, and width-sensitive.
Date, Time, or Date/Time Both expression1 and expression2 must evaluate to one of the following data
types: DT_DBDATE, DT_DATE, DT_DBTIME, DT_DBTIME2, DT_DBTIMESTAMP, DT_DBTIMESTAMP2,
DT_DBTIMESTAPMOFFSET, or DT_FILETIME.
NOTE
The system does not support comparisons between an expression that evaluates to a time data type and an
expression that evaluates to either a date or a date/time data type. The system generates an error.
When comparing the expressions, the system applies the following conversion rules in the order listed:
When the two expressions evaluate to the same data type, a comparison of that data type is
performed.
If one expression is a DT_DBTIMESTAMPOFFSET data type, the other expression is implicitly
converted to DT_DBTIMESTAMPOFFSET and a DT_DBTIMESTAMPOFFSET comparison is performed.
For more information, see Integration Services Data Types in Expressions.
If one expression is a DT_DBTIMESTAMP2 data type, the other expression is implicitly converted to
DT_DBTIMESTAMP2 and a DT_DBTIMESTAMP2 comparison is performed.
If one expression is a DT_DBTIME2 data type, the other expression is implicitly converted to
DT_DBTIME2, and a DT_DBTIME2 comparison is performed.
If one expression is of a type other than DT_DBTIMESTAMPOFFSET, DT_DBTIMESTAMP2, or
DT_DBTIME2, the expressions are converted to the DT_DBTIMESTAMP data type before they are
compared.
When comparing the expressions, the system makes the following assumptions:
If each expression is a data type that includes fractional seconds, the system assumes that the data
type with the least number of digits for fractional seconds has zeros for the remaining digits.
If each expression is a date data type, but only one has a time zone offset, the system assumes that
the date data type without the time zone offset is in Coordinated Universal Time (UTC).
For more information about data types, see Integration Services Data Types.
Expression Examples
This example evaluates to TRUE if the current date is later than July 4, 2003. For more information, see GETDATE
(SSIS Expression).
This example evaluates to TRUE if the value in the ListPrice column is less than 500.
This example uses the variable LPrice . It evaluates to TRUE if the value of LPrice is less than 500. The data type of
the variable must be numeric in order for the expression to parse.
See Also
> (Greater Than) (SSIS Expression)
>= (Greater Than or Equal To) (SSIS Expression)
<= (Less Than or Equal To) (SSIS Expression)
Operator Precedence and Associativity
Operators (SSIS Expression)
>= (Greater Than or Equal To) (SSIS Expression)
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Performs a comparison to determine if the first expression is greater than or equal to the second one. The
expression evaluator automatically converts many data types before it performs the comparison.
NOTE
This operator does not support comparisons that use the DT_TEXT, DT_NTEXT, or DT_IMAGE data types.
However, some data types require that the expression include an explicit cast before the expression can be
evaluated successfully. For more information about legal casts between data types, see Cast (SSIS Expression).
NOTE
There are no spaces between the two characters in this operator.
Syntax
expression1 >= expression2
Arguments
expression1, expression2
Is any valid expression.
Result Types
DT_BOOL
Remarks
If either expression in the comparison is null, the comparison result is null. If both expressions are null, the result is
null.
The expression set, expression1 and expression2, must follow one of these rules:
Numeric Both expression1 and expression2 must be a numeric data type. The intersection of the data
types must be a numeric data type as specified in the rules about the implicit numeric conversions that the
expression evaluator performs. The intersection of the two numeric data types cannot be null. For more
information, see Integration Services Data Types in Expressions.
Character Both expression1 and expression2 must evaluate to either a DT_STR or a DT_WSTR data type.
The two expressions can evaluate to different string data types.
NOTE
String comparisons are case, accent, kana, and width-sensitive.
Date, Time, or Date/Time Both expression1 and expression2 must evaluate to one of the following data
types: DT_DBDATE, DT_DATE, DT_DBTIME, DT_DBTIME2, DT_DBTIMESTAMP, DT_DBTIMESTAMP2,
DT_DBTIMESTAPMOFFSET, or DT_FILETIME.
NOTE
The system does not support comparisons between an expression that evaluates to a time data type and an
expression that evaluates to either a date or a date/time data type. The system generates an error.
When comparing the expressions, the system applies the following conversion rules in the order listed:
When the two expressions evaluate to the same data type, a comparison of that data type is
performed.
If one expression is a DT_DBTIMESTAMPOFFSET data type, the other expression is implicitly
converted to DT_DBTIMESTAMPOFFSET and a DT_DBTIMESTAMPOFFSET comparison is performed.
For more information, see Integration Services Data Types in Expressions.
If one expression is a DT_DBTIMESTAMP2 data type, the other expression is implicitly converted to
DT_DBTIMESTAMP2 and a DT_DBTIMESTAMP2 comparison is performed.
If one expression is a DT_DBTIME2 data type, the other expression is implicitly converted to
DT_DBTIME2, and a DT_DBTIME2 comparison is performed.
If one expression is of a type other than DT_DBTIMESTAMPOFFSET, DT_DBTIMESTAMP2, or
DT_DBTIME2, the expressions are converted to the DT_DBTIMESTAMP data type before they are
compared.
When comparing the expressions, the system makes the following assumptions:
If each expression is a data type that includes fractional seconds, the system assumes that the data
type with the least number of digits for fractional seconds has zeros for the remaining digits.
If each expression is a date data type, but only one has a time zone offset, the system assumes that
the date data type without the time zone offset is in Coordinated Universal Time (UTC).
For more information about data types, see Integration Services Data Types.
Expression Examples
This example evaluates to TRUE if the current date is July 4, 2003 or earlier. For more information, see GETDATE
(SSIS Expression).
This example evaluates to TRUE if the value in the ListPrice column is greater than or equal to 500.
This example uses the variable LPrice . It evaluates to TRUE if the value of LPrice is greater than or equal to 500.
The data type of the variable must be numeric in order for the expression to parse.
@LPrice >= 500
See Also
> (Greater Than) (SSIS Expression)
< (Less Than) (SSIS Expression)
<= (Less Than or Equal To) (SSIS Expression)
Operator Precedence and Associativity
Operators (SSIS Expression)
<= (Less Than or Equal To) (SSIS Expression)
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Performs a comparison to determine if the first expression is less than or equal to the second one. The expression
evaluator automatically converts many data types before it performs the comparison.
NOTE
This operator does not support comparisons that use the DT_TEXT, DT_NTEXT, or DT_IMAGE data types.
However, some data types require that the expression include an explicit cast before the expression can be
evaluated successfully. For more information about legal casts between data types, see Cast (SSIS Expression).
NOTE
There are no spaces between the two characters in this operator.
Syntax
expression1 <= expression2
Arguments
expression1, expression2
Is any valid expression.
Result Types
DT_BOOL
Remarks
If either expression in the comparison is null, the comparison result is null. If both expressions are null, the result is
null.
The expression set, expression1 and expression2, must follow one of these rules:
Numeric Both expression1 and expression2 must be a numeric data type. The intersection of the data
types must be a numeric data type as specified in the rules about the implicit numeric conversions that the
expression evaluator performs. The intersection of the two numeric data types cannot be null. For more
information, see Integration Services Data Types in Expressions.
Character Both expression1 and expression2 must evaluate to either a DT_STR or a DT_WSTR data type.
The two expressions can evaluate to different string data types.
NOTE
String comparisons are case, accent, kana, and width-sensitive.
Date, Time, or Date/Time Both expression1 and expression2 must evaluate to one of the following data
types: DT_DBDATE, DT_DATE, DT_DBTIME, DT_DBTIME2, DT_DBTIMESTAMP, DT_DBTIMESTAMP2,
DT_DBTIMESTAPMOFFSET, or DT_FILETIME.
NOTE
The system does not support comparisons between an expression that evaluates to a time data type and an
expression that evaluates to either a date or a date/time data type. The system generates an error.
When comparing the expressions, the system applies the following conversion rules in the order listed:
When the two expressions evaluate to the same data type, a comparison of that data type is
performed.
If one expression is a DT_DBTIMESTAMPOFFSET data type, the other expression is implicitly
converted to DT_DBTIMESTAMPOFFSET and a DT_DBTIMESTAMPOFFSET comparison is performed.
For more information, see Integration Services Data Types in Expressions.
If one expression is a DT_DBTIMESTAMP2 data type, the other expression is implicitly converted to
DT_DBTIMESTAMP2 and a DT_DBTIMESTAMP2 comparison is performed.
If one expression is a DT_DBTIME2 data type, the other expression is implicitly converted to
DT_DBTIME2, and a DT_DBTIME2 comparison is performed.
If one expression is of a type other than DT_DBTIMESTAMPOFFSET, DT_DBTIMESTAMP2, or
DT_DBTIME2, the expressions are converted to the DT_DBTIMESTAMP data type before they are
compared.
When comparing the expressions, the system makes the following assumptions:
If each expression is a data type that includes fractional seconds, the system assumes that the data
type with the least number of digits for fractional seconds has zeros for the remaining digits.
If each expression is a date data type, but only one has a time zone offset, the system assumes that
the date data type without the time zone offset is in Coordinated Universal Time (UTC).
For more information about data types, see Integration Services Data Types.
Expression Examples
This example evaluates to TRUE if the current date is July 4, 2003 or later. For more information, see GETDATE
(SSIS Expression).
This example evaluates to TRUE if the value in the ListPrice column is less than or equal to 500.
This example evaluates the variable LPrice and evaluates to TRUE if the value is less than or equal to 500. The
data type of LPrice must be numeric in order for the expression to parse.
@LPrice <= 500
See Also
> (Greater Than) (SSIS Expression)
< (Less Than) (SSIS Expression)
>= (Greater Than or Equal To) (SSIS Expression)
Operator Precedence and Associativity
Operators (SSIS Expression)
? : (Conditional) (SSIS Expression)
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns one of two expressions based on the evaluation of a Boolean expression. If the Boolean expression
evaluates to TRUE, then the first expression is evaluated and the result is the expression result. If the Boolean
expression evaluates to FALSE then the second expression is evaluated and its result is the expression result.
Syntax
boolean_expression?expression1:expression2
Arguments
boolean_expression
Is any valid expression that evaluates to TRUE, FALSE, or NULL.
expression1
Is any valid expression.
expression2
Is any valid expression.
Result Types
The data type of expression1 or expression2.
Remarks
If the boolean_expression evaluates to NULL, the expression result is NULL. If a selected expression, either
expression1 or expression2 is NULL, the result is NULL. If a selected expression is not NULL, but the one not
selected is NULL, the result is the value of the selected expression.
If expression1 and expression2 have the same data type, the result is that data type. The following additional rules
apply to result types:
The DT_TEXT data type requires that expression1 and expression2 have the same code page.
The length of a result with the DT_BYTES data type is the length of the longer argument.
The expression set, expression1 and expression2, must evaluate to valid data types and follow one of these rules:
Numeric Both expression1 and expression2 must be a numeric data type. The intersection of the data types
must be a numeric data type as specified in the rules about the implicit numeric conversions that the
expression evaluator performs. The intersection of the two numeric data types cannot be null. For more
information, see Integration Services Data Types in Expressions.
String Both expression1 and expression2 must be a string data type: DT_STR or DT_WSTR. The two
expressions can evaluate to different string data types. The result has the DT_WSTR data type with a length
of the longer argument.
Date, Time, or Date/Time Both expression1 and expression2 must evaluate to one of the following data
types: DT_DBDATE, DT_DATE, DT_DBTIME, DT_DBTIME2, DT_DBTIMESTAMP, DT_DBTIMESTAMP2,
DT_DBTIMESTAPMOFFSET, or DT_FILETIME.
NOTE
The system does not support comparisons between an expression that evaluates to a time data type and an
expression that evaluates to either a date or a date/time data type. The system generates an error.
When comparing the expressions, the system applies the following conversion rules in the order listed:
When the two expressions evaluate to the same data type, a comparison of that data type is
performed.
If one expression is a DT_DBTIMESTAMPOFFSET data type, the other expression is implicitly converted
to DT_DBTIMESTAMPOFFSET and a DT_DBTIMESTAMPOFFSET comparison is performed. For more
information, see Integration Services Data Types in Expressions.
If one expression is a DT_DBTIMESTAMP2 data type, the other expression is implicitly converted to
DT_DBTIMESTAMP2 and a DT_DBTIMESTAMP2 comparison is performed.
If one expression is a DT_DBTIME2 data type, the other expression is implicitly converted to
DT_DBTIME2, and a DT_DBTIME2 comparison is performed.
If one expression is of a type other than DT_DBTIMESTAMPOFFSET, DT_DBTIMESTAMP2, or
DT_DBTIME2, the expressions are converted to the DT_DBTIMESTAMP data type before they are
compared.
When comparing the expressions, the system makes the following assumptions:
If each expression is a data type that includes fractional seconds, the system assumes that the data
type with the least number of digits for fractional seconds has zeros for the remaining digits.
If each expression is a date data type, but only one has a time zone offset, the system assumes that
the date data type without the time zone offset is in Coordinated Universal Time (UTC).
For more information about data types, see Integration Services Data Types.
Expression Examples
This example shows an expression that conditionally evaluates to savannah or unknown .
This example shows an expression that references a ListPrice column. ListPrice has the DT_CY data type. The
expression conditionally multiplies ListPrice by .2 or .1.
See Also
Operator Precedence and Associativity
Operators (SSIS Expression)
Functions (SSIS Expression)
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The expression language includes a set of functions for use in expressions. An expression can use a single
function, but typically an expression combines functions with operators and uses multiple functions.
The functions can be categorized into the following groups:
Mathematical functions that perform calculations based on numeric input values provided as
parameters to the functions and return numeric values.
String functions that perform operations on string or hexadecimal input values and return a string or
numeric value.
Date and time functions that perform operations on date and time values and return string, numeric,
or date and time values.
System functions that return information about an expression.
The expression language provides the following mathematical functions.
F UN C T IO N DESC RIP T IO N
EXP (SSIS Expression) Returns the exponent to base e of the specified expression.
CEILING (SSIS Expression) Returns the smallest integer that is greater than or equal
to a numeric expression.
FLOOR (SSIS Expression) Returns the largest integer that is less than or equal to a
numeric expression.
SIGN (SSIS Expression) Returns the positive (+), negative (-), or zero (0) sign of a
numeric expression.
F UN C T IO N DESC RIP T IO N
CODEPOINT (SSIS Expression) Returns the Unicode code value of the leftmost character
of a character expression.
FINDSTRING (SSIS Expression) Returns the one-based index of the specified occurrence of
a character string within an expression.
LEFT (SSIS Expression) Returns the specified number of characters from the
leftmost portion of the given character expression.
RIGHT (SSIS Expression) Returns the specified number of characters from the
rightmost portion of the given character expression.
TRIM (SSIS Expression) Returns a character expression after removing leading and
trailing spaces.
The expression evaluator provides the following date and time functions.
F UN C T IO N DESC RIP T IO N
DATEDIFF (SSIS Expression) Returns the number of date and time boundaries crossed
between two specified dates.
DAY (SSIS Expression) Returns an integer that represents the day of the specified
date.
GETUTCDATE (SSIS Expression) Returns the current date of the system in UTC time
(Universal Time Coordinate or Greenwich Mean Time).
MONTH (SSIS Expression) Returns an integer that represents the month of the
specified date.
YEAR (SSIS Expression) Returns an integer that represents the year of the
specified date.
F UN C T IO N DESC RIP T IO N
Expression names are shown in uppercase characters, but expression names are not case-sensitive. For
example, using "null" works as well as using "NULL".
See Also
Operators (SSIS Expression)
Examples of Advanced Integration Services Expressions
Integration Services (SSIS) Expressions
ABS (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the absolute, positive value of a numeric expression.
Syntax
ABS(numeric_expression)
Arguments
numeric_expression
Is a signed or unsigned numeric expression.
Result Types
The data type of the numeric expression submitted to the function.
Remarks
ABS returns a null result if the argument is null.
Expression Examples
These examples apply the ABS function to a positive and a negative number. Both return 1.23.
ABS(-1.23)
ABS(1.23)
This example applies the ABS function to an expression that subtracts values in the variables HighTemperature
and LowTempature .
ABS(@HighTemperature - @LowTemperature)
See Also
Functions (SSIS Expression)
CEILING (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the smallest integer that is greater than or equal to a numeric expression.
Syntax
CEILING(numeric_expression)
Arguments
numeric_expression
Is a valid numeric expression.
Result Types
The data type of the numeric expression submitted to the function.
Remarks
CEILING returns a null result if the argument is null.
Expression Examples
These examples apply the CEILING function to positive, negative, and zero values.
CEILING(123.74)
Returns 124.00
CEILING(-124.27)
Returns -124.00
CEILING(0.00)
Returns 0.00
See Also
FLOOR (SSIS Expression)
Functions (SSIS Expression)
CODEPOINT (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the Unicode code point of the leftmost character of a character expression.
Syntax
CODEPOINT(character_expression)
Arguments
character_expression
Is a character expression whose leftmost character will be evaluated.
Result Types
DT_UI2
Remarks
character_expression must have the DT_WSTR data type.
CODEPOINT returns a null result if character_expression is null or an empty string.
Expression Examples
This example uses a string literal. The return result is 77, the Unicode code point for M.
CODEPOINT("Mountain Bike")
This example uses a variable. If Name is Touring Front Wheel, the return result is 84, the Unicode code point for T.
CODEPOINT(@Name)
See Also
Functions (SSIS Expression)
DATEADD (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns a new DT_DBTIMESTAMP value after adding a number that represents a date or time interval to the
specified datepart in a date. The number parameter must evaluate to an integer, and the date parameter must
evaluate to a valid date.
Syntax
DATEADD(datepart, number, date)
Arguments
datepart
Is the parameter that specifies which part of the date to add a number to.
number
Is the value used to increment datepart. The value must be an integer value that is known when the expression is
parsed.
date
Is an expression that returns a valid date or a string in date format.
Result Types
DT_DBTIMESTAMP
Remarks
The following table lists the dateparts and abbreviations recognized by the expression evaluator. Datepart names
are not case sensitive.
Quarter qq, q
Month mm, m
Dayofyear dy, y
Day dd, d
Week wk, ww
DAT EPA RT A B B REVIAT IO N S
Weekday dw, w
Hour Hh
Minute mi, n
Second ss, s
Millisecond Ms
The number argument must be available when the expression is parsed. The argument can be a constant or a
variable. You cannot use column values because the values are not known when the expression is parsed.
The datepart argument must be enclosed by quotation marks.
A date literal must be explicitly cast to one of the date data types. For more information, see Integration Services
Data Types.
DATEADD returns a null result if the argument is null.
Errors occur if a date is invalid, if the date or time unit is not a string, or if the increment is not a static integer.
DATEADD("Month", 1,GETDATE())
DATEADD("yyyy", 2, (DT_DBTIMESTAMP)"8/6/2003")
See Also
DATEDIFF (SSIS Expression)
DATEPART (SSIS Expression)
DAY (SSIS Expression)
MONTH (SSIS Expression)
YEAR (SSIS Expression)
Functions (SSIS Expression)
DATEDIFF (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the number of date and time boundaries crossed between two specified dates. The datepart parameter
identifies which date and time boundaries to compare.
Syntax
DATEDIFF(datepart, startdate, endate)
Arguments
datepart
Is the parameter that specifies which part of the date to compare and return a value for.
startdate
Is the start date of the interval.
endate
Is the end date of the interval.
Result Types
DT_I4
Remarks
The following table lists the dateparts and abbreviations recognized by the expression evaluator.
Quarter qq, q
Month mm, m
Dayofyear dy, y
Day dd, d
Week wk, ww
Weekday dw, w
Hour Hh
DAT EPA RT A B B REVIAT IO N S
Minute mi, n
Second ss, s
Millisecond Ms
This example returns the number of months between a date literal and the current date.
DATEDIFF("mm", (DT_DBTIMESTAMP)"8/1/2003",GETDATE())
This example returns the number of weeks between the date in the ModifiedDate column and the YearEndDate
variable. If YearEndDate has a date data type, no explicit casting is required.
DATEDIFF("Week", ModifiedDate,@YearEndDate)
See Also
DATEADD (SSIS Expression)
DATEPART (SSIS Expression)
DAY (SSIS Expression)
MONTH (SSIS Expression)
YEAR (SSIS Expression)
Functions (SSIS Expression)
DATEPART (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns an integer representing a datepart of a date.
Syntax
DATEPART(datepart, date)
Arguments
datepart
Is the parameter that specifies for which part of the date to return a new value.
date
Is an expression that returns a valid date or a string in date format.
Result Types
DT_I4
Remarks
DATEPART returns a null result if the argument is null.
A date literal must be explicitly cast to one of the date data types. For more information, see Integration Services
Data Types.
The following table lists the dateparts and abbreviations recognized by the expression evaluator. Datepart names
are not case sensitive.
Quarter qq, q
Month mm, m
Dayofyear dy, y
Day dd, d
Week wk, ww
Weekday dw
DAT EPA RT A B B REVIAT IO N S
Minute mi, n
Second ss, s
Millisecond Ms
DATEPART("month", (DT_DBTIMESTAMP)"11/04/2002")
This example returns the integer that represents the day in the ModifiedDate column.
DATEPART("dd", ModifiedDate)
This example returns the integer that represents the year of the current date.
DATEPART("yy",GETDATE())
See Also
DATEADD (SSIS Expression)
DATEDIFF (SSIS Expression)
DAY (SSIS Expression)
MONTH (SSIS Expression)
YEAR (SSIS Expression)
Functions (SSIS Expression)
DAY (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns an integer that represents the day datepart of a date.
Syntax
DAY(date)
Arguments
date
Is an expression that returns a valid date or a string in date format.
Result Types
DT_I4
Remarks
DAY returns a null result if the argument is null.
A date literal must be explicitly cast to one of the date data types. For more information, see Integration Services
Data Types.
NOTE
The expression fails to validate when a date literal is explicitly cast to one of these date data types:
DT_DBTIMESTAMPOFFSET and DT_DBTIMESTAMP2.
Using the DAY function is briefer but equivalent to using DATEPART("Day", date).
Expression Examples
This example returns the number of the day in a date literal. If the date format is in "mm/dd/yyyy" format, this
example returns 23.
DAY((DT_DBTIMESTAMP)"11/23/2002")
This example returns the integer that represents the day in the ModifiedDate column.
DAY(ModifiedDate)
This example returns the integer that represents the day of the current date.
DAY(GETDATE())
See Also
DATEADD (SSIS Expression)
DATEDIFF (SSIS Expression)
DATEPART (SSIS Expression)
MONTH (SSIS Expression)
YEAR (SSIS Expression)
Functions (SSIS Expression)
EXP (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the exponent to base e of a numeric expression. The EXP function complements the action of the LN
function and is sometimes referred to as the antilogarithm.
Syntax
EXP(numeric_expression)
Arguments
numeric_expression
Is a valid numeric expression.
Result Types
DT_R8
Remarks
The numeric expression is cast to the DT_R8 data type before the exponent is computed. For more information, see
Integration Services Data Types.
The return result is always a positive number.
Expression Examples
These examples apply the EXP function to positive and negative values and to zero.
EXP(74)
Returns 1.373382979540176E+32.
EXP(-27)
Returns 1.879528816539083E-12.
EXP(0)
Returns 1.
See Also
LOG (SSIS Expression)
Functions (SSIS Expression)
FINDSTRING (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the location of the specified occurrence of a string within a character expression. The return result is the
one-based index of the occurrence. The string parameter must evaluate to a character expression, and the
occurrence parameter must evaluate to an integer. If the string is not found, the return value is 0. If the string
occurs fewer times than the occurrence argument specifies, the return value is 0.
Syntax
FINDSTRING(character_expression, searchstring, occurrence)
Arguments
character_expression
Is the character string to search in.
searchstring
Is the character string to search for.
occurrence
Is a signed or unsigned integer specifying which occurrence of searchstring to report.
Result Types
DT_I4
Remarks
FINDSTRING works only with the DT_WSTR data type. character_expression and searchstring arguments that are
string literals or data columns with the DT_STR data type are implicitly cast to the DT_WSTR data type before
FINDSTRING performs its operation. Other data types must be explicitly cast to the DT_WSTR data type. For more
information, see Integration Services Data Types and Cast (SSIS Expression).
FINDSTRING returns null if either character_expression or searchstring are null.
Use a value of 1 in the occurrence argument to get the index of the first occurrence, 2 for the second occurrence
and so forth.
The occurrence must be an integer with a value greater than 0.
Expression Examples
This example uses a string literal. It returns the value 11.
This example uses a string literal. Because the string "NY" occurs only two times, the return result is 0.
FINDSTRING("New York, NY, NY", "NY", 3)
This example uses the Name column. It returns the location of the second "n" in the Name column. The return
result varies depending on the value in Name . If Name contains Anderson, the function returns 8.
FINDSTRING(Name, "n", 2)
This example uses the Name and Size columns. It returns the location of the leftmost character of the Size value
in the Name column. The return result varies depending on column values. If Name contains Mountain,500Red,42
and Size contains 42, the return result is 17.
FINDSTRING(Name,Size,1)
See Also
REPLACE (SSIS Expression)
Functions (SSIS Expression)
FLOOR (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the largest integer that is less than or equal to a numeric expression.
Syntax
FLOOR(numeric_expression)
Arguments
numeric_expression
Is a valid numeric expression.
Result Types
The numeric data type of the argument expression. The result is the integer portion of the calculated value in the
same data type as numeric_expression.
Remarks
FLOOR returns a null result if the argument is null.
Expression Examples
These examples apply the FLOOR function to positive, negative, and zero values.
FLOOR(123.45)
Returns 123.00
FLOOR(-123.45)
Returns -124.00
FLOOR(0.00)
Returns 0.00
See Also
CEILING (SSIS Expression)
Functions (SSIS Expression)
GETDATE (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the current date of the system in a DT_DBTIMESTAMP format. The GETDATE function takes no arguments.
NOTE
The length of the return result from the GETDATE function is 29 characters.
Syntax
GETDATE()
Arguments
None
Result Types
DT_DBTIMESTAMP
Expression Examples
This example returns the year of the current date.
DATEPART("year",GETDATE())
This example returns the number of days between a date in the ModifiedDate column and the current date.
DATEDIFF("dd",ModifiedDate,GETDATE())
DATEADD("Month",3,GETDATE())
See Also
GETUTCDATE (SSIS Expression)
Functions (SSIS Expression)
GETUTCDATE (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the current date of the system in UTC time (Universal Time Coordinate or Greenwich Mean Time) using a
DT_DBTIMESTAMP format. The GETUTCDATE function takes no arguments.
Syntax
GETUTCDATE()
Arguments
None
Result Types
DT_DBTIMESTAMP
Expression Examples
This example returns the year of the current date in UTC time.
DATEPART("year",GETUTCDATE())
This example returns the number of days between a date in the ModifiedDate column and the current UTC date.
DATEDIFF("dd",ModifiedDate,GETUTCDATE())
DATEADD("Month",3,GETUTCDATE())
See Also
GETDATE (SSIS Expression)
Functions (SSIS Expression)
HEX (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns a string representing the hexadecimal value of an integer.
Syntax
HEX(integer_expression)
Arguments
integer_expression
Is a signed or unsigned integer.
Result Types
DT_WSTR
Remarks
HEX returns null if integer_expression is null.
The integer_expression argument must evaluate to an integer. For more information, see Integration Services Data
Types.
The return result does not include qualifiers such as the 0x prefix. To include a prefix, use the + (Concatenate)
operator. For more information, see + (Concatenate) (SSIS Expression).
The letters A - F, used in HEX notations, appear as uppercase characters.
The length of the resulting string for integer data types is as follows:
DT_I1 and DT_UI1 return a string with a maximum length of 2.
DT_I2 and DT_UI2 return a string with a maximum length of 4.
DT_I4 and DT_UI4 return a string with a maximum length of 8.
DT_I8 and DT_UI8 return a string with a maximum length of 16.
Expression Examples
This example uses a numeric literal. The function returns the value 190.
HEX(400)
This example uses the ReorderPoint column. The column data type is smallint . If ReorderPoint is 750, the
function returns 2EE.
HEX(ReorderPoint)
This example uses LocaleID , a system variable. If LocaleID is 1033, the function returns 409.
HEX(@LocaleID)
See Also
Functions (SSIS Expression)
ISNULL (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns a Boolean result based on whether an expression is null.
Syntax
ISNULL(expression)
Arguments
expression
Is a valid expression of any data type.
Result Types
DT_BOOL
Expression Examples
This example returns TRUE if the DiscontinuedDate column contains a null value.
ISNULL(DiscontinuedDate)
This example returns "Unknown last name" if the value in the LastName column is null, otherwise it returns the
value in LastName .
This example always returns TRUE if the DaysToManufacture column is null, regardless of the value of the
variable AddDays .
ISNULL(DaysToManufacture + @AddDays)
See Also
Functions (SSIS Expression)
COALESCE (Transact-SQL)
LEFT (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the specified number of characters from the leftmost portion of the given character expression.
Syntax
LEFT(character_expression,number)
Arguments
character_expression
Is a character expression from which to extract characters.
number
Is an integer expression that indicates the number of characters to be returned.
Result Types
DT_WSTR
Remarks
If number is greater than the length of character_expression, the function returns character_expression.
If number is zero, the function returns a zero-length string.
If number is a negative number, the function returns an error.
The number argument can take variables and columns.
LEFT works only with the DT_WSTR data type. A character_expression argument that is a string literal or a data
column with the DT_STR data type is implicitly cast to the DT_WSTR data type before LEFT performs its operation.
Other data types must be explicitly cast to the DT_WSTR data type. For more information, see Integration Services
Data Types and Cast (SSIS Expression).
LEFT returns a null result if either argument is null.
Expression Examples
The following example uses a string literal. The return result is "Mountain" .
LEFT("Mountain Bike", 8)
See Also
RIGHT (SSIS Expression)
Functions (SSIS Expression)
LEN (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the number of characters in a character expression. If the string includes leading and trailing blanks, the
function includes them in the count. LEN returns identical values for the same string of single and double byte
characters.
Syntax
LEN(character_expression)
Arguments
character_expression
Is the expression to evaluate.
Result Types
DT_I4
Remarks
The character_expression argument can be a DT_WSTR, DT_TEXT, DT_NTEXT, or DT_IMAGE data type. For more
information, see Integration Services Data Types.
If character_expression is a string literal or a data column with the DT_STR data type, it is implicitly cast to the
DT_WSTR data type before LEN performs its operation. Other data types must be explicitly cast to the DT_WSTR
data type. For more information, see Cast (SSIS Expression).
If the argument passed to the LEN function has a Binary Large Object Block (BLOB) data type, such as DT_TEXT,
DT_NTEXT, or DT_IMAGE, the function returns a byte count.
LEN returns a null result if the argument is null.
Expression Examples
This example returns the length of a string literal. The return result is 12.
LEN("Ball Bearing")
This example returns the difference between the length of values in the FirstName and LastName columns.
LEN(FirstName) - LEN(LastName)
Returns the length of a computer name using the System variable MachineName .
LEN(@MachineName)
See Also
Functions (SSIS Expression)
LN (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the natural logarithm of a numeric expression.
Syntax
LN(numeric_expression)
Arguments
numeric_expression
Is a valid non-zero and non-negative numeric expression.
Result Types
DT_R8
Remarks
The numeric expression is cast to the DT_R8 data type before the logarithm is computed. For more information, see
Integration Services Data Types.
If numeric_expression evaluates to zero or a negative value, the return result is null.
Expression Examples
This example uses a numeric literal. The function returns the value 3.737766961828337.
LN(42)
This example uses the column Length . If the column value is 53.99, the function returns 3.9887988442302.
LN(Length)
This example uses the variable Length . The variable must have a numeric data type or the expression must include
an explicit cast to a numeric data type. If Length is 234.567, the function returns 5.45774126708797.
LN(@Length)
See Also
LOG (SSIS Expression)
Functions (SSIS Expression)
LOG (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the base-10 logarithm of a numeric expression.
Syntax
LOG(numeric_expression)
Arguments
numeric_expression
Is a valid nonzero or nonnegative numeric expression.
Result Types
DT_R8
Remarks
The numeric expression is cast to the DT_R8 data type before the logarithm is computed. For more information,
see Integration Services Data Types.
If numeric_expression evaluates to zero or a negative value, the return result is null.
Expression Examples
This example uses a numeric literal. The function returns the value 1.988291341907488.
LOG(97.34)
This example uses the column Length . If the column is 101.24, the function returns 2.005352136486217.
LOG(Length)
This example uses the variable Length . The variable must have a numeric data type or the expression must
include an explicit cast to a numeric SSIS data type. If Length is 234.567, the function returns
2.370266913465859.
LOG(@Length)
See Also
EXP (SSIS Expression)
LN (SSIS Expression)
Functions (SSIS Expression)
LOWER (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns a character expression after converting uppercase characters to lowercase characters.
Syntax
LOWER(character_expression)
Arguments
character_expression
Is a character expression to convert to lowercase characters.
Result Types
DT_WSTR
Remarks
LOWER works only with the DT_WSTR data type. A character_expression argument that is a string literal or a data
column with the DT_STR data type is implicitly cast to the DT_WSTR data type before LOWER performs its
operation. Other data types must be explicitly cast to the DT_WSTR data type. For more information, see Integration
Services Data Types and Cast (SSIS Expression).
LOWER returns a null result if the argument is null.
Expression Examples
This example converts a string literal to lowercase characters. The return result is "new york".
LOWER("New York")
This example converts all characters from the Color input column, except the first character, to lowercase
characters. If Color is YELLOW, the return result is "Yellow". For more information, see SUBSTRING (SSIS
Expression).
LOWER(SUBSTRING(Color, 2, 15))
This example converts the value in the CityName variable to lowercase characters.
LOWER(@CityName)
See Also
UPPER (SSIS Expression)
Functions (SSIS Expression)
LTRIM (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns a character expression after removing leading spaces.
NOTE
LTRIM does not remove white-space characters such as the tab or line feed characters. Unicode provides code points for
many different types of spaces, but this function recognizes only the Unicode code point 0x0020. When double-byte
character set (DBCS) strings are converted to Unicode they may include space characters other than 0x0020 and the
function cannot remove such spaces. To remove all kinds of spaces, you can use the Microsoft Visual Basic .NET LTrim
method in a script run from the Script component.
Syntax
LTRIM(character expression)
Arguments
character_expression
Is a character expression from which to remove spaces.
Result Types
DT_WSTR
Remarks
LTRIM works only with the DT_WSTR data type. A character_expression argument that is a string literal or a data
column with the DT_STR data type is implicitly cast to the DT_WSTR data type before LTRIM performs its operation.
Other data types must be explicitly cast to the DT_WSTR data type. For more information, see Integration Services
Data Types and Cast (SSIS Expression).
LTRIM returns a null result if the argument is null.
Expression Examples
This example removes leading spaces from a string literal. The return result is "Hello".
LTRIM(" Hello")
LTRIM(FirstName)
This example removes leading spaces from the FirstName variable.
LTRIM(@FirstName)
See Also
RTRIM (SSIS Expression)
TRIM (SSIS Expression)
Functions (SSIS Expression)
MONTH (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns an integer that represents the month datepart of a date.
Syntax
MONTH(date)
Arguments
date
Is a date in any date format.
Result Types
DT_I4
Remarks
MONTH returns a null result if the argument is null.
A date literal must be explicitly cast to one of the date data types. For more information, see Integration Services
Data Types.
NOTE
The expression fails to validate when a date literal is explicitly cast to one of these date data types:
DT_DBTIMESTAMPOFFSET and DT_DBTIMESTAMP2.
Using the MONTH function is briefer but equivalent to using DATEPART("Month", date).
Expression Examples
This example returns the number of the month in a date literal. If the date is in "mm/dd/yyyy" format, this
example returns 11.
MONTH((DT_DBTIMESTAMP)"11/23/2002")
This example returns the integer that represents the month in the ModifiedDate column.
MONTH(ModifiedDate)
This example returns the integer that represents the month of the current date.
MONTH(GETDATE())
See Also
DATEADD (SSIS Expression)
DATEDIFF (SSIS Expression)
DATEPART (SSIS Expression)
DAY (SSIS Expression)
YEAR (SSIS Expression)
Functions (SSIS Expression)
NULL (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns a null value of a requested data type.
Syntax
NULL(typespec)
Arguments
typespec
Is a valid data type. For more information, see Integration Services Data Types.
Result Types
Any valid data type with a null value.
Remarks
NULL returns a null result if the argument is null.
Parameters are required to request a null value for some data types. The following table lists these data types and
their parameters.
DATA T Y P E PA RA M ET ER EXA M P L E
NULL(DT_STR,10,1252)
NULL(DT_DATE)
NULL(DT_BOOL)
See Also
ISNULL (SSIS Expression)
Functions (SSIS Expression)
POWER (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the result of raising a numeric expression to a power. The power parameter must evaluate to an integer.
Syntax
POWER(numeric_expression,power)
Arguments
numeric_expression
Is a valid numeric expression.
power
Is a valid numeric expression.
Result Types
DT_R8
Remarks
The numeric_expression and power arguments are cast to the DT_R8 data type before the power is computed. For
more information, see Integration Services Data Types.
If numeric_expression evaluates to zero and power is negative, the expression evaluator returns an error and sets
the return result to null.
If numeric_expression or power evaluate to indeterminate results, the return result is null.
The power argument can be a fraction. For example, you can use the value 0.5 as the power.
Expression Examples
This example uses a numeric literal. The function raises 4 to the power of 3 and returns 64.
POWER(4,3)
This example uses the Length column and the DimensionCount variable. If Length is 8, and DimensionCount
is 2, the return result is 64.
POWER(Length, @DimensionCount)
See Also
Functions (SSIS Expression)
REPLACE (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns a character expression after replacing a character string within the expression with either a different
character string or an empty string.
NOTE
The REPLACE function frequently uses long strings. The consequences of truncation can be handled gracefully or cause a
warning or an error. For more information, see Syntax (SSIS).
Syntax
REPLACE(character_expression,searchstring,replacementstring)
Arguments
character_expression
Is a valid character expression that the function searches.
searchstring
Is a valid character expression that the function attempts to locate.
replacementstring
Is a valid character expression that is the replacement expression.
Result Types
DT_WSTR
Remarks
The length of searchstring must not be zero.
The length of replacementstring may be zero.
The searchstring and replacementstring arguments can use variables and columns.
REPLACE works only with the DT_WSTR data type. character_expression1, character_expression2, and
character_expression3 arguments that are string literals or data columns with the DT_STR data type are implicitly
cast to the DT_WSTR data type before REPLACE performs its operation. Other data types must be explicitly cast to
the DT_WSTR data type. For more information, see Cast (SSIS Expression).
REPLACE returns a null result if any argument is null.
Expression Examples
This example uses a string literal. The return result is "All Terrain Bike".
REPLACE("Mountain Bike", "Mountain","All Terrain")
This example removes the string "Bike" from the Product column.
REPLACE(Product, "Bike","")
This example replaces values in the DaysToManufacture column. The column has an integer data type and the
expression includes casting DaysToManufacture to the DT_WSTR data type.
REPLACE((DT_WSTR,8)DaysToManufacture,"6","5")
See Also
SUBSTRING (SSIS Expression)
Functions (SSIS Expression)
REPLACENULL (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the value of second expression parameter if the value of first expression parameter is NULL; otherwise,
returns the value of first expression.
Syntax
REPLACENULL(expression 1,expression 2)
Arguments
expression 1
The result of this expression is checked against NULL.
expression 2
The result of this expression is returned if the first expression evaluates to NULL.
Result Types
DT_WSTR
Remarks
The length of expression 2 may be zero.
REPLACENULL returns a null result if any argument is null.
BLOB columns (DT_TEXT, DT_NTEXT, DT_IMAGE) are not supported for either parameter.
The two expressions are expected to have the same return type. If they do not, the function attempts to cast
the 2nd expression to the return type of the 1st expression, which may result in an error if the data types are
incompatible.
Expression Examples
The following example replaces any NULL value in a database column with a string (1900-01-01). This function is
especially used in common Derived Column patterns where you want to replace NULL values with something else.
REPLACENULL(MyColumn, "1900-01-01")
NOTE
The following example shows how it was done in SQL Server 2005 Integration Services (SSIS)/ SQL Server 2008 Integration
Services (SSIS).
(DT_DBTIMESTAMP) (ISNULL(MyColumn) ? "1900-01-01" : MyColumn)
REPLICATE (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns a character expression that is replicated a number of times. The times argument must evaluate to an
integer.
NOTE
The REPLICATE function frequently uses long strings, and therefore is more likely to incur the 4000-character limit on
expression length. If the evaluation result of an expression has the Integration Services data type DT_WSTR or DT_STR, the
expression will be truncated at 4000 characters. If the result type of a sub-expression is DT_STR or DT_WSTR, that sub-
expression likewise will be truncated to 4000 characters, regardless of the overall expression result type. The consequences of
truncation can be handled gracefully or cause a warning or an error. For more information, see Syntax (SSIS).
Syntax
REPLICATE(character_expression,times)
Arguments
character_expression
Is a character expression to replicate.
times
Is an integer expression that specifies the number of times character_expression is replicated.
Result Types
DT_WSTR
Remarks
If times is zero, the function returns a zero-length string.
If times is a negative number, the function returns an error.
The times argument can also use variables and columns.
REPLICATE works only with the DT_WSTR data type. A character_expression argument that is a string literal or a
data column with the DT_STR data type is implicitly cast to the DT_WSTR data type before REPLICATE performs its
operation. Other data types must be explicitly cast to the DT_WSTR data type. For more information, see Integration
Services Data Types and Cast (SSIS Expression).
REPLICATE returns a null result if either argument is null.
Expression Examples
This example replicates a string literal three times. The return result is "Mountain BikeMountain BikeMountain
Bike".
REPLICATE("Mountain Bike", 3)
This example replicates values in the Name column by the value in the Times variable. If Times is 3 and Name is
Touring Front Wheel, the return result is Touring Front WheelTouring Front WheelTouring Front Wheel.
REPLICATE(Name, @Times)
This example replicates the value in the Name variable by the value in the Times column. Times has a non-integer
data type and the expression includes an explicit cast to an integer data type. If Name contains Helmet and Times
is 2, the return result is "HelmetHelmet".
REPLICATE(@Name, (DT_I4(Times))
See Also
Functions (SSIS Expression)
REVERSE (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns a character expression in reverse order.
Syntax
REVERSE(character_expression)
Arguments
character_expression
Is a character expression to be reversed.
Result Types
DT_WSTR
Remarks
The character_expression argument must have the DT_WSTR data type.
REVERSE returns a null result if character_expression is null.
Expression Examples
This example uses a string literal. The return result is "ekiB niatnuoM".
REVERSE("Mountain Bike")
This example uses a variable. If Name contains Touring Bike, the return result is "ekiB gniruoT".
REVERSE(@Name)
See Also
Functions (SSIS Expression)
RIGHT (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the specified number of characters from the rightmost portion of the given character expression.
Syntax
RIGHT(character_expression,integer_expression)
Arguments
character_expression
Is a character expression from which to extract characters.
integer_expression
Is an integer expression that indicates the number of characters to be returned.
Result Types
DT_WSTR
Remarks
If integer_expression is greater than the length of character_expression, the function returns character_expression.
If integer_expression is zero, the function returns a zero-length string.
If integer_expression is a negative number, the function returns an error.
The integer_expression argument can take variables and columns.
RIGHT works only with the DT_WSTR data type. A character_expression argument that is a string literal or a data
column with the DT_STR data type is implicitly cast to the DT_WSTR data type before RIGHT performs its operation.
Other data types must be explicitly cast to the DT_WSTR data type. For more information, see Integration Services
Data Types and Cast (SSIS Expression).
RIGHT returns a null result if either argument is null.
Expression Examples
The following example uses a string literal. The return result is "Bike" .
RIGHT("Mountain Bike", 4)
The following example returns the number of rightmost characters that is specified in the Times variable, from the
Name column. If Name is Touring Front Wheel and Times is 5, the return result is "Wheel" .
RIGHT(Name, @Times)
The following example also returns the number of rightmost characters that is specified in the Times variable,
from the Name column. Times has a noninteger data type and the expression includes an explicit cast to the DT_I2
data type. If Name is Touring Front Wheel and Times is 4.32 , the return result is "heel" because the RIGHT
function converts the value of 4.32 to 4, and then returns the rightmost four characters.
RIGHT(Name, (DT_I2)@Times))
See Also
LEFT (SSIS Expression)
Functions (SSIS Expression)
ROUND (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns a numeric expression that is rounded to the specified length or precision. The length parameter must
evaluate to an integer.
Syntax
ROUND(numeric_expression,length)
Arguments
numeric_expression
Is an expression of a valid numeric type. For more information, see Integration Services Data Types.
length
Is an integer expression. It is the precision to which numeric_expression is rounded.
Result Types
The same type as numeric_expression.
Remarks
The length argument must evaluate to a positive integer or zero.
ROUND returns a null result if the argument is null.
Expression Examples
These examples round numeric literals to a length of three. The first return result is 137.1570, the second 137.1580.
ROUND(137.1574,3)
ROUND(137.1575,3)
See Also
Functions (SSIS Expression)
RTRIM (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns a character expression after removing trailing spaces.
NOTE
RTRIM does not remove white space characters such as the tab or line feed characters. Unicode provides code points for
many different types of spaces, but this function recognizes only the Unicode code point 0x0020. When double-byte
character set (DBCS) strings are converted to Unicode they may include space characters other than 0x0020 and the
function cannot remove such spaces. To remove all kinds of spaces, you can use the Microsoft Visual Basic .NET RTrim
method in a script run from the Script component.
Syntax
RTRIM(character expression)
Arguments
character_expression
Is a character expression from which to remove spaces.
Result Types
DT_WSTR
Remarks
RTRIM works only with the DT_WSTR data type. A character_expression argument that is a string literal or a data
column with the DT_STR data type is implicitly cast to the DT_WSTR data type before RTRIM performs its
operation. Other data types must be explicitly cast to the DT_WSTR data type. For more information, see
Integration Services Data Types and Cast (SSIS Expression).
RTRIM returns a null result if the argument is null.
Expression Examples
This example removes trailing spaces from a string literal. The return result is "Hello".
RTRIM("Hello ")
This example removes trailing spaces from a concatenation of the FirstName and LastName columns.
RTRIM(@FirstName)
See Also
LTRIM (SSIS Expression)
TRIM (SSIS Expression)
Functions (SSIS Expression)
SIGN (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the positive (+1), negative (-1), or zero (0) sign of a numeric expression.
Syntax
SIGN(numeric_expression)
Arguments
numeric_expression
Is a valid signed numeric expression. For more information, see Integration Services Data Types.
Result Types
DT_I4
Remarks
SIGN returns a null result if the argument is null.
Expression Examples
This example returns the sign of a numeric literal. The return result is -1.
SIGN(-123.45)
This example returns the sign of the result of subtracting the StandardCost column from the DealerPrice
column.
SIGN(DealerPrice - StandardCost)
See Also
Functions (SSIS Expression)
SQRT (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the square root of a numeric expression.
Syntax
SQRT(numeric_expression)
Arguments
numeric_expression
Is a numeric expression of any numeric data type. For more information, see Integration Services Data Types.
Result Types
DT_R8
Remarks
SQRT returns a null result if the argument is null.
SQRT fails if the argument is a negative value.
The argument is cast to the DT_R8 data type before the square root operation.
Expression Examples
This example returns the square root of a numeric literal. The return result is 12.
SQRT(144)
This example returns the square root of an expression, the result of subtracting values in the Value1 and Value2
columns.
SQRT(Value1 - Value2)
This example returns the length of the third side of a right triangle by applying the SQUARE function to two
variables and then calculating the square root of their sum. If Side1 contains 3 and Side2 contains 4, the SQRT
function returns 5.
SQRT(SQUARE(@Side1) + SQUARE(@Side2))
NOTE
In expressions, variable names always include the @ prefix.
See Also
Functions (SSIS Expression)
SQUARE (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the square of a numeric expression.
Syntax
SQUARE(numeric_expression)
Arguments
numeric_expression
Is a numeric expression of any numeric data type. For more information, see Integration Services Data Types.
Result Types
DT_R8
Remarks
SQUARE returns a null result if the argument is null.
The argument is cast to the DT_R8 data type before the square operation.
Expression Examples
This example returns the square of 12. The return result is 144.
SQUARE(12)
This example returns the square of the result of subtracting values in two columns. If Value1 contains 12 and
Value2 contains 4, the SQUARE function returns 64.
SQUARE(Value1 - Value2)
This example returns the length of the third side of a right angle triangle by applying the SQUARE function to two
variables and then calculating the square root of their sum. If Side1 contains 3 and Side2 contains 4, the SQRT
function returns 5.
SQRT(SQUARE(@Side1) + SQUARE(@Side2))
NOTE
In expressions, variable names always include the @ prefix.
See Also
Functions (SSIS Expression)
SUBSTRING (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the part of a character expression that starts at the specified position and has the specified length. The
position parameter and the length parameter must evaluate to integers.
Syntax
SUBSTRING(character_expression, position, length)
Arguments
character_expression
Is a character expression from which to extract characters.
position
Is an integer that specifies where the substring begins.
length
Is an integer that specifies the length of the substring as number of characters.
Result Types
DT_WSTR
Remarks
SUBSTRING uses a one-based index. If position is 1, the substring begins with the first character in
character_expression.
SUBSTRING works only with the DT_WSTR data type. A character_expression argument that is a string literal or a
data column with the DT_STR data type is implicitly cast to the DT_WSTR data type before SUBSTRING performs its
operation. Other data types must be explicitly cast to the DT_WSTR data type. For more information, see
Integration Services Data Types and Cast (SSIS Expression).
SUBSTRING returns a null result if the argument is null.
All arguments in the expression can use variables and columns.
The length argument can exceed the length of the string. In that case, the function returns the remainder of the
string.
Expression Examples
This example returns two characters, beginning with character 4, from a string literal. The return result is "ph".
SUBSTRING("elephant",4,2)
This example returns the remainder of a string literal, beginning at the fourth character. The return result is
"phant". It is not an error for the length argument to exceed the length of the string.
SUBSTRING ("elephant",4,50)
This example returns the first letter from the MiddleName column.
SUBSTRING(MiddleName,1,1)
This example uses variables in the position and length arguments. If Star t is 1 and Length is 5, the function
returns the first five characters in the Name column.
SUBSTRING(Name,@Start,@Length)
This example returns the last four characters from the PostalCode variable beginning at the sixth character.
SUBSTRING (@PostalCode,6,4)
SUBSTRING ("Redmond",4,0)
See Also
Functions (SSIS Expression)
TOKEN (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns a token (substring) from a string based on the specified delimiters that separate tokens in the string and
the number of the token that denotes which token to be returned.
Syntax
TOKEN(character_expression, delimiter_string, occurrence)
Arguments
character_expression
A string that contains tokens separated by delimiters.
delimiter_string
A string that contains delimiter characters. For example, "; ," contains three delimiter characters semi-colon, a blank
space, and a comma.
occurrence
A signed or unsigned integer that specifies the token to be returned. For example, if you specify 3 as a value for this
parameter, the third token in the string is returned.
Result Types
DT_WSTR
Remarks
This function splits up the <character_expression> string into a set of tokens separated by the delimiters specified
in the <delimiter_string> and then returns the Nth token where N is the number of occurrence of the token
specified by the <occurrence> parameter. See Examples section for sample usages of this function.
The following remarks apply to the TOKEN function:
The delimiter string can contain one or more delimiter characters.
If the value of <occurrence> parameter is higher than the total number of tokens in the string, the function
returns NULL.
Leading delimiters are skipped.
TOKEN works only with the DT_WSTR data type. A character_expression argument that is a string literal or a
data column with the DT_STR data type is implicitly cast to the DT_WSTR data type before TOKEN performs
its operation. Other data types must be explicitly cast to the DT_WSTR data type.
TOKEN returns a null result if the character_expression is null.
You can use variables and columns as values of all arguments in the expression.
Expression Examples
In the following example, the TOKEN function returns "a". The string "a little white dog" has 4 tokens "a", "little",
"white", "dog" separated by the delimiter " " (space character). The second argument, a delimiter string, specifies
only one delimiter, the space character, to be used in splitting the input string into tokens. The last argument, 1,
specifies that the first token to be returned. The first token is "a" in this sample string.
In the following example, the TOKEN function returns "dog". The delimiter string in this example contains 5
delimiters. The input string contains 4 tokens: "a", "little", "white", "dog".
In the following example, the TOKEN function returns "" (an empty string) because there are no 99 tokens in the
string.
In the following example, the TOKEN function returns the full string. The function parses the input string for
delimiters and since there are none in the string, it just adds the entire string as the first token.
In the following example, the TOKEN function returns "a". It ignores all the leading space characters.
In the following example, the TOKEN function returns the year from a date string.
TOKEN("2009/01/01", "/"), 1
In the following example, the TOKEN function returns the file name from the specified path. For example, if the
value of User::Path is "c:\program files\data\myfile.txt", the TOKEN function returns "myfile.txt". The TOKENCOUNT
function returns 4 and the TOKEN function return the 4th token, "myfile.txt".
See Also
Functions (SSIS Expression)
TOKENCOUNT (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the number of tokens in a string that contains tokens separated by the specified delimiters.
Syntax
TOKENCOUNT(character_expression, delimiter_string)
Arguments
character_expression
A string that contains tokens separated by delimiters.
delimiter_string
A string that contains delimiter characters. For example, "; ," contains three delimiter characters semi-colon, a blank
space, and a comma.
Result Types
DT_I4
Remarks
The following remarks apply to the TOKEN function:
The delimiter string can contain one or more delimiter characters.
Leading delimiters are skipped.
TOKENCOUNT works only with the DT_WSTR data type. A character_expression argument that is a string
literal or a data column with the DT_STR data type is implicitly cast to the DT_WSTR data type before TOKEN
performs its operation. Other data types must be explicitly cast to the DT_WSTR data type.
TOKENCOUNT returns 0 (zero) if the character_expression is null.
You can use variables and columns as arguments for this expression.
Expression Examples
In the following example, the TOKENCOUNT function returns 3 because the string contains three tokens: "01", "12",
"2011".
TOKENCOUNT("01/12/2011", "/")
In the following example, the TOKENCOUNT function returns 4 because there are four tokens ("a", "little", "white",
"dog").
TOKENCOUNT("a little white dog"," ")
In the following example, the TOKENCOUNT function returns 1. The function parses the input string for delimiters
and since there are none in the string, it just adds the entire string as the first token.
In the following example, the TOKENCOUNT function returns 4. The delimiter string in this example contains 5
delimiters. The input string contains 4 tokens: "a", "little", "white", "dog".
In the following example, the TOKENCOUNT function returns 4. It ignores all the leading space characters.
See Also
Functions (SSIS Expression)
TRIM (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns a character expression after removing leading and trailing spaces.
NOTE
TRIM does not remove white-space characters such as the tab or line feed characters. Unicode provides code points for
many different types of spaces, but this function recognizes only the Unicode code point 0x0020. When double-byte
character set (DBCS) strings are converted to Unicode they may include space characters other than 0x0020 and the
function cannot remove such spaces. To remove all kinds of spaces, you can use the Microsoft Visual Basic .NET Trim method
in a script run from the Script component.
Syntax
TRIM(character_expression)
Arguments
character_expression
Is a character expression from which to remove spaces.
Result Types
DT_WSTR
Remarks
TRIM returns a null result if the argument is null.
TRIM works only with the DT_WSTR data type. A character_expression argument that is a string literal or a data
column with the DT_STR data type is implicitly cast to the DT_WSTR data type before TRIM performs its operation.
Other data types must be explicitly cast to the DT_WSTR data type. For more information, see Integration Services
Data Types and Cast (SSIS Expression).
Expression Examples
This example removes leading and trailing spaces from a string literal. The return result is "New York".
This example removes leading and trailing spaces from the result of concatenating the FirstName and
LastName columns. The empty string between FirstName and LastName is not removed.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns a character expression after converting lowercase characters to uppercase characters.
Syntax
UPPER(character_expression)
Arguments
character_expression
Is a character expression to convert to uppercase characters.
Result Types
DT_WSTR
Remarks
UPPER works only with the DT_WSTR data type. A character_expression argument that is a string literal or a data
column with the DT_STR data type is implicitly cast to the DT_WSTR data type before UPPER performs its
operation. Other data types must be explicitly cast to the DT_WSTR data type. For more information, see
Integration Services Data Types and Cast (SSIS Expression).
UPPER returns a null result if the argument is null.
Expression Examples
This example converts a string literal to uppercase characters. The return result is "HELLO".
UPPER("hello")
This example converts the first character in the FirstName column to an uppercase character. If FirstName is
anna, the return result is "A". For more information, see SUBSTRING (SSIS Expression).
UPPER(SUBSTRING(FirstName, 1, 1))
This example converts the value in the PostalCode variable to uppercase characters. If PostalCode is k4b1s2, the
return result is "K4B1S2".
UPPER(@PostalCode)
See Also
LOWER (SSIS Expression)
Functions (SSIS Expression)
YEAR (SSIS Expression)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns an integer that represents the year datepart of a date.
Syntax
YEAR(date)
Arguments
date
Is a date in any date format.
Result Types
DT_I4
Remarks
YEAR returns a null result if the argument is null.
A date literal must be explicitly cast to one of the date data types. For more information, see Integration Services
Data Types.
NOTE
The expression fails to validate when a date literal is explicitly cast to one of these date data types:
DT_DBTIMESTAMPOFFSET and DT_DBTIMESTAMP2.
Using the YEAR function is briefer but equivalent to using the DATEPART("Year", date) function.
Expression Examples
This example returns the number of the year in a date literal. If the date is in mm/dd/yyyy format, this example
returns "2002".
YEAR((DT_DBTIMESTAMP)"11/23/2002")
This example returns the integer that represents the year in the ModifiedDate column.
YEAR(ModifiedDate)
This example returns the integer that represents the year of the current date.
YEAR(GETDATE())
See Also
DATEADD (SSIS Expression)
DATEDIFF (SSIS Expression)
DATEPART (SSIS Expression)
DAY (SSIS Expression)
MONTH (SSIS Expression)
Functions (SSIS Expression)
Integration Services (SSIS) Event Handlers
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
At run time, executables (packages and Foreach Loop, For Loop, Sequence, and task host containers) raise
events. For example, an OnError event is raised when an error occurs. You can create custom event handlers for
these events to extend package functionality and make packages easier to manage at run time. Event handlers
can perform tasks such as the following:
Clean up temporary data storage when a package or task finishes running.
Retrieve system information to assess resource availability before a package runs.
Refresh data in a table when a lookup in a reference table fails.
Send an e-mail message when an error or a warning occurs or when a task fails.
If an event has no event handler, the event is raised to the next container up the container hierarchy in a
package. If this container has an event handler, the event handler runs in response to the event. If not, the event
is raised to the next container up the container hierarchy.
The following diagram shows a simple package that has a For Loop container that contains one Execute SQL
task.
Only the package has an event handler, for its OnError event. If an error occurs when the Execute SQL task
runs, the OnError event handler for the package runs. The following diagram shows the sequence of calls that
causes the OnError event handler for the package to execute.
Event handlers are members of an event handler collection, and all containers include this collection. If you
create the package using SSIS Designer, you can see the members of the event handler collections in the Event
Handlers folders on the Package Explorer tab of SSIS Designer.
You can configure the event handler container in the following ways:
Specify a name and description for the event handler.
Indicate whether the event handler runs, whether the package fails if the event handler fails, and the
number of errors that can occur before the event handler fails.
Specify an execution result to return instead of the actual execution result that the event handler returns
at run time.
Specify the transaction option for the event handler.
Specify the logging mode that the event handler uses.
Run-Time Events
The following table lists the event handlers that Integration Services provides, and describes the run-time
events that cause the event handler to run.
EVEN T H A N DL ER EVEN T
OnError The event handler for the OnError event. This event is
raised by an executable when an error occurs.
OnInformation The event handler for the OnInformation event. This event
is raised during the validation and execution of an
executable to report information. This event conveys
information only, no errors or warnings.
OnPostExecute The event handler for the OnPostExecute event. This event
is raised by an executable immediately after it has finished
running.
OnPreExecute The event handler for the OnPreExecute event. This event
is raised by an executable immediately before it runs.
OnPreValidate The event handler for the OnPreValidate event. This event
is raised by an executable when its validation starts.
EVEN T H A N DL ER EVEN T
OnProgress The event handler for the OnProgress event. This event is
raised by an executable when measurable progress is made
by the executable.
OnQuer yCancel The event handler for the OnQuer yCancel event. This
event is raised by an executable to determine whether it
should stop running.
OnTaskFailed The event handler for the OnTaskFailed event. This event is
raised by a task when it fails.
OnWarning The event handler for the OnWarning event. This event is
raised by an executable when a warning occurs.
Related Tasks
For information about how to add an event handler to a package, see .
Add an Event Handler to a Package
Integration Services (SSIS) Queries
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Execute SQL task, the OLE DB source, the OLE DB destination, and the Lookup transformation can use SQL
queries. In the Execute SQL task, the SQL statements can create, update, and delete database objects and data; run
stored procedures; and perform SELECT statements. In the OLE DB source and the Lookup transformation, the SQL
statements are typically SELECT statements or EXEC statements. The latter most frequently run stored procedures
that return result sets.
A query can be parsed to establish whether it is valid. When parsing a query that uses a connection to SQL Server,
the query is parsed, executed, and the execution outcome (success or failure) is assigned to the parsing outcome. If
the query uses a connection to a data other than SQL Server, the statement is parsed only.
You can provide the SQL statement in the following ways:
1. Enter it directly in the designer.
2. Specify a connection to a file contains the statement.
3. Specify a variable that contains the statement.
SQL in Variables
If the source of the SQL statement in the Execute SQL task is a variable, you provide the name of the variable that
contains the query. The Value property of the variable contains the query text. You set the ValueType property of
the variable to a string data type and then type or copy the SQL statement into the Value property. For more
information, see Integration Services (SSIS) Variables and Use Variables in Packages.
Run Runs the query. Results are displayed in the result pane.
Sor t Ascending Sorts output rows on the selected column in the grid pane, in
ascending order.
Sor t Descending Sorts output rows on the selected column in the grid pane, in
descending order.
Remove Filter Select a column name in the grid pane, and then click
Remove Filter to remove sort criteria for the column.
Quer y Definition
The query definition provides a toolbar and panes in which to define and test the query.
PA N E DESC RIP T IO N
Diagram pane Displays the query in a diagram. The diagram shows the
tables included in the query, and how they are joined. Select
or clear the check box next to a column in a table to add or
remove it from the query output.
Grid pane Displays the query in a grid. You can use this pane to add to
and remove columns from the query and change the settings
for each column.
SQL pane Displays the query as SQL text. Changes made in the
Diagram pane and the Grid pane will appear here, and
changes made here will appear in the Diagram pane and the
Grid pane.
PA N E DESC RIP T IO N
Results pane Displays the results of the query when you click Run on the
toolbar.
Integration Services Transactions
11/2/2020 • 7 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Packages use transactions to bind the database actions that tasks perform into atomic units, and by doing this
maintain data integrity. All Microsoft Integration Services container types-packages, the For Loop, Foreach Loop,
and Sequence containers, and the task hosts that encapsulate each task-can be configured to use transactions.
Integration Services provides three options for configuring transactions: NotSuppor ted , Suppor ted , and
Required .
Required indicates that the container starts a transaction, unless one is already started by its parent
container. If a transaction already exists, the container joins the transaction. For example, if a package that is
not configured to support transactions includes a Sequence container that uses the Required option, the
Sequence container would start its own transaction. If the package were configured to use the Required
option, the Sequence container would join the package transaction.
Suppor ted indicates that the container does not start a transaction, but joins any transaction started by its
parent container. For example, if a package with four Execute SQL tasks starts a transaction and all four
tasks use the Suppor ted option, the database updates performed by the Execute SQL tasks are rolled back
if any task fails. If the package does not start a transaction, the four Execute SQL tasks are not bound by a
transaction, and no database updates except the ones performed by the failed task are rolled back.
NotSuppor ted indicates that the container does not start a transaction or join an existing transaction. A
transaction started by a parent container does not affect child containers that have been configured to not
support transactions. For example, if a package is configured to start a transaction and a For Loop
container in the package uses the NotSuppor ted option, none of the tasks in the For Loop can roll back if
they fail.
You configure transactions by setting the TransactionOption property on the container. You can set this property
by using the Proper ties window in SQL Server Data Tools (SSDT), or you can set the property programmatically.
NOTE
The TransactionOption property influences whether or not the value of the IsolationLevel property requested by a
container is applied. For more information, see the description of the IsolationLevel property in the topic, Setting Package
Properties.
NOTE
To enlist a connection in a transaction, enroll the tasks that use the connection in the transaction. For more
information, see Integration Services (SSIS) Connections.
8. Repeat steps 6 and 7 for each task and container that you want to enroll in the transaction.
Configure a package to use multiple transactions
In this option, the package itself supports transactions but does not start a transaction. You configure the package
to support transactions by setting the TransactionOption property of the package to Suppor ted .
Next, you configure the desired tasks and containers inside the package to initiate or participate in transactions.
To configure a task or container to initiate a transaction, you set the TransactionOption property of that task or
container to Required .
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package you want
to configure to use transaction.s
2. In Solution Explorer, double-click the package to open it.
3. Click the Control Flow tab.
4. Right-click anywhere in the background of the control flow design surface, and then click Proper ties .
5. In the Proper ties window, set the TransactionOption property to Suppor ted .
NOTE
The package supports transactions, but the transactions are started by task or containers in the package.
6. On the design surface of the ControlFlow tab, right-click the task or the container in the package for
which you want to start a transaction, and then click Proper ties .
7. In the Proper ties window, set the TransactionOption property to Required .
8. If a transaction is started by a container, right-click the task or the container that you want to enroll in the
transaction, and then click Proper ties .
9. In the Proper ties window, set the TransactionOption property to Suppor ted .
NOTE
To enlist a connection in a transaction, enroll the tasks that use the connection in the transaction. For more
information, see Integration Services (SSIS) Connections.
10. Repeat steps 6 through 9 for each task and container that starts a transaction.
Inherited transactions
A package can run another package by using the Execute Package task. The child package, which is the package
run by the Execute Package task, may create its own package transaction, or it may inherit the parent package
transaction.
A child package inherits the parent package transaction if both of the following are true:
The package is invoked by an Execute Package task.
The Execute Package task that invoked the package also joined the parent package transaction.
Containers and tasks in the child package cannot join the parent package transaction unless the child package
itself joins the transaction.
Example of inherited transactions
In the following diagram, there are three packages that all use transactions. Each package contains multiple tasks.
To emphasize the behavior of the transactions, only the Execute Package tasks are shown. Package A runs
packages B and C. In turn, package B runs packages D and E, and package C runs package F.
Packages and tasks have the following transaction attributes:
TransactionOption is set to Required on packages A and C
TransactionOption is set to Suppor ted on packages B and D, and on the tasks Execute Package B,
Execute Package D, and Execute Package F.
TransactionOption is set to NotSuppor ted on package E, and on the tasks Execute Package C and
Execute Package E.
Only packages B, D, and F can inherit transactions from their parent packages.
Packages B and D inherit the transaction that was started by package A.
Package F inherits the transaction that was started by package C.
Packages A and C control their own transactions.
Package E does not use transactions.
External Resources
Blog entry, How to Use Transactions in SQL Server Integration Services SSIS, on www.mssqltips.com
See Also
I nherit ed Transactions
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services supports two deployment models, the project deployment model and the legacy package
deployment model. The project deployment model enables you to deploy your projects to the Integration
Services server.
For more information about the legacy package deployment model, see Legacy Package Deployment (SSIS).
NOTE
The project deployment model was introduced in SQL Server 2012 Integration Services (SSIS). With this deployment
model, you were not able to deploy one or more packages without deploying the whole project. SQL Server 2016
Integration Services (SSIS) introduced the Incremental Package Deployment feature, which lets you deploy one or more
packages without deploying the whole project.
NOTE
This article describes how to deploy SSIS packages in general, and how to deploy packages on premises. You can also
deploy SSIS packages to the following platforms:
The Microsoft Azure cloud . For more info, see Lift and shift SQL Server Integration Services workloads to the
cloud.
Linux. For more info, see Extract, transform, and load data on Linux with SSIS.
Parameters are used to assign values to package Configurations are used to assign values to package
properties. properties.
A project, containing packages and parameters, is built to a Packages (.dtsx extension) and configurations (.dtsConfig
project deployment file (.ispac extension). extension) are saved individually to the file system.
A project, containing packages and parameters, is deployed Packages and configurations are copied to the file system
to the SSISDB catalog on an instance of SQL Server. on another computer. Packages can also be saved to the
MSDB database on an instance of SQL Server.
W H EN USIN G T H E L EGA C Y PA C K A GE DEP LO Y M EN T
W H EN USIN G T H E P RO JEC T DEP LO Y M EN T M O DEL M O DEL
CLR integration is required on the database engine. CLR integration is not required on the database engine.
Environment-specific parameter values are stored in Environment-specific configuration values are stored in
environment variables. configuration files.
Projects and packages in the catalog can be validated on Packages are validated just before execution. You can also
the server before execution. You can use SQL Server validate a package with dtExec or managed code.
Management Studio, stored procedures, or managed code
to perform the validation.
Packages are executed by starting an execution on the Packages are executed using the dtExec and DTExecUI
database engine. A project identifier, explicit parameter execution utilities. Applicable configurations are identified
values (optional), and environment references (optional) are by command-prompt arguments (optional).
assigned to an execution before it is started.
During execution, events that are produced by the package During execution, events that are produced by a package
are captured automatically and saved to the catalog. You are not captured automatically. A log provider must be
can query these events with Transact-SQL views. added to the package to capture events.
Packages are run in a separate Windows process. Packages are run in a separate Windows process.
SQL Server Agent is used to schedule package execution. SQL Server Agent is used to schedule package execution.
SSISDB catalog All Integration Services objects are stored and managed on
an instance of SQL Server in a database referred to as the
SSISDB catalog. The catalog allows you to use folders to
organize your projects and environments. Each instance of
SQL Server can have one catalog. Each catalog can have
zero or more folders. Each folder can have zero or more
projects and zero or more environments. A folder in the
catalog can also be used as a boundary for permissions to
Integration Services objects.
Catalog stored procedures and views A large number of stored procedures and views can be
used to manage Integration Services objects in the catalog.
For example, you can specify values to parameters and
environment variables, create and start executions, and
monitor catalog operations. You can even see exactly which
values will be used by a package before execution starts.
Project Deployment
At the center of the project deployment model is the project deployment file (.ispac extension). The project
deployment file is a self-contained unit of deployment that includes only the essential information about the
packages and parameters in the project. The project deployment file does not capture all of the information
contained in the Integration Services project file (.dtproj extension). For example, additional text files that you
use for writing notes are not stored in the project deployment file and thus are not deployed to the catalog.
This error is typically the result of missing DCOM permissions. To fix the error, do the following:
1. Open the Component Ser vices console (or run Dcomcnfg.exe).
2. In the Component Ser vices console, expand Component Ser vices > Computers > My Computer >
DCOM Config .
3. In the list, locate Microsoft SQL Ser ver Integration Ser vices xx.0 for the version of SQL Server that
you're using. For example, SQL Server 2016 is version 13.
4. Right-click and select Proper ties .
5. In the Microsoft SQL Ser ver Integration Ser vices 13.0 Proper ties dialog box, select the Security
tab.
6. For each of the three sets of permissions - Launch and Activation, Access, and Configuration - select
Customize , then select Edit to open the Permission dialog box.
7. In the Permission dialog box, add the non-default service account and grant Allow permissions as
required. Typically, an account has Local Launch and Local Activation permissions.
8. Click OK twice, then close the Component Ser vices console.
For more info about the error described in this section and about the permissions required by the SSIS
service account, see the following blog post:
System.ComponentModel.Win32Exception: A required privilege is not held by the client while Deploying
SSIS Project
NOTE
As in earlier versions of Integration Services, in the current release you can also deploy your packages to an instance of
SQL Server and use Integration Services service to run and manage the packages. You use the package deployment
model. For more information, see Legacy Package Deployment (SSIS).
To deploy a project to the Integration Services server, complete the following tasks:
1. Create an SSISDB catalog, if you haven't already. For more information, see SSIS Catalog.
2. Convert the project to the project deployment model by running the Integration Ser vices Project
Conversion Wizard . For more information, see the following instructions: To convert a project to the
project deployment model
If you created the project in SQL Server 2014 Integration Services (SSIS) or later, by default the
project uses the project deployment model.
If you created the project in an earlier release of Integration Services, after you open the project
file in Visual Studio, convert the project to the project deployment model.
NOTE
If the project contains one or more datasources, the datasources are removed when the project
conversion is completed. To create a connection to a data source that the packages in the project can
share, add a connection manager at the project level. For more information, see Add, Delete, or Share a
Connection Manager in a Package.
Depending on whether you run the Integration Ser vices Project Conversion Wizard from
Visual Studio or from SQL Server Management Studio, the wizard performs different
conversion tasks.
If you run the wizard from Visual Studio, the packages contained in the project are
converted from Integration Services 2005, 2008, or 2008 R2 to the format that is used
by the current version of Integration Services. The original project (.dtproj) and package
(.dtsx) files are upgraded.
If you run the wizard from SQL Server Management Studio, the wizard generates a
project deployment file (.ispac) from the packages and configurations contained in the
project. The original package (.dtsx) files are not upgraded.
You can select an existing file or create a new file, in the Selection Destination page of
the wizard.
To upgrade package files when a project is converted, run the Integration Ser vices
Project Conversion Wizard from Visual Studio. To upgrade package files separately
from a project conversion, run the Integration Ser vices Project Conversion Wizard
from SQL Server Management Studio and then run the SSIS Package Upgrade
Wizard . If you upgrade the package files separately, ensure that you save the changes.
Otherwise, when you convert the project to the project deployment model, any unsaved
changes to the package are not converted.
For more information on package upgrade, see Upgrade Integration Services Packages and Upgrade
Integration Services Packages Using the SSIS Package Upgrade Wizard.
3. Deploy the project to the Integration Services server. For more information, see the instructions below:
To deploy a project to the Integration Services Server.
4. (Optional) Create an environment for the deployed project.
To convert a project to the project deployment model
1. Open the project in Visual Studio, and then in Solution Explorer, right-click the project and click
Conver t to Project Deployment Model .
-or-
From Object Explorer in Management Studio, right-click the Projects node and select Impor t
Packages .
2. Complete the wizard.
To deploy a project to the Integration Services Server
1. Open the project in Visual Studio, and then From the Project menu, select Deploy to launch the
Integration Ser vices Deployment Wizard .
or
In SQL Server Management Studio, expand the Integration Services > SSISDB node in Object Explorer,
and locate the Projects folder for the project you want to deploy. Right-click the Projects folder, and
then click Deploy Project .
or
From the command prompt, run isdeploymentwizard.exe from %ProgramFiles%\Microsoft SQL
Ser ver\130\DTS\Binn . On 64-bit computers, there is also a 32-bit version of the tool in
%ProgramFiles(x86)%\Microsoft SQL Ser ver\130\DTS\Binn .
2. On the Select Source page, click Project deployment file to select the deployment file for the
project.
or
Click Integration Ser vices catalog to select a project that has already been deployed to the SSISDB
catalog.
3. Complete the wizard.
// DataTable: name is the package name without extension and package_data is byte array of
package.
var packageTable = new DataTable();
packageTable.Columns.Add("name", typeof(string));
packageTable.Columns.Add("package_data", typeof(byte[]));
packageTable.Rows.Add("Package", packageData);
// Set the destination project and folder which is named Folder and Project.
sqlCommand.Parameters.Add(new SqlParameter("@folder_name", SqlDbType.NVarChar,
ParameterDirection.Input, "Folder", -1));
sqlCommand.Parameters.Add(new SqlParameter("@project_name", SqlDbType.NVarChar,
ParameterDirection.Input, "Project", -1));
sqlCommand.Parameters.Add(new SqlParameter("@packages_table", SqlDbType.Structured,
ParameterDirection.Input, packageTable, -1));
sqlCommand.ExecuteNonQuery();
}
}
NOTE
To convert a project to the project deployment model, use the Integration Ser vices Project Conversion Wizard .
For more information, see Integration Services Project Conversion Wizard.
NOTE
The Wizard default deployment is the Project Deployment model.
NOTE: If you see the Introduction page, click Next to switch to the Select Source page.
The settings on this page are different for each deployment model. Follow steps in the Project Deployment
Model section or Package Deployment Model section based on the model you selected in this page.
Project Deployment Model
Select Source
To deploy a project deployment file that you created, select Project deployment file and enter the path to
the .ispac file. To deploy a project that resides in the Integration Services catalog, select Integration Ser vices
catalog , and then enter the server name and the path to the project in the catalog. Click Next to see the
Select Destination page.
Select Destination
To select the destination folder for the project in the Integration Services catalog, enter the SQL Server
instance or click Browse to select from a list of servers. Enter the project path in SSISDB or click Browse to
select it. Click Next to see the Review page.
Review (and deploy )
The page allows you to review the settings you have selected. You can change your selections by clicking
Previous , or by clicking any of the steps in the left pane. Click Deploy to start the deployment process.
Results
After the deployment process is complete, you should see the Results page. This page displays the success or
failure of each action. If the action fails, click the Failed in the Result column to display an explanation of the
error. Click Save Repor t... to save the results to an XML file or Click Close to exit the wizard.
Package Deployment Model
Select Source
The Select Source page in the Integration Ser vices Deployment Wizard shows settings specific to the
package deployment model when you selected the Package Deployment option for the deployment
model .
To select the source packages, click the Browse... button to select the folder that contains the packages or
type the folder path in the Packages folder path textbox and click Refresh button at the bottom of the
page. Now, you should see all the packages in the specified folder in the list box. By default, all the packages
are selected. Click the checkbox in the first column to choose which packages you want to be deployed to
server.
Refer to the Status and Message columns to verify the status of package. If the status is set to Ready or
Warning , the deployment wizard would not block the deployment process. If the status is set to Error , the
wizard wouldn't proceed to deploy the selected packages. To view the detailed Warning or Error messages,
click the link in the Message column.
If the sensitive data or package data are encrypted with a password, type the password in the Password
column and click the Refresh button to verify whether the password is accepted. If the password is correct,
the status would change to Ready and the warning message will disappear. If there are multiple packages
with the same password, select the packages with the same encryption password, type the password in the
Password textbox and select the Apply button. The password would be applied to the selected packages.
If the status of all the selected packages is not set to Error , the Next button will be enabled so that you can
continue with the package deployment process.
Select Destination
After selecting package sources, click the Next button to switch to the Select Destination page. Packages
must be deployed to a project in the SSIS Catalog (SSISDB). Before deploying packages, ensure the
destination project already exists in the SSIS Catalog. Create an empty project if a project does not exist. In the
Select Destination page, type the server name in the Ser ver Name textbox or click the Browse... button
to select a server instance. Then click the Browse... button next to the Path textbox to specify the destination
project. If the project does not exist, click the New project... button to create an empty project as the
destination project. The project must be created under a folder.
Review and deploy
Click Next on the Select Destination page to switch to the Review page in the Integration Ser vices
Deployment Wizard . In the review page, review the summary report about the deployment action. After the
verification, click the Deploy button to perform the deployment action.
Results
After the deployment is complete, you should see the Results page. On the Results page, review results
from each step in the deployment process. Click Save Repor t to save the deployment report or Close to the
close the wizard.
IMPORTANT
For a given execution, a package can execute only with the values contained in a single server environment.
You can query views for a list of server environments, environment references, and environment variables.
You can also call stored procedures to add, delete, and modify environments, environment references, and
environment variables. For more information, see the Ser ver Environments, Ser ver Variables, and
Ser ver Environment References section in SSIS Catalog.
To create and use a server environment
1. In Management Studio, expand the Integration Services Catalogs SSISDB node in Object Explorer, and
locate the Environments folder of the project for which you want to create an environment.
2. Right-click the Environments folder, and then click Create Environment .
3. Type a name for the environment and optionally add a description. Click OK .
4. Right-click the new environment and then click Proper ties .
5. On the Variables page, do the following to add a variable.
a. Select the Type for the variable. The name of the variable does not need to match the name of
the project parameter that you map to the variable.
b. Enter an optional Description for the variable.
c. Enter the Value for the environment variable.
For information about the rules for environment variable names, see the Environment
Variable section in SSIS Catalog.
d. Indicate whether the variable contains sensitive value, by selecting or clearing the Sensitive
checkbox.
If you select Sensitive , the variable value does not display in the Value field.
Sensitive values are encrypted in the SSISDB catalog. For more information about the
encryption, see SSIS Catalog.
6. On the Permissions page, grant or deny permissions for selected users and roles by doing the
following.
a. Click Browse , and then select one or more users and roles in the Browse All Principals dialog
box.
b. In the Logins or roles area, select the user or role that you want to grant or deny permissions
for.
c. In the Explicit area, select Grant or Deny next to each permission.
7. To script the environment, click Script . By default, the script displays in a new Query Editor window.
TIP
You need to click Script after you've made one or changes to the environment properties, such as adding a
variable, and before you click OK in the Environment Proper ties dialog box. Otherwise, a script is not
generated.
TIP
You can easily generate the Transact-SQL statements for the stored procedures listed in the procedure below, with the
exception of catalog.deploy_project, by doing the following:
1. In SQL Server Management Studio, expand the Integration Ser vices Catalogs node in Object Explorer and
navigate to the package you want to execute.
2. Right-click the package, and then click Execute .
3. As needed, set parameters values, connection manager properties, and options in the Advanced tab such as
the logging level.
For more information about logging levels, see Enable Logging for Package Execution on the SSIS Server.
4. Before clicking OK to execute the package, click Script . The Transact-SQL appears in a Query Editor window in
SQL Server Management Studio.
2. Call catalog.create_execution (SSISDB Database) to create an instance of the package execution, and
optionally call catalog.set_execution_parameter_value (SSISDB Database) to set runtime parameter
values.
In the following example, catalog.create_execution creates an instance of execution for package.dtsx
that is contained in the SSISPackage_ProjectDeployment project. The project is located in the SSIS
Packages folder. The execution_id returned by the stored procedure is used in the call to
catalog.set_execution_parameter_value. This second stored procedure sets the LOGGING_LEVEL
parameter to 3 (verbose logging) and sets a package parameter named Parameter1 to a value of 1.
For parameters such as LOGGING_LEVEL the object_type value is 50. For package parameters the
object_type value is 30.
Select @execution_id
DECLARE @var0 smallint = 3
EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id, @object_type=50,
@parameter_name=N'LOGGING_LEVEL', @parameter_value=@var0
GO
Select @execution_id
DECLARE @var0 smallint = 3
EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id, @object_type=50,
@parameter_name=N'LOGGING_LEVEL', @parameter_value=@var0
NOTE
The Locate Packages page is available only when you run the wizard from Management Studio.
The following option displays on the page when you select File system in the Source drop-down list. Select
this option when the package is resides in the file system.
Folder
Type the package path, or navigate to the package by clicking Browse .
The following options display on the page when you select SSIS Package Store in the Source drop-down
list. For more information about the package store, see Package Management (SSIS Service).
Ser ver
Type the server name or select the server.
Folder
Type the package path, or navigate to the package by clicking Browse .
The following options display on the page when you select Microsoft SQL Ser ver in the Source drop-
down list. Select this option when the package resides in Microsoft SQL Server.
Ser ver
Type the server name or select the server.
Use Windows authentication
Microsoft Windows Authentication mode allows a user to connect through a Windows user account. If you
use Windows Authentication, you do not need to provide a user name or password.
Use SQL Ser ver authentication
When a user connects with a specified login name and password from a non-trusted connection, SQL Server
authenticates the connection by checking to see if a SQL Server login account has been set up and if the
specified password matches the one previously recorded. If SQL Server does not have a login account set,
authentication fails, and the user receives an error message.
User name
Specify a user name when you are using SQL Server Authentication.
Password
Provide the password when you are using SQL Server Authentication.
Folder
Type the package path, or navigate to the package by clicking Browse .
Set Options on the Select Packages Page
Package Name
Lists the package file.
Status
Indicates whether a package is ready to convert to the project deployment model.
Message
Displays a message associated with the package.
Password
Displays a password associated with the package. The password text is hidden.
Apply to selection
Click to apply the password in the Password text box, to the selected package or packages.
Refresh
Refreshes the list of packages.
Set Options on the Select Destination Page
On this page, specify the name and path for a new project deployment file (.ispac) or select an existing file.
NOTE
The Select Destination page is available only when you run the wizard from Management Studio.
Output path
Type the path for the deployment file or navigate to the file by clicking Browse .
Project name
Type the project name.
Protection level
Select the protection level. For more information, see Access Control for Sensitive Data in Packages.
Project description
Type an optional description for the project.
Set Options on the Specify Project Properties Page
NOTE
The Specify Project Proper ties page is available only when you run the wizard from Visual Studio.
Project name
Lists the project name.
Protection level
Select a protection level for the packages contained in the project. For more information about protection
levels, see Access Control for Sensitive Data in Packages.
Project description
Type an optional project description.
Set Options on the Update Execute Package Task Page
Update Execute Package Tasks contain in the packages, to use a project-based reference. For more
information, see Execute Package Task Editor.
Parent Package
Lists the name of the package that executes the child package using the Execute Package task.
Task name
Lists the name of the Execute Package task.
Original reference
Lists the current path of the child package.
Assign reference
Select a child package stored in the project.
Set Options on the Select Configurations Page
Select the package configurations that you want to replace with parameters.
Package
Lists the package file.
Type
Lists the type of configuration, such as an XML configuration file.
Configuration String
Lists the path of the configuration file.
Status
Displays a status message for the configuration. Click the message to view the entire message text.
Add Configurations
Add package configurations contained in other projects to the list of available configurations that you want to
replace with parameters. You can select configurations stored in a file system or stored in SQL Server.
Refresh
Click to refresh the list of configurations.
Remove configurations from all packages after conversion
It is recommended that you remove all configurations from the project by selecting this option.
If you don't select this option, only the configurations that you selected to replace with parameters are
removed.
Set Options on the Create Parameters Page
Select the parameter name and scope for each configuration property.
Package
Lists the package file.
Parameter Name
Lists the parameter name.
Scope
Select the scope of the parameter, either package or project.
Set Options on the Configure Parameters Page
Name
Lists the parameter name.
Scope
Lists the scope of the parameter.
Value
Lists the parameter value.
Click the ellipsis button next to the value field to configure the parameter properties.
In the Set Parameter Details dialog box, you can edit the parameter value. You can also specify whether the
parameter value must be provided when you run the package.
You can modify value in the Parameters page of the Configure dialog box in Management Studio, by
clicking the browse button next to the parameter. The Set Parameter Value dialog box appears.
The Set Parameter Details dialog box also lists the data type of the parameter value and the origin of the
parameter.
Set the Options on the Review page
Use the Review page to confirm the options that you've selected for the conversion of the project.
Previous
Click to change an option.
Conver t
Click to convert the project to the project deployment model.
Set the Options on the Perform Conversion
The Perform Conversion page shows status of the project conversion.
Action
Lists a specific conversion step.
Result
Lists the status of each conversion step. Click the status message for more information.
The project conversion is not saved until the project is saved in Visual Studio.
Save repor t
Click to save a summary of the project conversion in an .xml file.
Legacy Package Deployment (SSIS)
11/2/2020 • 31 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SQL Server Integration Services includes tools and wizards that make it simple to deploy packages from the
development computer to the production server or to other computers.
There are four steps in the package deployment process:
1. The first step is optional and involves creating package configurations that update properties of
package elements at run time. The configurations are automatically included when you deploy the
packages.
2. The second step is to build the Integration Services project to create a package deployment utility. The
deployment utility for the project contains the packages that you want to deploy
3. The third step is to copy the deployment folder that was created when you built the Integration
Services project to the target computer.
4. The fourth step is to run, on the target computer, the Package Installation Wizard to install the packages
to the file system or to an instance of SQL Server.
Package Configurations
SQL Server Integration Services provides package configurations that you can use to update the values of
properties at run time.
NOTE: Configurations are available for the package deployment model. Parameters are used in place of
configurations for the project deployment model. The project deployment model enables you to deploy
Integration Services projects to the Integration Services server. For more information about the
deployment models, see Deployment of Projects and Packages.
A configuration is a property/value pair that you add to a completed package. Typically, you create a package
set properties on the package objects during package development, and then add the configuration to the
package. When the package runs, it gets the new values of the property from the configuration. For example,
by using a configuration, you can change the connection string of a connection manager, or update the value
of a variable.
Package configurations provide the following benefits:
Configurations make it easier to move packages from a development environment to a production
environment. For example, a configuration can update the path of a source file, or change the name of
a database or server.
Configurations are useful when you deploy packages to many different servers. For example, a variable
in the configuration for each deployed package can contain a different disk space value, and if the
available disk space does not meet this value, the package does not run.
Configurations make packages more flexible. For example, a configuration can update the value of a
variable that is used in a property expression.
Integration Services supports several different methods of storing package configurations, such as XML files,
tables in a SQL Server database, and environment and package variables.
Each configuration is a property/value pair. The XML configuration file and SQL Server configuration types
can include multiple configurations.
The configurations are included when you create a package deployment utility for installing packages. When
you install the packages, the configurations can be updated as a step in the package installation.
Understanding How Package Configurations Are Applied at Run Time
When you use the dtexec command prompt utility (dtexec.exe) to run a deployed package, the utility applies
package configurations twice. The utility applies configurations both before and after it applies the options
that you specified on command line.
As the utility loads and runs the package, events occur in the following order:
1. The dtexec utility loads the package.
2. The utility applies the configurations that were specified in the package at design time and in the order
that is specified in the package. (The one exception to this is the Parent Package Variables
configurations. The utility applies these configurations only once and later in the process.)
3. The utility then applies any options that you specified on the command line.
4. The utility then reloads the configurations that were specified in the package at design time and in the
order specified in the package. (Again, the exception to this rule is the Parent Package Variables
configurations). The utility uses any command-line options that were specified to reload the
configurations. Therefore, different values might be reloaded from a different location.
5. The utility applies the Parent Package Variable configurations.
6. The utility runs the package.
The way in which the dtexec utility applies configurations affects the following command-line options:
You can use the /Connection or /Set option at run time to load package configurations from a
location other than the location that you specified at design time.
You can use the /ConfigFile option to load additional configurations that you did not specify at design
time.
However, these command-line options do have some restrictions:
You cannot use the /Set or the /Connection option to override single values that are also set by a
configuration.
You cannot use the /ConfigFile option to load configurations that replace the configurations that you
specified at design time.
For more information about these options, and how the behavior of these options differs between SQL Server
2017 Integration Services (SSIS) and earlier versions, see Behavior Changes to Integration Services Features
in SQL Server 2016.
Package Configuration Types
The following table describes the package configuration types.
XML configuration file An XML file contains the configurations. The XML file can
include multiple configurations.
TYPE DESC RIP T IO N
Parent package variable A variable in the package contains the configuration. This
configuration type is typically used to update properties in
child packages.
\<?xml version="1.0"?>
<DTSConfiguration>
<DTSConfigurationHeading>
<DTSConfigurationFileInfo
GeneratedBy="DomainName\UserName"
GeneratedFromPackageName="Package"
GeneratedFromPackageID="{2AF06766-817A-4E28-9878-0DE37A150648}"
GeneratedDate="2/01/2005 5:58:09 PM"/>
</DTSConfigurationHeading>
<Configuration ConfiguredType="Property" Path="\Package.Variables[User::MyVar].Value"
ValueType="Int32">
<ConfiguredValue>0</ConfiguredValue>
</Configuration>
</DTSConfiguration>
Registry Entry
If you want to use a Registry entry to store the configuration, you can either use an existing key or create a
new key in HKEY_CURRENT_USER. The Registry key that you use must have a value named Value . The value
can be a DWORD or a string.
If you select the Registr y entr y configuration type, you type the name of the Registry key in the Registry
entry box. The format is <registry key>. If you want to use a Registry key that is not at the root of
HKEY_CURRENT_USER, use the format <Registry key\registry key\...> to identify the key. For example, to use
the MyPackage key located in SSISPackages, type SSISPackages\MyPackage .
SQL Server
If you select the SQL Ser ver configuration type, you specify the connection to the SQL Server database in
which you want to store the configurations. You can save the configurations to an existing table or create a
new table in the specified database.
The following SQL statement shows the default CREATE TABLE statement that the Package Configuration
Wizard provides.
The name that you provide for the configuration is the value stored in the ConfigurationFilter column.
Direct and Indirect Configurations
Integration Services provides direct and indirect configurations. If you specify configurations directly,
Integration Services creates a direct link between the configuration item and the package object property.
Direct configurations are a better choice when the location of the source does not change. For example, if you
are sure that all deployments in the package use the same file path, you can specify an XML configuration file.
Indirect configurations use environment variables. Instead of specifying the configuration setting directly, the
configuration points to an environment variable, which in turn contains the configuration value. Using indirect
configurations is a better choice when the location of the configuration can change for each deployment of a
package.
You can also access the Package Configuration Organizer by clicking the ellipsis button next to the
Configuration property. The Configuration property appears in the properties window for the package.
Configurations are available for the package deployment model. Parameters are used in place of
configurations for the project deployment model. The project deployment model enables you to deploy
Integration Services projects to the Integration Services server. For more information about the
deployment models, see Deployment of Projects and Packages.
In the Package Configuration Organizer dialog box, you can enable packages to use configurations,
add and delete configurations, and set the preferred order in which configurations should be loaded.
When package configurations load in the preferred order, configurations load from the top of the list
shown in the Package Configuration Organizer dialog box to the bottom of the list. However, at run
time, package configurations might not load in the preferred order. In particular, parent package
configurations load after configurations of other types.
If multiple configurations set the same object property, the value loaded last is used at run time.
From the Package Configuration Organizer dialog box, you run the Package Configuration Wizard, which
guides you through the steps to create a configuration. To run the Package Configuration Wizard, add a new
configuration in the Package Configurations Organizer dialog box or edit an existing one. On the wizard
pages, you choose the configuration type, select whether you want to access the configuration directly or use
environment variables, and select the properties to save in the configuration.
The following example shows the target properties of a variable and a package as they appear on the
Completing the Wizard page of the Package Configuration Wizard.:
\Package.Variables[User::TodaysDate].Properties[RaiseChangedEvent]
\Package.Properties[MaximumErrorCount]
\Package.Properties[LoggingMode]
\Package.Properties[LocaleID]
\Package\My SQL Task.Variables[User::varTableName].Properties[Value]
In this example, the configuration updates these properties:
The RaiseChangedEvent property of user-defined variable, TodaysDate .
The MaximumErrorCount, LoggingMode, and LocaleID properties of the package.
The Value property of user-defined variable, varTableName , within scope of the task, My SQL Task.
The "\Package" represents the root, and periods (.) separate the objects that define the path to the property
that the configuration updates. The names of variables and properties are enclosed in brackets. The term
Package is always used in configuration, regardless of the package name; however, all other objects in the path
use their user-defined names.
After the wizard finishes, the new configuration is added to the configuration list in the Package
Configuration Organizer dialog box.
NOTE: The last page in the Package Configuration Wizard, Completing the Wizard, lists the target
properties in the configuration. If you want to update properties when you run packages by using the
dtexec command prompt utility, you can generate the strings that represent the property paths by
running the Package Configuration Wizard and then copy and paste them into the command prompt
window for use with the set option of dtexec.
The following table describes the columns in the configuration list in the Package Configuration
Organizer dialog box.
C O L UM N DESC RIP T IO N
Target Object The name of the object with a property that has a
configuration. If the configuration is an XML configuration
file, the column is blank, because the configuration can
update multiple objects.
8. On the Select Properties to Export page, select the properties of package objects to include in the
configuration. If the configuration type supports only one property, the title of this wizard page is
Select Target Property. For more information, see .
Package Conf iguration Wizard UI Ref erence
NOTE: Only the XML Configuration File and SQL Ser ver configuration types support including
multiple properties in a configuration.
9. On the Completing the Wizard page, type the name of the configuration, and then click Finish .
10. View the configuration in the Package Configuration Organizer dialog box.
11. Click Close .
NOTE: Configurations are available for the package deployment model. Parameters are used in place of
configurations for the project deployment model. The project deployment model enables you to deploy
Integration Services projects to the Integration Services server. For more information about the
deployment models, see Deployment of Projects and Packages.
If multiple configurations update the same property, values from configurations listed lower in the
configuration list will replace values from configurations higher in the list. The last value loaded into the
property is the value that is used when the package runs. Also, if the package uses a combination of direct
configuration such as an XML configuration file and an indirect configuration such as an environment
variable, the indirect configuration that points to the location of the direct configuration must be higher in the
list.
NOTE: When package configurations load in the preferred order, configurations load from the top of the
list shown in the Package Configuration Organizer dialog box to the bottom of the list. However, at
run time, package configurations might not load in the preferred order. In particular, Parent Package
Configurations load after configurations of other types.
Package configurations update the values of properties of package objects at run time. When a package is
loaded, the values from the configurations replace the values that were set when the package was developed.
Integration Services supports different configuration types. For example, you can use an XML file that can
contain multiple configurations, or an environment variable that contains a single configuration. For more
information, see .
Package Conf igurations
Options
Enable package configurations
Select to use configurations with the package.
Configuration Name
View the name of the configuration.
Configuration Type
View the type of the location where configurations are stored.
Configuration String
View the location where the configuration values are stored. The location can be the path of a file, the name of
an environment variable, the name of a parent package variable, a Registry key, or the name of a SQL Server
table.
Target Object
View the name of the object that the configuration updates. If the configuration is an XML configuration file or
a SQL Server table, the column is blank because the configuration can include multiple objects.
Target Proper ty
View the name of the property modified by the configuration. This column is blank if the configuration type
supports multiple configurations.
Add
Add a configuration by using the Package Configuration Wizard.
Edit
Edit an existing configuration by rerunning the Package Configuration Wizard.
Remove
Select a configuration, and then click Remove .
Arrows
Select a configuration and use the up and down arrows to move it up or down in the list. Configurations are
loaded in the sequence in which they appear in the list.
NOTE: Configurations are available for the package deployment model. Parameters are used in place of
configurations for the project deployment model. The project deployment model enables you to deploy
Integration Services projects to the Integration Services server. For more information about the
deployment models, see Deployment of Projects and Packages.
Static Options
Configuration type
Select the type of source in which to store the configuration, using the following options:
VA L UE DESC RIP T IO N
XML configuration file Store the configuration as an XML file. Selecting this value
displays the dynamic options in the section,
Configuration Type .
Registr y entr y Store the configuration in the Registry. Selecting this value
displays the dynamic options in the section,
Configuration Type .
Parent package variable Store the configuration as a variable in the package that
contains the task. Selecting this value displays the dynamic
options in the section, Configuration Type .
SQL Ser ver Store the configuration in a table in SQL Server. Selecting
this value displays the dynamic options in the section,
Configuration Type .
Next
View the next page in the wizard sequence.
Dynamic Options
C o n fi g u r a t i o n T y p e O p t i o n = X M L C o n fi g u r a t i o n F i l e
VA L UE DESC RIP T IO N
Configuration file name Type the path of the configuration file that the wizard
generates.
C o n fi g u r a t i o n T y p e O p t i o n = En v i r o n m e n t Va r i a b l e
Environment variable
Select the environment variable that contains the configuration information.
C o n fi g u r a t i o n T y p e O p t i o n = R e g i st r y En t r y
VA L UE DESC RIP T IO N
Registr y entr y Type the Registry key that contains the configuration
information. The format is <registry key>.
VA L UE DESC RIP T IO N
C o n fi g u r a t i o n T y p e O p t i o n = P a r e n t P a c k a g e Va r i a b l e
VA L UE DESC RIP T IO N
Parent variable Specify the variable in the parent package that contains the
configuration information.
VA L UE DESC RIP T IO N
C o n fi g u r a t i o n T y p e O p t i o n s = SQ L Se r v e r
VA L UE DESC RIP T IO N
VA L UE DESC RIP T IO N
It is not necessary to create the variable in the parent package before you create the package configuration in
the child package. You can add the variable to the parent package at any time, but you must use the exact
name of the parent variable in the package configuration. However, before you can create a parent variable
configuration, there must be an existing variable in the child package that the configuration can update. For
more information about adding and configuring variables, see Add, Delete, Change Scope of User-Defined
Variable in a Package.
The scope of the variable in the parent package that is used in a parent variable configuration can be set to the
Execute Package task, to the container that has the task, or to the package. If multiple variables with the same
name are defined in a package, the variable that is closest in scope to the Execute Package task is used. The
closest scope to the Execute Package task is the task itself.
To add a variable to a parent package
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package to
which you want to add a variable to pass to a child package.
2. In Solution Explorer, double-click the package to open it.
3. In SSIS Designer, to define the scope of the variable, do one of the following:
To set the scope to the package, click anywhere on the design surface of the Control Flow tab.
To set the scope to a parent container of the Execute Package task, click the container.
To set the scope to the Execute Package task, click the task.
4. Add and configure a variable.
NOTE
Select a data type that is compatible with the data that the variable will store.
5. To save the updated package, click Save Selected Items on the File menu.
To add a variable to a child package
1. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package to
which you want to add a parent variable configuration.
2. In Solution Explorer, double-click the package to open it.
3. In SSIS Designer, to set the scope to the package, click anywhere on the design surface of the Control
Flow tab.
4. Add and configure a variable.
NOTE
Select a data type that is compatible with the data that the variable will store.
5. To save the updated package, click Save Selected Items on the File menu.
Create a Deployment Utility
The first step in deploying packages is to create a deployment utility for an Integration Services project. The
deployment utility is a folder that contains the files you need to deploy the packages in an Integration Services
project on a different server. The deployment utility is created on the computer on which the Integration
Services project is stored.
You create a package deployment utility for an Integration Services project by first configuring the build
process to create a deployment utility, and then building the project. When you build the project, all packages
and package configurations in the project are automatically included. To deploy additional files such as a
Readme file with the project, place the files in the Miscellaneous folder of the Integration Services project.
When the project is built, these files are also automatically included.
You can configure each project deployment differently. Before you build the project and create the package
deployment utility, you can set the properties on the deployment utility to customize the way the packages in
the project will be deployed. For example, you can specify whether package configurations can be updated
when the project is deployed. To access the properties of an Integration Services project, right-click the project
and click Proper ties .
The following table lists the deployment utility properties.
When you build an Integration Services project, a manifest file, <project name>.SSISDeploymentManifest.xml,
is created and added, together with copies of the project packages and package dependencies, to the
bin\Deployment folder in the project, or to the location specified in the DeploymentOutputPath property. The
manifest file lists the packages, the package configurations, and any miscellaneous files in the project.
The content of the deployment folder is refreshed every time that you build the project. This means that any
file saved to this folder that is not copied to the folder again by the build process will be deleted. For example,
package configuration files saved to the deployment folders will be deleted.
To create a package deployment utility
1. In SQL Server Data Tools (SSDT), open the solution that contains the Integration Services project for
which you want to create a package deployment utility.
2. Right-click the project and click Proper ties .
3. In the <project name> Proper ty Pages dialog box, click Deployment Utility .
4. To update package configurations when packages are deployed, set AllowConfigurationChanges to
True .
5. Set CreateDeploymentUtility to True .
6. Optionally, update the location of the deployment utility by modifying the DeploymentOutputPath
property.
7. Click OK .
8. In Solution Explorer, right-click the project, and then click Build .
9. View the build progress and build errors in the Output window.
You use the Package Installation Wizard to install the packages. To launch the wizard, double-click the
deployment utility file after you have copied the deployment folder to the server. This file is named <project
name>.SSISDeploymentManifest, and can be found in the deployment folder on the destination computer.
NOTE
Depending on the version of the package that you are deploying, you might encounter an error if you have different
versions of SQL Server installed side-by-side. This error can occur because the .SSISDeploymentManifest file name
extension is the same for all versions of Integration Services. Double-clicking the file calls the installer (dtsinstall.exe) for
the most recently installed version of Integration Services, which might not be the same version as the deployment
utility file. To work around this problem, run the correct version of dtsinstall.exe from the command line, and provide
the path of the deployment utility file.
The Package Installation Wizard guides you through the steps to install packages to the file system or to SQL
Server. You can configure the installation in the following ways:
Choosing the location type and location to install the packages.
Choosing location to install package dependencies.
Validating the packages after they are installed on the target server.
The file-based dependencies for packages are always installed to the file system. If you install a package to the
file system, the dependencies are installed in the same folder as the one that you specify for the package. If
you install a package to SQL Server, you can specify the folder in which to store the file-based dependencies.
If the package includes configurations that you want to modify for use on the destination computer, you can
update the values of the properties by using the wizard.
In addition to installing packages by using the Package Installation Wizard, you can copy and move packages
by using the dtutil command prompt utility. For more information, see dtutil Utility.
To deploy packages to an instance of SQL Server
1. Open the deployment folder on the target computer.
2. Double-click the manifest file, <project name>.SSISDeploymentManifest, to start the Package
Installation Wizard.
3. On the Deploy SSIS Packages page, select the SQL Ser ver deployment option.
4. Optionally, select Validate packages after installation to validate packages after they are installed
on the target server.
5. On the Specify Target SQL Ser ver page, specify the instance of SQL Server to install the packages to
and select an authentication mode. If you select SQL Server Authentication, you must provide a user
name and a password.
6. On the Select Installation Folder page, specify the folder in the file system for the package
dependencies that will be installed.
7. If the package includes configurations, you can edit configurations by updating values in the Value list
on the Configure Packages page.
8. If you elected to validate packages after installation, view the validation results of the deployed
packages.
Redeployment of Packages
After a project is deployed, you may need to update or extend package functionality and then redeploy the
Integration Services project that contains the updated packages. As part of the process of redeploying
packages, you should review the configuration properties that are included in the deployment utility. For
example, you may not want to allow configuration changes after the package is redeployed.
Process for Redeployment
After you finish updating the packages, you rebuild the project, copy the deployment folder to the target
computer, and then rerun the Package Installation Wizard.
If you update only a few packages in the project, you may not want to redeploy the entire project. To deploy
only a few packages, you can create a new Integration Services project, add the updated packages to the new
project, and then build and deploy the project. Package configurations are automatically copied with the
package when you add the package to a different project.
Path
View the path of the property to be configured.
Type
View the data type of the property.
Value
Specify the value of the configuration.
Next
Go to the next page in the wizard.
Finish
Skip to the Finish the Package Installation Wizard page. Use this option if you have backtracked through the
wizard pages to revise your choices and have specified all of the required options.
Confirm Installation Page
Use the Confirm Installation page to start the installation of packages, to view the status, and to view the
information that the wizard will use to install files from the specified project.
Next
Install the packages and their dependencies and go to the next wizard page when installation is completed.
Status
Shows the progress of the package installation.
Finish
Go to the Finish the Package Installation Wizard page. Use this option if you have backtracked through the
wizard pages to revise your choices and have specified all the required options.
Deploy SSIS Packages Page
Use the Deploy SSIS Packages page to specify where to install Integration Services packages and their
dependencies.
Options
File system deployment
Deploy packages and dependencies in a specified folder in the file system.
SQL Ser ver deployment
Deploy packages and dependencies in an instance of SQL Server. Use this option if SQL Server shares
packages between servers. Any package dependencies are installed in the specified folder in the file system.
Validate packages after installation
Indicate whether to validate packages after installation.
Next
Go to the next page in the wizard.
Finish
Skip to the Finish the Package Installation Wizard page. Use this option if you have backtracked through the
wizard pages to revise your choices and have specified all of the required options.
Packages Validation Page
Use the Packages Validation page to view the progress and results of the package validation.
Next
Go to the next page in the wizard.
Select Installation Folder Page
Use the Select Installation Folder page to specify the file system folder in which to install the packages and
their dependencies.
Options
Folder
Specify the path and folder in which to copy the package and its dependencies.
Browse
Browse to the target folder by using the Browse For Folder dialog box.
Next
Go to the next page in the wizard.
Finish
Skip to the Finish the Package Installation Wizard page. Use this option if you have backtracked through the
wizard pages to revise your choices and if have specified all of the required options.
Specify Target SQL Server Page
Use the Specify Target SQL Ser ver page to specify options for deploying the package to an instance of SQL
Server.
Options
Ser ver name
Specify the name of the server to deploy the packages to.
Use Windows Authentication
Specify whether to use Windows Authentication to log on to the server. Windows Authentication is
recommended for better security.
Use SQL Ser ver Authentication
Specify whether the package should use SQL Server Authentication to log on to the server. If you use SQL
Server Authentication, you must provide a user name and password.
User name
Specify a user name.
Password
Specify a password.
Package path
Specify the name of the logical folder, or enter "/" for the default folder.
To select the folder in the SSIS Package dialog box, click browse (...). However, the dialog box does not
provide a means to select the default folder. If you want to use the default folder, you have to enter "/" in the
text box.
NOTE
If you do not enter a valid package path, the following error message appears: "One or more arguments are invalid."
Rely on ser ver storage for encr yption
Select to use security features of the Database Engine to help secure the packages.
Next
Go to the next page in the wizard.
Finish
Skip to the Finish the Package Installation Wizard page. Use this option if you have backtracked through the
wizard pages to revise your choices and have specified all of the required options.
Finish the Package Installation Page
Use the Finish the Package Installation Wizard page to view a summary of the package installation
results. This page provides details such as the name of the deployed Integration Services project, the packages
that were installed, the configuration files, and the installation location.
Finish
Exit the wizard by clicking Finish .
Run Integration Services (SSIS) Packages
11/2/2020 • 7 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To run an Integration Services package, you can use one of several tools depending on where those packages are
stored. The tools are listed in the table below.
NOTE
This article describes how to run SSIS packages in general, and how to run packages on premises. You can also run SSIS
packages on the following platforms:
The Microsoft Azure cloud . For more info, see Lift and shift SQL Server Integration Services workloads to the cloud
and Run an SSIS package in Azure.
Linux. For more info, see Extract, transform, and load data on Linux with SSIS.
To store a package on the Integration Services server, you use the project deployment model to deploy the project
to the server. For information, see Deploy Integration Services (SSIS) Projects and Packages.
To store a package in the SSIS Package store, the msdb database, or in the file system, you use the package
deployment model. For more information, see Legacy Package Deployment (SSIS).
PA C K A GES T H AT A RE
PA C K A GES T H AT A RE PA C K A GES T H AT A RE STO RED IN T H E F IL E
STO RED O N T H E STO RED IN T H E SSIS SY ST EM , O UT SIDE O F T H E
IN T EGRAT IO N SERVIC ES PA C K A GE STO RE O R IN T H E LO C AT IO N T H AT IS PA RT O F
TO O L SERVER M SDB DATA B A SE T H E SSIS PA C K A GE STO RE
See Also
dtexec Utility
Start the SQL Server Import and Export Wizard
Execute Package Utility (dtexecui)
11/2/2020 • 10 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Execute Package Utility to run Integration Services packages. The utility runs packages that are stored in
one of three locations: Microsoft SQL Server database, the SSIS Package Store, and the file system. This user
interface, which can be opened from SQL Server Management Studio or by typing dtexecui at a command
prompt, is an alternative to running packages by using the DTExec command prompt tool.
Packages execute in the same process as the dtexecui.exe utility. Because this utility is a 32-bit tool, packages run
by using dtexecui.exe in a 64-bit environment run in Windows on Win32 (WOW). When developing and testing
commands by using the dtexecui.exe utility on a 64-bit computer, you should test the commands in 64-bit mode by
using the 64-bit version of dtexec.exe before deploying or scheduling the commands on a production server.
The Execute Package Utility is a graphical user interface for the DTExec command prompt tool. The user
interface makes it easy to configure options and it automatically assembles the command line that is passed to the
DTExec command prompt tool when you run the package from the specified options.
The Execute Package Utility can also be used to assemble command lines that you use when running DTExec
directly.
To open Execute Package Utility in SQL Server Management Studio
1. In SQL Server Management Studio, on the View menu, click Object Explorer .
2. In Object Explorer, click Connect , and then click Integration Ser vices .
3. In the Connect to Ser ver dialog box, enter the server name in the Ser ver name list, and then click
Connect .
4. Expand the Stored Package s folder and subfolders, right-click the package you want to run, and then click
Run Package .
To open the Execute Package Utility at the Command Prompt
In a command prompt window, run dtexecui .
The following sections describe pages of the Execute Package Utility dialog box.
General Page
Use the General page of the Execute Package Utility dialog box to specify a package name and location.
The Execute Package utility (dtexecui.exe) always runs a package on the local computer, even if the package is saved
on a remote server. If the remote package uses configuration files that also are saved on the remote server, then
the Execute Package utility may not locate the configurations and the package fails. To avoid this problem, the
configurations must be referenced by using a Universal Naming Convention (UNC) share name like
\\myserver\myfile.
Static Options
Package source
Specify the location of the package to run, using the following options:
VA L UE DESC RIP T IO N
SQL Ser ver Select this option when the package resides in Microsoft SQL
Server. Specify an instance of SQL Server and provide a user
name and password for SQL Server Authentication. Each user
name and password adds the /USER username and
/PASSWORD password options to the command prompt.
File system Select this option when the package resides in the file system.
SSIS Package Store Select this option when the package resides in the SSIS
Package Store.
IMPORTANT
When possible, use Windows Authentication.
Package
Type the name of the package, or click the ellipsis button (...) to locate a package using the Select an SSIS
Package dialog box.
Package Source = File System
Package
Type the name of the package, or click the ellipsis button (...) to locate a package using the Open dialog box. By
default, the dialog box lists only files that have the .dtsx extension.
Package Source = SSIS Package Store
Ser ver
Type the name of the computer where the package resides, or select a computer from the list.
Log on to the ser ver
Specify whether the package should use Microsoft Windows Authentication to connect to the package source.
Windows Authentication is recommended for better security. With Windows Authentication you do not have to
specify a user name and password.
Use Windows Authentication
Select this option to use Windows Authentication and log on using a Microsoft Windows user account.
Use SQL Ser ver Authentication
This option is not available when you run a package stored in the SSIS Package Store .
Package
Type the name of the package, or click the ellipsis button (...) to locate a package using the Select an SSIS
Package dialog box.
Configurations Page
Use the Configurations page of the Execute Package Utility dialog box to select the configuration files to load
at run time, and to specify the order in which they load.
Options
Configuration files
Lists the configurations that the package uses. Each configuration file adds a /CONFIGFILE filename option to
the command prompt.
Arrow keys
Select a configuration file in the list, and use the arrow keys at right to change the loading order. Configurations
load in order starting from the top of the list.
NOTE
If multiple configurations modify the same property, the configuration that loads last is used.
Add
Click to add configurations using the Open dialog box. By default, the dialog box lists only files that have the
.dtsconfig extension.
Remove
Select a configuration file in the list and then click Remove .
Execute
Click to run the package.
Close
Click to close the Execute Package Utility dialog box.
Reporting Page
Use the Repor ting page of the Execute Package Utility dialog box to specify the events and information about
the package to log to the console when the package runs.
Options
Console events
Indicate the events and types of messages to report.
None
Select for no reporting.
Errors
Select to report error messages.
Warnings
Select to report warning messages.
Custom Events
Select to report custom event messages.
Pipeline Events
Select to report data flow events messages.
Information
Select to report information messages.
Verbose
Select to use verbose reporting.
Console logging
Specify the information that you want written to the log when the selected event occurs.
Name
Select to report the name of the person who created the package.
Computer
Select to report the name of the computer the package is running on.
Operator
Select to report the name of the person who started the package.
Source name
Select to report the package name.
Source GUID
Select to report the package GUID.
Execution GUID
Select to report the GUID of the package execution instance.
Message
Select to report messages.
Star t time and end time
Select to report when the package began and finished.
Execute
Click to run the package.
Close
Click to close the Execute Package Utility dialog box.
Logging Page
Use the Logging page of the Execute Package Utility dialog box to make log providers available to the package
at run time. Provide the package log provider type and the connection string for connecting to the log. Each log
provider entry adds a /LOGGER classid option to the command prompt.
Options
Log Provider
Select a log provider from the list.
Configuration String
Select the name of the connection manager from the package that points to the log location, or type the connection
string for connecting to the log provider.
Remove
Select a log provider and click to remove it.
Execute
Click to run the package.
Close
Click to close the Execute Package Utility dialog box.
Verification Page
Use the Verification page of the Execute Package dialog box to set criteria for verifying the package.
Options
Execute only signed packages
Select to execute only packages that have been signed.
Verify package build
Select to verify the package build.
Build
Specify the sequential Build number associated with the build.
Verify package ID
Select to verify the package ID.
Package ID
Specify the package identification number.
Verify version ID
Select to verify the version ID.
Version ID
Specify the version identification number.
Execute
Click to run the package.
Close
Click to close the Execute Package Utility dialog box.
See Also
dtexec Utility
dtexec Utility
11/2/2020 • 28 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The dtexec command prompt utility is used to configure and execute SQL Server Integration Services
packages. The dtexec utility provides access to all the package configuration and execution features, such as
parameters, connections, properties, variables, logging, and progress indicators. The dtexec utility lets you
load packages from these sources: the Integration Services server, an .ispac project file, a Microsoft SQL Server
database, the SSIS Package Store, and the file system.
NOTE: When you use the current version of the dtexec utility to run a package created by an earlier
version of Integration Services, the utility temporarily upgrades the package to the current package format.
However, you cannot use the dtexec utility to save the upgraded package. For more information about
how to permanently upgrade a package to the current version, see Upgrade Integration Services Packages.
When you use dtexec to run a package from the .ispac project file, the related options are: /Proj[ect] and
/Pack[age] that are used to specify the project path and package stream name. When you convert a project to
the project deployment model by running the Integration Ser vices Project Conversion Wizard from SQL
Server Management Studio, the wizard generates an .ispac projec file. For more information, see Deploy
Integration Services (SSIS) Projects and Packages.
You can use dtexec with third-party scheduling tools to schedule packages that are deployed to the Integration
Services server.
NOTE: If you use SQL Server Agent to run the utility, SQL Server Agent automatically uses the 64-bit
version of the utility. SQL Server Agent uses the registry, not the PATH environment variable, to locate the
correct executable for the utility.
To ensure that you run the 64-bit version of the utility at the command prompt, you can take one of the
following actions:
Open a Command Prompt window, change to the directory that contains the 64-bit version of the utility
(<drive>:\Program Files\Microsoft SQL Server\110\DTS\Binn), and then run the utility from that
location.
At the command prompt, run the utility by entering the full path (<drive>:\Program Files\Microsoft SQL
Server\110\DTS\Binn) to the 64-bit version of the utility.
Permanently change the order of the paths in the PATH environment variable by placing the 64-bit path
(<drive>:\Program Files\Microsoft SQL Server\110\DTS\Binn) before the 32-bit path (<drive>:\
Program Files(x86)\Microsoft SQL Server\110\DTS\Binn) in the variable.
VA L UE DESC RIP T IO N
Syntax Rules
Utility syntax rules
All options must start with a slash (/) or a minus sign (-). The options that are shown here start with a slash (/),
but the minus sign (-) can be substituted.
An argument must be enclosed in quotation marks if it contains a space. If the argument is not enclosed in
quotation marks, the argument cannot contain white space.
Doubled quotation marks within quoted strings represent escaped single quotation marks.
Options and arguments are not case-sensitive, except for passwords.
Using dtexec from the xp_cmdshell
Using dtexec from the xp_cmdshell
You can run dtexec from the xp_cmdshell prompt. The following example shows how to run a package called
UpsertData.dtsx and ignore the return code:
The following example shows how to run the same package and capture the return code:
Syntax
dtexec /option [value] [/option [value]]...
Parameters
/? [option_name]: (Optional). Displays the command prompt options, or displays help for the specified
option_name and then closes the utility.
If you specify an option_name argument, dtexec starts SQL Server Books Online and displays the
dtexec Utility topic.
/Ca[llerInfo] : (Optional). Specifies additional information for a package execution. When you run a
package using SQL Server Agent, agent sets this argument to indicate that the package execution is
invoked by SQL Server Agent. This parameter is ignored when the dtexec utility is run from the
command line.
/CheckF[ile] filespec: (Optional). Sets the CheckpointFileName property on the package to the path
and file spemandcified in filespec. This file is used when the package restarts. If this option is specified
and no value is supplied for the file name, the CheckpointFileName for the package is set to an empty
string. If this option is not specified, the values in the package are retained.
/CheckP[ointing] {on\off} : (Optional). Sets a value that determines whether the package will use
checkpoints during package execution. The value on specifies that a failed package is to be rerun. When
the failed package is rerun, the run-time engine uses the checkpoint file to restart the package from the
point of failure.
The default value is on if the option is declared without a value. Package execution will fail if the value is
set to on and the checkpoint file cannot be found. If this option is not specified, the value set in the
package is retained. For more information, see Restart Packages by Using Checkpoints.
The /CheckPointing on option of dtexec is equivalent to setting the SaveCheckpoints property of the
package to True, and the CheckpointUsage property to Always.
/Com[mandFile] filespec: (Optional). Specifies the command options that run with dtexec . The file
specified in filespec is opened and options from the file are read until EOF is found in the file. filespec is
a text file. The filespec argument specifies the file name and path of the command file to associate with
the execution of the package.
/Conf[igFile] filespec: (Optional). Specifies a configuration file to extract values from. Using this option,
you can set a run-time configuration that differs from the configuration that was specified at design
time for the package. You can store different configuration settings in an XML configuration file and then
load the settings before package execution by using the /ConfigFile option.
You can use the /ConfigFile option to load additional configurations at run time that you did not
specify at design time. However, you cannot use the /ConfigFile option to replace configured values
that you also specified at design time. To understand how package configurations are applied, see
Package Configurations.
/Conn[ection] id_or_name;connection_string [[;id_or_name;connection_string]...]: (Optional). Specifies
that the connection manager with the specified name or GUID is located in the package, and specifies a
connection string.
This option requires that both parameters be specified: the connection manager name or GUID must be
provided in the id_or_name argument, and a valid connection string must be specified in the
connection_string argument. For more information, see Integration Services (SSIS) Connections.
At run time, you can use the /Connection option to load package configurations from a location other
than the location that you specified at design time. The values of these configurations then replace the
values that were originally specified. However you can use the /Connection option only for
configurations, such as SQL Server configurations, that use a connection manager. To understand how
package configurations are applied, see Package Configurations and Behavior Changes to Integration
Services Features in SQL Server 2016.
/Cons[oleLog] [[displayoptions];[list_options;src_name_or_guid]...]: (Optional). Displays specified log
entries to the console during package execution. If this option is omitted, no log entries are shown in the
console. If the option is specified without parameters that limit the display, every log entry will display.
To limit the entries that are displayed to the console, you can specify the columns to show by using the
displayoptions parameter, and limit the log entry types by using the list_options parameter.
NOTE: When you run a package on the Integration Services server by using the /ISSERVER
parameter, console output is limited and most of the /Cons[oleLog] options are not applicable. All
execution logs can be seen from the server in the related views or by using standard reports
available in SQL Server Management Studio. For more information about the reports, see Reports
for the Integration Services Server.
/Dump error code: By default, Integration Services stores the debug dump files in the folder,
<drive>:\Program Files\Microsoft SQL Server\110\Shared\ErrorDumps.
NOTE: Debug dump files may contain sensitive information. Use an access control list (ACL) to
restrict access to the files, or copy the files to a folder with restricted access. For example, before you
send your debug files to Microsoft support services, we recommended that you remove any
sensitive or confidential information.
To apply this option to all packages that the dtexec utility runs, add a DumpOnCodes REG_SZ value to
the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\110\SSIS\Setup\DtsPath
registry key. The data value in DumpOnCodes specifies the error code or codes that will trigger the
system to create debug dump files. Multiple error codes must be separated by a semi-colon (;).
If you add a DumpOnCodes value to the registry key, and use the /Dump option, the system will
create debug dump files that are based on both settings.
For more information about debug dump files, see Generating Dump Files for Package Execution.
/DumpOnError : (Optional) Creates the debug dump files, .mdmp and .tmp, when any error occurs
while the package is running.
By default, Integration Services stores the debug dump files in the folder, <drive>:\Program
Files\Microsoft SQL Server\110\Shared\ErrorDumps folder.
NOTE: Debug dump files may contain sensitive information. Use an access control list (ACL) to
restrict access to the files, or copy the files to a folder with restricted access. For example, before you
send your debug files to Microsoft support services, we recommended that you remove any
sensitive or confidential information.
To apply this option to all packages that the dtexec utility runs, add a DumpOnError REG_DWORD
value to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Server\110\SSIS\Setup\DtsPath registry key. The value of the DumpOnError REG_DWORD value
determines whether the /DumpOnError option needs to be used with the dtexec utility:
A non-zero data value indicates that the system will create debug dump files when any error
occurs, regardless of whether you use the /DumpOnError option with the dtexec utility.
A zero data value indicates that the system will not create the debug dump files unless you use
the /DumpOnError option with the dtexec utility.
For more information about debug dump files, see Generating Dump Files for Package Execution
/Env[Reference] environment reference ID: (Optional). Specifies the environment reference (ID) that is
used by the package execution, for a package that is deployed to the Integration Services server. The
parameters configured to bind to variables will use the values of the variables that are contained in the
environment.
You use /Env[Reference] option together with the /ISSer ver and the /Ser ver options.
This parameter is used by SQL Server Agent.
-- /F[ile] filespec: (Optional). Loads a package that is saved in the file system. Packages that are saved in
the file system, are deployed using the legacy package deployment model. To run packages that are
deployed to the Integration Services server using the project deployment model, use the /ISSer ver
option. For more information about the package and project deployment models, see Deployment of
Projects and Packages
The filespec argument specifies the path and file name of the package. You can specify the path as either a
Universal Naming Convention (UNC) path or a local path. If the path or file name specified in the filespec
argument contains a space, you must put quotation marks around the filespec argument.
The /File option cannot be used together with the /DTS or /SQL option. If multiple options are
specified, dtexec fails.
/H[elp] [option_name]: (Optional). Displays help for the options, or displays help for the specified
option_name and closes the utility.
If you specify an option_name argument, dtexec starts SQL Server Books Online and displays the
dtexec Utility topic.
/ISSer ver packagepath: (Optional). Runs a package that is deployed to the Integration Services server.
The PackagePath argument specifies the full path and file name of the package deployed to the
Integration Services server. If the path or file name specified in the PackagePath argument contains a
space, you must put quotation marks around the PackagePath argument.
The package format is as follows:
You use /Ser ver option together with the /ISSERVER option. Only Windows Authentication can
execute a package on the SSIS Server. The current Windows user is used to access the package. If the
/Server option is omitted, the default local instance of SQL Server is assumed.
The /ISSERVER option cannot be used together with the /DTS , /SQL or /File option. If multiple options
are specified, dtexec fails.
This parameter is used by SQL Server Agent.
/L[ogger] classid_orprogid;configstring: (Optional). Associates one or more log providers with the
execution of an SSIS package. The classid_orprogid parameter specifies the log provider, and can be
specified as a class GUID. The configstring is the string that is used to configure the log provider.
The following list shows the available log providers:
Text file:
ProgID: DTS.LogProviderTextFile.1
ClassID: {59B2C6A5-663F-4C20-8863-C83F9B72E2EB}
SQL Server Profiler:
ProgID: DTS.LogProviderSQLProfiler.1
ClassID: {5C0B8D21-E9AA-462E-BA34-30FF5F7A42A1}
SQL Server:
ProgID: DTS.LogProviderSQLServer.1
ClassID: {6AA833A1-E4B2-4431-831B-DE695049DC61}
Windows Event Log:
ProgID: DTS.LogProviderEventLog.1
ClassID: {97634F75-1DC7-4F1F-8A4C-DAF0E13AAA22}
XML File:
ProgID: DTS.LogProviderXMLFile.1
ClassID: {AFED6884-619C-484F-9A09-F42D56E1A7EA}
/M[axConcurrent] concurrent_executables: (Optional). Specifies the number of executable files that the
package can run concurrently. The value specified must be either a non-negative integer, or -1. A value
of -1 means that SSIS will allow a maximum number of concurrently running executables that is equal
to the total number of processors on the computer executing the package, plus two.
/Pack[age] PackageName: (Optional). Specifies the package that is executed. This parameter is used
primarily when you execute the package from Visual Studio.
/P[assword] password: (Optional). Allows the retrieval of a package that is protected by SQL Server
Authentication. This option is used together with the /User option. If the /Password option is omitted
and the /User option is used, a blank password is used. The password value may be quoted.
You can also set connection manager properties by using parameters. You use the CM prefix to denote a
connection manager parameter.
In the following example, InitialCatalog property of the SourceServer connection manager is set to
ssisdb .
/parameter CM.SourceServer.InitialCatalog;ssisdb
In the following example, ServerName property of the SourceServer connection manager is set to a
period (.) to indicate the local server.
/parameter CM.SourceServer.ServerName;.
/Proj[ect] ProjectFile: (Optional). Specifies the project from which to retrieve the package that is
executed. The ProjectFile argument specifies the .ispac file name. This parameter is used primarily when
you execute the package from Visual Studio.
/Rem comment: (Optional). Includes comments on the command prompt or in command files. The
argument is optional. The value of comment is a string that must be enclosed in quotation marks, or
contain no white space. If no argument is specified, a blank line is inserted. comment values are
discarded during the command sourcing phase.
/Rep[or ting] level [;event_guid_or_name[;event_guid_or_name[...]]: (Optional). Specifies what types of
messages to report. The available reporting options for level are as follows:
N No reporting.
E Errors are reported.
W Warnings are reported.
I Informational messages are reported.
C Custom events are reported.
D Data Flow task events are reported.
P Progress is reported.
V Verbose reporting.
The arguments of V and N are mutually exclusive to all other arguments; they must be specified alone. If
the /Repor ting option is not specified then the default level is E (errors), W (warnings), and P
(progress).
All events are preceded with a timestamp in the format "YY/MM/DD HH:MM:SS", and a GUID or friendly
name if available.
The optional parameter event_guid_or_name is a list of exceptions to the log providers. The exception
specifies the events that are not logged that otherwise might have been logged.
You do not have to exclude an event if the event is not ordinarily logged by default
/Res[tar t] {deny | force | ifPossible}: (Optional). Specifies a new value for the CheckpointUsage property
on the package. The meaning of the parameters are as follows:
Deny Sets CheckpointUsage property to DTSCU_NEVER.
Force Sets CheckpointUsage property to DTSCU_ALWAYS.
ifPossible Sets CheckpointUsage property to DTSCU_IFEXISTS.
The default value of force is used if no value is specified.
/Set [$Sensitive::]propertyPath;value: (Optional). Overrides the configuration of a parameter, variable,
property, container, log provider, Foreach enumerator, or connection within a package. When this option
is used, /Set changes the propertyPath argument to the value specified. Multiple /Set options can be
specified.
In addition to using the /Set option with the /F[ile] option, you can also use the /Set option with the
/ISSer ver option or the /Project option. When you use /Set with /Project , /Set sets parameter
values. When you use /Set with /ISSer ver , /Set sets property overrides. In addition, when you use
/Set with /ISSer ver , you can use the optional $Sensitive prefix to indicate that the property should be
treated as sensitive on the Integration Services server.
You can determine the value of propertyPath by running the Package Configuration Wizard. The paths
for items that you select are displayed on the final Completing the Wizard page, and can be copied
and pasted. If you have used the wizard only for this purpose, you can cancel the wizard after you copy
the paths.
The following is an example of executing a package that is saved in the file system and providing a new
value for a variable:
dtexec /f mypackage.dtsx /set \package.variables[myvariable].Value;myvalue
The following example of running a package from the .ispac project file and setting package and project
parameters.
/Project c:\project.ispac /Package Package1.dtsx /SET \Package.Variables[$Package::Parameter];1 /SET
\Package.Variables[$Project::Parameter];1
You can use the /Set option to change the location from which package configurations are loaded.
However, you cannot use the /Set option to override a value that was specified by a configuration at
design time. To understand how package configurations are applied, see Package Configurations and
Behavior Changes to Integration Services Features in SQL Server 2016.
/Ser[ver] server: (Optional). When the /SQL or /DTS option is specified, this option specifies the name
of the server from which to retrieve the package. If you omit the /Ser ver option and the /SQL or /DTS
option is specified, package execution is tried against the local server. The server_instance value may be
quoted.
The /Ser[ver] option is required when the /ISSer ver option is specified.
/SQ[L] package_path: Loads a package that is stored in SQL Server, in msdb database. Packages that
are stored in the msdb database, are deployed using the package deployment model. To run packages
that are deployed to the Integration Services server using the project deployment model, use the
/ISSer ver option. For more information about the package and project deployment models, see
Deployment of Projects and Packages.
The package_path argument specifies the name of the package to retrieve. If folders are included in the
path, they are terminated with backslashes ("\"). The package_path value can be quoted. If the path or
file name specified in the package_path argument contains a space, you must put quotation marks
around the package_path argument.
You can use the /User , /Password , and /Ser ver options together with the /SQL option.
If you omit the /User option, Windows Authentication is used to access the package. If you use the
/User option, the /User login name specified is associated with SQL Server Authentication.
The /Password option is used only together with the /User option. If you use the /Password option,
the package is accessed with the user name and password information provided. If you omit the
/Password option, a blank password is used.
If the /Ser ver option is omitted, the default local instance of SQL Server is assumed.
The /SQL option cannot be used together with the /DTS or /File option. If multiple options are
specified, dtexec fails.
/Su[m] : (Optional). Shows an incremental counter that contains the number of rows that will be
received by the next component.
/U[ser] user_name: (Optional). Allows the retrieval of a package that is protected by SQL Server
Authentication. This option is used only when the /SQL option is specified. The user_name value can be
quoted.
IMPORTANT!! When configured to check the signature of the package, Integration Services only
checks whether the digital signature is present, is valid, and is from a trusted source. Integration
Services does not check whether the package has been changed.
NOTE: The optional BlockedSignatureStates registry value can specify a setting that is more
restrictive than the digital signature option set in SQL Server Data Tools (SSDT) or at the dtexec
command line. In this situation, the more restrictive registry setting overrides the other settings.
Remarks
The order in which you specify command options can influence the way in which the package executes:
Options are processed in the order they are encountered on the command line. Command files are read
in as they are encountered on the command line. The commands in the command file are also
processed in the order they are encountered.
If the same option, parameter, or variable appears in the same command line statement more than one
time, the last instance of the option takes precedence.
/Set and /ConfigFile options are processed in the order they are encountered.
Examples
The following examples demonstrate how to use the dtexec command prompt utility to configure and execute
SQL Server Integration Services packages.
Running Packages
To execute an SSIS package saved to SQL Server using Windows Authentication, use the following code:
To execute an SSIS package saved to the File System folder in the SSIS Package Store, use the following code:
To validate a package that uses Windows Authentication and is saved in SQL Server without executing the
package, use the following code:
To execute an SSIS package that is saved in the file system, use the following code:
dtexec /f "c:\pkgOne.dtsx"
To execute an SSIS package that is saved in the file system, and specify logging options, use the following code:
To execute a package that uses Windows Authentication and is saved to the default local instance of SQL
Server, and verify the version before it is executed, use the following code:
To execute an SSIS package that is saved in the file system and configured externally, use the following code:
dtexec /f "c:\pkgOne.dtsx" /conf "c:\pkgOneConfig.cfg"
NOTE: The package_path or filespec arguments of the /SQL, /DTS, or /FILE options must be enclosed in
quotation marks if the path or file name contains a space. If the argument is not enclosed in quotation
marks, the argument cannot contain white space.
Logging Option
If there are three log entry types of A, B, and C, the following ConsoleLog option without a parameter displays
all three log types with all fields:
/CONSOLELOG
The following option displays all log types, but with the Name and Message columns only:
/CONSOLELOG NM
The following option displays all columns, but only for log entry type A:
/CONSOLELOG I;LogEntryTypeA
The following option displays only log entry type A, with Name and Message columns:
/CONSOLELOG NM;I;LogEntryTypeA
The following option displays log entries for log entry types A and B:
/CONSOLELOG I;LogEntryTypeA;LogEntryTypeB
You can achieve the same results by using multiple ConsoleLog options:
If the ConsoleLog option is used without parameters, all fields are displayed. The inclusion of a list_options
parameter causes the following to displays only log entry type A, with all fields:
The following displays all log entries except log entry type A: that is, it displays log entry types B and C:
/CONSOLELOG E;LogEntryTypeA
The following example achieves the same results by using multiple ConsoleLog options and a single
exclusion:
/CONSOLELOG E;LogEntryTypeA /CONSOLELOG
/CONSOLELOG E;LogEntryTypeA /CONSOLELOG E;LogEntryTypeA
/CONSOLELOG E;LogEntryTypeA;LogEntryTypeA
The following example displays no log messages, because when a log file type is found in both the included
and excluded lists, it will be excluded.
SET Option
The following example shows how to use the /SET option, which lets you change the value of any package
property or variable when you start the package from the command line.
/SET \package\DataFlowTask.Variables[User::MyVariable].Value;newValue
Project Option
The following example shows how to use the /Project and the /Package option.
The following example shows how to use the /Project and /Package options, and set package and project
parameters.
The following example shows how to use the /ISSer ver option and set project and connection manager
parameters.
Related Content
Blog entry, Exit Codes, DTEXEC, and SSIS Catalog, on www.mattmasson.com.
Restart Packages by Using Checkpoints
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services can restart failed packages from the point of failure, instead of rerunning the whole package.
If a package is configured to use checkpoints, information about package execution is written to a checkpoint file.
When the failed package is rerun, the checkpoint file is used to restart the package from the point of failure. If the
package runs successfully, the checkpoint file is deleted, and then re-created the next time the package is run.
Using checkpoints in a package can provide the following benefits.
Avoid repeating the downloading and uploading of large files. For example, a package that downloads
multiple large files by using an FTP task for each download can be restarted after the downloading of a
single file fails and then download only that file.
Avoid repeating the loading of large amounts of data. For example, a package that performs bulk inserts
into dimension tables in a data warehouse using a different Bulk Insert task for each dimension can be
restarted if the insertion fails for one dimension table, and only that dimension will be reloaded.
Avoid repeating the aggregation of values. For example, a package that computes many aggregates, such
as averages and sums, using a separate Data Flow task to perform each aggregation, can be restarted after
computing an aggregation fails and only that aggregation will be recomputed.
If a package is configured to use checkpoints, Integration Services captures the restart point in the checkpoint file.
The type of container that fails and the implementation of features such as transactions affect the restart point
that is recorded in the checkpoint file. The current values of variables are also captured in the checkpoint file.
However, the values of variables that have the Object data type are not saved in checkpoint files.
NOTE
Using checkpoints and transactions in the same package could cause unexpected results. For example, when a package fails
and restarts from a checkpoint, the package might repeat a transaction that has already been successfully committed.
Checkpoint data is not saved for For Loop and Foreach Loop containers. When a package is restarted, the For
Loop and Foreach Loop containers and the 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. For more information and a workaround,
see SSIS Checkpoints are not honored for For Loop or Foreach Loop container items.
If the package is restarted the package configurations are not reloaded, instead the package uses the
configuration information written to the checkpoint file. This ensures that the package uses the same
configurations when it is rerun as the time it failed.
A package can be restarted only at the control flow level. You cannot restart a package in the middle of a data
flow. To avoid rerunning the whole data flow, the package might be designed to include multiple data flows, each
one using a different Data Flow task. This way the package can be restarted, rerunning only one Data Flow task.
Additionally, you must set the FailPackageOnFailure property to true for all the containers in the package that you
want to identify as restart points.
You can use the ForceExecutionResult property to test the use of checkpoints in a package. By setting
ForceExecutionResult of a task or container to Failure, you can imitate real-time failure. When you rerun the
package, the failed task and containers will be rerun.
Checkpoint Usage
The CheckpointUsage property can be set to the following values:
VA L UE DESC RIP T IO N
Never Specifies that the checkpoint file is not used and that the
package runs from the start of the package workflow.
Always Specifies that the checkpoint file is always used and that the
package restarts from the point of the previous execution
failure. If the checkpoint file is not found, the package fails.
NOTE
The /CheckPointing on option of dtexec is equivalent to setting the SaveCheckpoints property of the package to True ,
and the CheckpointUsage property to Always. For more information, see dtexec Utility.
IMPORTANT
An error occurs if the checkpoint file is not available.
Select IfExists to restart the package only if the checkpoint file is available.
8. Configure the tasks and containers from which the package can restart.
Right-click a task or container and click Proper ties .
Set the FailPackageOnFailure property to True for each selected task and container.
External Resources
Technical article, Automatic Restart of SSIS packages after Failover or Failure, on
social.technet.microsoft.com
Support article, SSIS Checkpoints are not honored for For Loop or Foreach Loop container items, on
support.microsoft.com.
SQL Server Agent Jobs for Packages
11/2/2020 • 20 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can automate and schedule the execution of SQL Server Integration Services packages by using SQL Server
Agent. You can schedule packages that are deployed to the Integration Services server, and are stored in SQL
Server, the SSIS Package Store, and the file system.
NOTE
This article describes how to schedule SSIS packages in general, and how to schedule packages on premises. You can also
run and schedule SSIS packages on the following platforms:
The Microsoft Azure cloud . For more info, see Lift and shift SQL Server Integration Services workloads to the cloud
and Schedule the execution of an SSIS package in Azure.
Linux. For more info, see Extract, transform, and load data on Linux with SSIS and Schedule SQL Server Integration
Services package execution on Linux with cron.
Troubleshooting
A SQL Server Agent job step may fail to start a package even though the package runs successfully in SQL Server
Data Tools (SSDT) and from the command line. There are some common reasons for this issue and several
recommended solutions. For more information, see the following resources.
Microsoft Knowledge Base article, An SSIS package does not run when you call the SSIS package from a
SQL Server Agent job step
Video, Troubleshooting: Package Execution Using SQL Server Agent (SQL Server Video), in the MSDN
Library.
After a SQL Server Agent job step starts a package, the package execution may fail or the package may run
successfully but with unexpected results. You can use the following tools to troubleshoot these issues.
For packages that are stored in the SQL Server MSDB database, the SSIS Package Store, or in a folder on
your local machine, you can use the Log File Viewer as well as any logs and debug dump files that were
generated during the execution of the package.
To use the Log File Viewer, do the following.
1. Right-click the SQL Server Agent job in Object Explorer and then click View Histor y .
2. Locate the job execution in the Log file summar y box with the job failed message in the
Message column.
3. Expand the job node, and click the job step to view the details of the message in the area below the
Log file summar y box.
For packages that are stored in the SSISDB database, you can also use the Log File Viewer as well as any
logs and debug dump files that were generated during the execution of the package. In addition, you can
use the reports for the Integration Services server.
To find information in the repor ts for the package execution associated with a job execution,
do the following.
1. Follow the steps above to view the details of the message for the job step.
2. Locate the Execution ID listed in the message.
3. Expand the Integration Services Catalog node in Object Explorer.
4. Right-click SSISDB, point to Reports, then Standard Reports, and then click All Executions.
5. In the All Executions report, locate the Execution ID in the ID column. Click Over view , All
Messages , or Execution Performance to view information about this package execution.
For more information about the Overview, All Messages, and Execution Performance reports, see Reports
for the Integration Services Server.
NOTE: If the password changes for the credential that the proxy account uses, you need to
update the credential password. Otherwise, the job step will fail.
For information about configuring the SQL Server Agent service account, see Set the Service Startup
Account for SQL Server Agent (SQL Server Configuration Manager).
8. In the Package Source list box, click the source of the package and then configure the options for the job
step.
The following table describes the possible package sources.
PA C K A GE SO URC E DESC RIP T IO N
SSIS Catalog Packages that are stored in the SSISDB database. The
packages are contained in Integration Services projects
that are deployed to the Integration Services server.
SQL Ser ver Packages that are stored in the MSDB database. You use
the Integration Services service to manage these
packages.
SSIS Package Store Packages that are stored in the default folder on your
computer. The default folder is <drive>:\Program
Files\Microsoft SQL Server\110\DTS\Packages. You use the
Integration Services service to manage these packages.
File System Packages that are stored in any folder on your local
machine.
The following tables describe the configuration options that are available for the job step
depending on the package source you select.
IMPORTANT: If the package is password-protected, when you click any of the tabs on the General
page of the New Job Step dialog box, with the exception of the Package tab, you need to enter the
password in the Package Password dialog box that appears. Otherwise the SQL Server Agent job will
fail to run the package.
TA B O P T IO N S
Package
Proper ty overrides :
Logging level
None :
Logging is turned off. Only the package execution status
is logged.
Basic:
All events are logged, except custom and diagnostic
events. This is the default value for the logging level.
Performance :
Only performance statistics, and OnError and OnWarning
events, are logged.
Verbose :
All events are logged, including custom and diagnostic
events.
Dump on errors
32-bit runtime
TA B O P T IO N S
These are the tab options for packages that are stored in Type or select the name of the database server instance
SQL Server or the SSIS Package Store. for SQL Server or the Integration Services service.
User Name
Password
Package
Package Package
These are the tab options for packages that are stored in Type the full path for the package file, or click the ellipsis
the file system. button to select the package.
Command files Specify additional options you want to run with dtexec, in
a separate file.
For the text file, XML file, and the SQL Server Profiler log
providers, you are selecting file connection managers that
are contained in the package. For the SQL Server log
provider, you are selecting an OLE DB connection
manager that is contained in the package.
Verify package ID
Indicates whether the GUID of the package is verified, by
comparing it to the package ID that is entered in the
Package ID box next to this option. This option
corresponds to the /VerifyPackageID option for dtexec.
Verify version ID
Indicates whether the version GUID of the package is
verified, by comparing it version ID that is entered in the
Version ID box next to this option. This option
corresponds to the /VerifyVersionID option for dtexec.
Command line Modify the command line options for dtexec. For more
information about the options, see dtexec Utility.
9. Click OK to save the settings and close the New Job Step dialog box.
NOTE
For packages that are stored in the SSIS Catalog , the OK button is disabled when there is an unresolved
parameter or connection manager property setting. An unresolved setting occurs when you are using a value
contained in a server environment variable to set the parameter or property and one of the following conditions is
met.:
The Environment checkbox on the Configuration tab is not selected.
The server environment that contains the variable is not selected in the list box on the Configuration tab.
10. To create a schedule for a job step, click Schedules in the Select a page pane. For information on how to
configure a schedule, see Schedule a Job.
TIP
When you name the schedule, consider using a name that is unique and descriptive so you can more easily
distinguish the schedule from other SQL Server Agent schedules.
See Also
Execution of Projects and Packages
External Resources
Knowledge Base article, An SSIS package does not run when you call the SSIS package from a SQL Server
Agent job step, on the Microsoft Web site
Video, Troubleshooting: Package Execution Using SQL Server Agent (SQL Server Video), in the MSDN
Library
Video, How to: Automate Package Execution by Using the SQL Server Agent (SQL Server Video), in the
MSDN Library
Technical article, Checking SQL Server Agent jobs using Windows PowerShell, on mssqltips.com
Technical article, Auto alert for SQL Agent jobs when they are enabled or disabled, on mssqltips.com
Blog entry, Configuring SQL Agent Jobs to Write to Windows Event Log, on mssqltips.com.
Load-Balancing Packages on Remote Servers by
Using SQL Server Agent
11/2/2020 • 8 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
When many packages have to be run, it is convenient to use other servers that are available. This method of using
other servers to run packages when the packages are all under the control of one parent package is called load
balancing. In SQL Server Integration Services, load balancing is a manual procedure that must be architected by the
owners of the packages. Load balancing is not performed automatically by the servers. Also, the packages that are
run on the remote servers must be whole packages, not individual tasks in other packages.
Load balancing is useful in the following scenarios:
Packages can run at the same time.
Packages are large and, if run sequentially, can run longer than the time allowed for processing.
Administrators and architects can determine whether using additional servers for processing would benefit their
processes.
Illustration of Load-Balancing
The following diagram shows a parent package on a server. The parent package contains multiple Execute SQL Job
Agent tasks. Each task in the parent package calls a SQL Server Agent on a remote server. Those remote servers
contain SQL Server Agent jobs that include a step that calls a package on that server.
The steps required for load balancing in this architecture are not new concepts. Instead, load balancing is achieved
by using existing concepts and common SSIS objects in a new way.
For information about accessing the Over view report, see Reports for the Integration Services Server.
Precedence Constraints in the Parent Package
When you create precedence constraints between the Execute SQL Server Agent Job tasks in the parent package,
these precedence constraints control only the time that the SQL Server Agent jobs on the remote servers are
started. Precedence constraints cannot receive information regarding the success or failure of the child packages
that are run from the steps of the SQL Server Agent jobs.
This means that success or failure of a child package does not propagate to the parent, because the sole function of
the Execute SQL Server Agent job in the parent package is to request the SQL Server Agent job to run the child
package. After the SQL Server Agent job is called successfully, the parent package receives a result of Success.
Failure in this scenario means only that there has been a failure in calling the remote SQL Server Agent Job task.
One situation where this can occur is when the remote server is down and the agent does not respond. However, as
long as the agent fires, the parent package has successfully completed its task.
NOTE
You can use an Execute SQL Task that contains a Transact-SQL statement of sp_star t_job N'package_name' . For more
information, see sp_start_job (Transact-SQL).
Debugging Environment
When testing the parent package, use the debugging environment of the designer by running it using Debug / Start
Debugging (F5). Alternatively, you can use the command prompt utility, dtexec . For more information, see dtexec
Utility.
Related Tasks
SQL Server Agent Jobs for Packages
Integration Services (SSIS) Scale Out
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SQL Server Integration Services (SSIS) Scale Out provides high-performance execution of SSIS packages by
distributing package executions across multiple computers. After you set up Scale Out, you can run multiple
package executions in parallel, in scale-out mode, from SQL Server Management Studio (SSMS).
Components
SSIS Scale Out consists of an SSIS Scale Out Master and one or more SSIS Scale Out Workers.
The Scale Out Master is responsible for Scale Out management and receives package execution requests
from users. For more info, see Scale Out Master.
The Scale Out Workers pull execution tasks from the Scale Out Master and run the packages. For more info,
see Scale Out Worker.
Configuration options
You can set up Scale Out in the following configurations:
On a single computer , where a Scale Out Master and a Scale Out Worker run side by side on the same
computer.
On multiple computers , where each Scale Out Worker is on a different computer.
Next steps
Get started with Integration Services (SSIS) Scale Out on a single computer
Walkthrough: Set up Integration Services Scale Out
Get started with Integration Services (SSIS) Scale Out
on a single computer
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This section provides guidance for setting up Integration Services Scale Out in a single-computer environment
with the default settings.
On the Integration Ser vices Scale Out Configuration - Master Node and Integration Ser vices Scale Out
Configuration - Worker Node pages, click Next to accept the default settings for the port and certificates.
Finish the SQL Server installation Wizard.
The Integration Services Scale Out Manager app opens. For more info, see Scale Out Manager.
To enable a Scale Out Worker, switch to Worker Manager and select the worker you want to enable. The workers
are disabled by default. Click Enable Worker to enable the selected worker.
Next steps
Add a Scale Out Worker with Scale Out Manager.
Walkthrough: Set up Integration Services (SSIS) Scale
Out
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Set up Integration Services (SSIS) Scale Out by completing the following tasks.
TIP
If you are installing Scale Out on a single computer, install the Scale Out Master and Scale Out Worker features at the same
time. When you install the features at the same time, the endpoint is automatically generated to connect to Scale Out
Master.
NOTE
To use the default SQL Server authentication account for Scale Out logging, select Mixed Mode for authentication mode on
the Database Engine Configuration page during Database Engine installation. See Change the account for Scale Out
logging for more information.
To install the Scale Out Master feature, use the SQL Server installation wizard or the command prompt.
Install Scale Out Master with the SQL Server installation wizard
1. On the Feature Selection page, select Scale Out Master , which is listed under Integration Services.
2. On the Ser ver Configuration page, select the account to run SQL Ser ver Integration Ser vices Scale
Out Master ser vice and select the Star tup Type .
3. On the Integration Ser vices Scale Out Master Configuration page, specify the port number that
Scale Out Master uses to communicate with Scale Out Worker. The default port number is 8391.
4. Specify the TLS/SSL certificate used to protect the communication between Scale Out Master and Scale Out
Worker by doing one of the following.
Let the setup process create a default, self-signed TLS/SSL certificate by clicking Create a new SSL
cer tificate . The default certificate is installed under Trusted Root Certification Authorities, Local
Computer. You can specify the CNs in this certificate. The host name of master endpoint should be
included in CNs. By default, the machine name and ip of Master Node are included.
Select an existing TLS/SSL Certificate on the local computer by clicking Use an existing SSL
cer tificate and then clicking Browse to select a certificate. The thumbprint of the certificate appears in
the text box. Clicking Browse displays certificates that are stored in Trusted Root Certification
Authorities, Local Computer. The certificate you select must be stored here.
5. Finish the SQL Server installation wizard.
Install Scale Out Master from the command prompt
Follow the instructions in Install SQL Server from the Command Prompt. Set the parameters for Scale Out Master
by doing the following things:
1. Add IS_Master to the parameter /FEATURES
2. Configure Scale Out Master by specifying the following parameters and their values:
/ISMASTERSVCACCOUNT
/ISMASTERSVCPASSWORD
/ISMASTERSVCSTARTUPTYPE
/ISMASTERSVCPORT
/ISMasterSVCSSLCertCN (optional)
/ISMASTERSVCTHUMBPRINT (optional)
NOTE
If Scale Out Master is not installed together with Database Engine, and the Database Engine instance is a named
instance, you have to configure SqlServerName in the Scale Out Master service configuration file after installation.
For more info, see Scale Out Master.
2. On the Ser ver Configuration page, select the account to run SQL Ser ver Integration Ser vices Scale
Out Worker ser vice and select the Star tup Type .
3. On the Integration Ser vices Scale Out Worker Configuration page, specify the endpoint to connect
to Scale Out Master.
For a single-computer environment, the endpoint is automatically generated when Scale Out
Master and Scale Out Worker are installed at the same time.
For a multiple-computer environment, the endpoint consists of the name or IP of the computer
with Scale Out Master installed and the port number specified during the Scale Out Master
installation.
NOTE
You can also skip Worker configuration at this point and associate the Scale Out Worker with the Scale Out Master
by using Scale Out Manager after installation.
4. For a multiple-computer environment, specify the client TLS/SSL certificate that is used to validate Scale
Out Master. For a single-computer environment, you don't have to specify a client TLS/SSL certificate.
Click Browse to find the certificate file (*.cer). To use the default TLS/SSL certificate, select the
SSISScaleOutMaster.cer file located under \<drive\>:\Program Files\Microsoft SQL Server\140\DTS\Binn on
the computer on which Scale Out Master is installed.
NOTE
When the TLS/SSL certificate used by Scale Out Master is self-signed, a corresponding client TLS/SSL certificate has
to be installed on the computer with Scale Out Worker. If you provide the file path for the client TLS/SSL Certificate
on the Integration Ser vices Scale Out Worker Configuration page, the certificate will be installed
automatically; otherwise, you have to install the certificate manually later.
NOTE
After you open the firewall port, you also have to restart the Scale Out Worker service.
Next steps
Run Packages in Integration Services (SSIS) Scale Out.
Run packages in Integration Services (SSIS) Scale
Out
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
After you deploy packages to the Integration Services server, you can run them in Scale Out by using one of the
following methods:
Execute Package in Scale Out dialog box
Stored procedures
SQL Server Agent jobs
Run packages with the Execute Package in Scale Out dialog box
1. Open the Execute Package In Scale Out dialog box.
In SQL Server Management Studio, connect to the Integration Services server. In Object Explorer, expand
the tree to display the nodes under Integration Ser vices Catalogs . Right-click the SSISDB node or the
project or the package you want to run, and then click Execute in Scale Out .
2. Select packages and set the options.
On the Package Selection page, select one or more packages to run. Set the environment, parameters,
connection managers, and advanced options for each package. Click a package to set these options.
On the Advanced tab, set a Scale Out option called Retr y count to specify the number of times a package
execution will retry if it fails.
NOTE
The Dump on errors option only works when the account running Scale Out Worker service is an administrator
on the local computer.
NOTE
The packages are executed with the credentials of the user accounts of the Scale Out Worker services. Review these
credentials on the Machine Selection page. By default, the account is NT Service\SSISScaleOutWorker140 .
WARNING
Package executions triggered by different users on the same worker run with the same credentials. There is no
security boundary between or among them.
4. Run the packages and view reports.
Click OK to start the package executions. To view the execution report for a package, right-click the package
in Object Explorer, click Repor ts , click All Executions , and find the execution.
Permissions
To run packages in Scale Out, you have to have one the following permissions:
Membership in the ssis_admin database role
Membership in the ssis_cluster_executor database role
Membership in the sysadmin server role
To switch the default execution mode back so that packages no longer run by default in Scale Out mode, set
Ser ver-wide Default execution mode to Ser ver .
Next steps
Troubleshoot Scale Out
Add a Scale Out Worker with Scale Out Manager
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services Scale Out Manager simplifies the process of adding a Scale Out Worker to your existing Scale
Out environment.
Follow these steps to add a Scale Out Worker to your Scale Out topology:
On the Integration Ser vices Scale Out Configuration - Worker Node page, you can click Next to skip
configuration at this time and use Scale Out Manager to do the configuration after installation.
Finish the installation wizard.
In the Scale Out Manager dialog box, switch to Worker Manager . Select + and follow the instructions in the
Connect Worker dialog box.
Next steps
For more info, see Scale Out Manager.
Integration Services (SSIS) Scale Out Master
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Scale Out Master manages the Scale Out system through the SSISDB Catalog and the Scale Out Master
service.
The SSISDB Catalog stores all the information for Scale Out Workers, packages, and executions. It provides the
interface to enable a Scale Out Worker and execute packages in Scale Out. For more information, see
Walkthrough: Set up Integration Services Scale Out and Run Packages in Integration Services.
The Scale Out Master service is a Windows service that is responsible for the communication with Scale Out
Workers. It returns the status of package executions on Scale Out Workers over HTTPS and operates on the data in
SSISDB.
SqlServerName The name of the SQL Server that The name of the SQL Server that is
contains the SSISDB catalog. For installed with the Scale Out Master.
example, ServerName\InstanceName.
Next steps
Integration Services (SSIS) Scale Out Worker
Integration Services (SSIS) Scale Out Worker
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Scale Out Worker runs the Scale Out Worker service to pull execution tasks from Scale Out Master. Then the
worker runs the packages locally with ISServerExec.exe .
MasterEndpoint The endpoint to connect to Scale Out The endpoint set during the Scale Out
Master. Worker installation
MasterHttpsCertThumbprint The thumbprint of the client TLS/SSL The thumbprint of the client certificate
certificate used to authenticate Scale specified during the Scale Out Worker
Out Master installation.
WorkerHttpsCertThumbprint The thumbprint of the certificate for The thumbprint of a certificate created
Scale Out Master used to authenticate and installed automatically during the
the Scale Out Worker. Scale Out Worker installation
TaskLogLevel The task log level of the Scale Out 126 (Information, Warning, Error,
Worker. (Verbose 0x01, Information Progress, CriticalError, Audit)
0x02, Warning 0x04, Error 0x08,
Progress 0x10, CriticalError 0x20, Audit
0x40)
Next steps
Integration Services (SSIS) Scale Out Master
Integration Services Scale Out Manager
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Scale Out Manager is a management tool that lets you manage your entire SSIS Scale Out topology from a single
app. It removes the burden of doing management tasks and running Transact-SQL commands on multiple
computers.
NOTE
We recommend running SSMS as an administrator, since some Scale Out management operations, such as adding a Scale
Out Worker, require administrative privilege.
If validation succeeds, Scale Out Manager tries to read the worker server configuration file and get the certificate
thumbprint of the worker. For more info, see Scale Out Worker. If Scale Out Manager can't read the worker
service configuration file, there are two alternative ways for you to provide the worker certificate.
You can enter the thumbprint of worker certificate directly.
After gathering information, Scale Out Manager describes the actions to be performed. Typically, these actions
include installing the certificate, updating the worker service configuration file, and restarting the worker service.
In case the worker setting is not accessible, you have to update it manually and restart the worker service.
Select the Confirm checkbox and then select OK to start adding a Scale Out Worker.
Delete a Scale Out Worker
To delete a Scale Out Worker, select the Scale Out Worker and then select - at the bottom of the Scale Out Worker
list.
Enable or disable a Scale Out Worker
To enable or disable a Scale Out Worker, select the Scale Out Worker and then select Enable Worker or Disable
Worker. If the worker is not offline, the status of the worker displayed in Scale Out Manager changes accordingly.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
When you run SSIS packages in Scale Out, the event messages are logged in the SSISDB database with an auto-
created user account named ##MS_SSISLogDBWorkerAgentLogin## . The login for this user uses SQL Server
authentication.
If you want to change the account used for Scale Out logging, do the following things:
NOTE
If you use a Windows user account for logging, use the same account as the account that runs the Scale Out Worker service.
Otherwise, the login to SQL Server fails.
Next steps
Integration Services Scale Out Manager
Manage certificates for SQL Server Integration
Services Scale Out
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To secure the communication between Scale Out Master and Scale Out Workers, SSIS Scale Out uses two
certificates - one for the Master and one for the Workers.
New cer tificate . If you don't have special requirements for certificates, you can choose to create a new self-signed
TLS/SSL certificate. You can further specify the CNs in the certificate. Make sure the host name of the master
endpoint to be used later by Scale Out Workers is included in the CNs. By default, the computer name and IP
address of the master node are included.
Existing cer tificate . If you choose to use an existing certificate, click Browse to select a TLS/SSL certificate from
the Root certificate store of the local computer.
Change the Scale Out Master certificate
You may want to change your Scale Out Master certificate due to certificate expiration or for other reasons. To
change the Scale Out Master certificate, do the following things:
1. Create a TLS/SSL certificate.
Create and install a new TLS/SSL certificate on the Master node with the following command:
MakeCert.exe -n CN={master endpoint host} SSISScaleOutMaster.cer -r -ss Root -sr LocalMachine -a sha1
For example:
For example:
Delete the original binding and set up the new binding with the following commands:
For example:
For example:
2. Install the client certificate to the Root store of the local computer on the Worker node
3. Grant service access to the certificate
Delete the old certificate and grant Scale Out Worker service access to the new certificate with following command:
For example:
Next steps
For more info, see the following articles:
Integration Services (SSIS) Scale Out Master
Integration Services (SSIS) Scale Out Worker
Scale Out support for high availability
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In SSIS Scale Out, high availability on the Scale Out Worker side is provided by executing packages with multiple
Scale Out Workers.
High availability on the Scale Out Master side is achieved with Always On for SSIS Catalog and Windows failover
clustering. In this solution, multiple instances of Scale Out Master are hosted in a Windows failover cluster. When
the Scale Out Master service or SSISDB is down on the primary node, the service or SSISDB on the secondary node
continues to accept user requests and communicate with Scale Out Workers.
Alternatively, high availability on the Scale Out Master side can be achieved with SQL Server failover cluster
instance. See Scale Out support for high availability via SQL Server failover cluster instance.
To set up high availability on the Scale Out Master side with always on for SSIS catalog, do the following things:
1. Prerequisites
Set up a Windows failover cluster. See the blog post Installing the Failover Cluster Feature and Tools for Windows
Server 2012 for instructions. Install the feature and tools on all cluster nodes.
NOTE
You can set up multiple backup Scale Out Masters by repeating these operations for Scale Out Master on other secondary
nodes.
7. Configure the Scale Out Master service role of the Windows Server
failover cluster
1. In Failover Cluster Manager, connect to the cluster for Scale Out. Select the cluster. Select Action in the menu
and then select Configure Role .
2. In the High Availability Wizard dialog box, select Generic Ser vice on the Select Role page. Select SQL
Server Integration Services Scale Out Master 14.0 on the Select Ser vice page.
3. On the Client Access Point page, enter the DNS host name of the Scale Out Master service.
Next steps
For more info, see the following articles:
Integration Services (SSIS) Scale Out Master
Integration Services (SSIS) Scale Out Worker
Scale Out support for high availability via SQL Server
failover cluster instance
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To set up high availability on the Scale Out Master side with SQL Server failover cluster instance, do the following
things:
1. Prerequisites
Set up a Windows failover cluster. See the blog post Installing the Failover Cluster Feature and Tools for Windows
Server 2012 for instructions. Install the feature and tools on all cluster nodes.
NOTE
If you want to failover SSISDB and Scale Out Master service separately, follow 2. Install Scale Out Master on the primary
node for Scale Out Master configuration.
6. Add Scale Out Master service to SQL Server role in Windows failover
cluster
In Failover Cluster Manager, connect to the cluster for Scale Out. Select Roles in the explorer, right-click the SQL
Server role, and select Add Resource, Generic Service.
In the New Resource Wizard, select Scale Out Master service and finish the wizard.
Bring the Scale Out Master service online.
NOTE
If you want to failover SSISDB and Scale Out Master service separately, follow 7. Configure the Scale Out Master service role
of the Windows failover cluster
NOTE
Scale Out Manager has not supported SQL Server failover cluster. If you use Scale Out Manager to add Scale Out Worker,
you still need to install worker certificate to all master nodes manually.
Next steps
For more info, see the following articles:
Integration Services (SSIS) Scale Out Master
Integration Services (SSIS) Scale Out Worker
Troubleshoot Scale Out
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SSIS Scale Out involves communication among the SSIS Catalog database SSISDB , the Scale Out Master service,
and the Scale Out Worker service. Sometimes this communication breaks due to configuration mistakes, lack of
access permissions, and other reasons. This article helps you to troubleshoot issues with your Scale Out
configuration.
To investigate the symptoms you encounter, follow the steps below one by one until your problem is resolved.
If the property value is False, enable Scale Out by calling the stored procedure [catalog].[enable_scaleout] .
2. Check whether the SQL Server name specified in the Scale Out Master configuration file is correct, and
restart the Scale Out Master service.
Scale Out Worker fails
Symptoms
Scale Out Worker cannot connect to Scale Out Master.
Scale Out Worker does not show after adding it in Scale Out Manager.
Scale Out Worker does not show in the view [catalog].[worker_agents] .
The Scale Out Worker service is running, but the Scale Out Worker is offline.
Solution
Check the error messages in the Scale Out Worker service log under
\<drive\>:\Users\\*[account running worker service]*\AppData\Local\SSIS\Cluster\Agent .
No endpoint listening
Symptoms
"System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at https://[MachineName]:
[Port]/ClusterManagement/ that could accept the message."
Solution
1. Check whether the port number specified in the Scale Out Master service configuration file is correct, and
restart the Scale Out Master service.
2. Check whether the master endpoint specified in the Scale Out Worker service configuration is correct, and
restart the Scale Out Worker service.
3. Check whether the firewall port is open on the Scale Out Master node.
4. Resolve any other connection issues between the Scale Out Master node and the Scale Out Worker node.
NOTE
If it's not possible to change the host name of the master endpoint due to DNS settings, you have to change the
Scale Out Master certificate. See Manage certificates for SSIS Scale Out.
3. Check whether the master thumbprint specified in the Scale Out Worker configuration matches the
thumbprint of the Scale Out Master certificate.
If the account does not have access, grant access by running the following command, and restart Scale Out Worker
service.
winhttpcertcfg.exe -g -c LOCAL_MACHINE\My -s {CN of the worker certificate} -a {the account running Scale Out
Worker service}
NOTE
If you have non-self-signed certificates in the Root certificate store, client certificate authentication fails. For more
info, see Internet Information Services (IIS) 8 may reject client certificate requests with HTTP 403.7 or 403.16 errors.
Check whether the certificate hash displayed matches the Scale Out Master certificate thumbprint. If the
binding is not correct, reset the binding by running the following commands, and restart Scale Out Worker
service.
No log
Symptoms
Packages run successfully, but there no messages are logged.
Solution
Check whether SQL Server Authentication is allowed by the SQL Server instance that hosts SSISDB.
NOTE
If you have changed the account for Scale Out logging, see Change the Account for Scale Out Logging and verify the
connection string used for logging.
SELECT [TaskId]
FROM [SSISDB].[internal].[tasks] tasks, [SSISDB].[internal].[executions] executions
WHERE executions.execution_id = *Your Execution Id* AND tasks.JobId = executions.job_id
WARNING
This query is for troubleshooting purpose only. The internal views referenced in the query are to change in the future.
Next steps
For more info, see the following articles about setting up and configuring SSIS Scale Out:
Get started with Integration Services (SSIS) Scale Out on a single computer
Walkthrough: Set up Integration Services (SSIS) Scale Out
Integration Services (SSIS) Server and Catalog
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
After you design and test packages in SQL Server Data Tools, you can deploy the projects that contain the packages
to the Integration Services server.
The Integration Services server is an instance of the SQL Server Database Engine that hosts the SSISDB database.
The database stores the following objects: packages, projects, parameters, permissions, server properties, and
operational history.
The SSISDB database exposes the object information in public views that you can query. The database also
provides stored procedures that you can call to manage the objects.
Before you can deploy the projects to the Integration Services server, you need to create the SSISDB catalog.
For an overview of the SSISDB catalog functionality, see SSIS Catalog.
High Availability
Like other user databases, the SSISDB database supports database mirroring and replication. For more
information about mirroring and replication, see Database Mirroring (SQL Server).
You can also provide high-availability of SSISDB and its contents by making use of SSIS and Always On Availability
Groups. For more information, see Always On for SSIS Catalog (SSISDB. Also see this blog post by Matt Masson,
SSIS with Always On, at blogs.msdn.com.
Related Tasks
View the List of Packages on the Integration Services Server
Deploy Integration Services (SSIS) Projects and Packages
Run Integration Services (SSIS) Packages
Related Content
Blog entry, SSIS with Always On, at blogs.msdn.com.
SSIS Catalog
11/2/2020 • 29 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The SSISDB catalog is the central point for working with Integration Services (SSIS) projects that you've
deployed to the Integration Services server. For example, you set project and package parameters, configure
environments to specify runtime values for packages, execute and troubleshoot packages, and manage
Integration Services server operations.
NOTE
This article describes the SSIS Catalog in general, and the SSIS Catalog running on premises. You can also create the SSIS
Catalog in Azure SQL Database, and deploy and run SSIS packages in Azure. For more info, see Lift and shift SQL Server
Integration Services workloads to the cloud.
Although you can also run SSIS packages on Linux, the SSIS Catalog is not supported on Linux. For more info, see Extract,
transform, and load data on Linux with SSIS.
The objects that are stored in the SSISDB catalog include projects, packages, parameters, environments, and
operational history.
You inspect objects, settings, and operational data that are stored in the SSISDB catalog, by querying the views in
the SSISDB database. You manage the objects by calling stored procedures in the SSISDB database or by using
the UI of the SSISDB catalog. In many cases, the same task can be performed in the UI or by calling a stored
procedure.
To maintain the SSISDB database, it is recommended that you apply standard enterprise policies for managing
user databases. For information about creating maintenance plans, see Maintenance Plans.
The SSISDB catalog and the SSISDB database support Windows PowerShell. For more information about using
SQL Server with Windows PowerShell, see SQL Server PowerShell. For examples of how to use Windows
PowerShell to complete tasks such as deploying a project, see the blog entry, SSIS and PowerShell in SQL Server
2012, on blogs.msdn.com.
For more information about viewing operations data, see Monitor Running Package and Other Operations.
You access the SSISDB catalog in SQL Server Management Studio by connecting to the SQL Server Database
Engine and then expanding the Integration Ser vices Catalogs node in Object Explorer. You access the SSISDB
database in SQL Server Management Studio by expanding the Databases node in Object Explorer.
NOTE
You cannot rename the SSISDB database.
NOTE
If the SQL Server instance that the SSISDB database is attached to, stops or does not respond, the ISServerExec.exe
process ends. A message is written to a Windows Event log.
If the SQL Server resources fail over as part of a cluster failover, the running packages do not restart. You can use
checkpoints to restart packages. For more information, see Restart Packages by Using Checkpoints.
Catalog Configuration
You fine-tune how the catalog behaves by adjusting the catalog properties. Catalog properties define how
sensitive data is encrypted, and how operations and project versioning data is retained. To set catalog properties,
use the Catalog Proper ties dialog box or call the catalog.configure_catalog (SSISDB Database) stored
procedure. To view the properties, use the dialog box or query catalog.catalog_properties (SSISDB Database). You
access the dialog box by right-clicking SSISDB in Object Explorer.
Operations and Project Version Cleanup
Status data for many of the operations in the catalog is stored in internal database tables. For example, the
catalog tracks the status of package executions and project deployments. To maintain the size of the operations
data, the SSIS Ser ver Maintenance Job in SQL Server Management Studio is used to remove old data. This
SQL Server Agent job is created when Integration Services is installed.
You can update or redeploy an Integration Services project by deploying it with the same name to the same
folder in the catalog. By default, each time you redeploy a project, the SSISDB catalog retains the previous
version of the project. To maintain the size of the operations data, the SSIS Ser ver Maintenance Job is used to
remove old versions of projects.
To run the SSIS Ser ver Maintenance Job , SSIS creates the SQL Server login
##MS_SSISSer verCleanupJobLogin## . This login is only for internal use by SSIS.
The following SSISDB catalog properties define how this SQL Server Agent job behaves. You can view and
modify the properties by using the Catalog Proper ties dialog box or by using catalog.catalog_properties
(SSISDB Database) and catalog.configure_catalog (SSISDB Database).
Clean Logs Periodically
The job step for operations cleanup runs when this property is set to True .
Retention Period (days)
Defines the maximum age of allowable operations data (in days). Older data are removed.
The minimum value is one day. The maximum value is limited only by the maximum value of the SQL Server int
data. For information about this data type, see int, bigint, smallint, and tinyint (Transact-SQL).
Periodically Remove Old Versions
The job step for project version cleanup runs when this property is set to True .
Maximum Number of Versions per Project
Defines how many versions of a project are stored in the catalog. Older versions of projects are removed.
Encryption Algorithm
The Encr yption Algorithm property specifies the type of encryption that is used to encrypt sensitive parameter
values. You can choose from the following types of encryption.
AES_256 (default)
AES_192
AES_128
DESX
TRIPLE_DES_3KEY
TRIPLE_DES
DES
When you deploy an Integration Services project to the Integration Services server, the catalog automatically
encrypts the package data and sensitive values. The catalog also automatically decrypts the data when you
retrieve it. The SSISDB catalog uses the Ser verStorage protection level. For more information, see Access
Control for Sensitive Data in Packages.
Changing the encryption algorithm is a time-intensive operation. First, the server has to use the previously
specified algorithm to decrypt all configuration values. Then, the server has to use the new algorithm to re-
encrypt the values. During this time, there cannot be other Integration Services operations on the server. Thus, to
enable Integration Services operations to continue uninterrupted, the encryption algorithm is a read-only value
in the dialog box in Management Studio.
To change the Encr yption Algorithm property setting, set the SSISDB database to the single-user mode and
then call the catalog.configure_catalog stored procedure. Use ENCRYPTION_ALGORITHM for the property_name
argument. For the supported property values, see catalog.catalog_properties (SSISDB Database). For more
information about the stored procedure, see catalog.configure_catalog (SSISDB Database).
For more information about single-user mode, see Set a Database to Single-user Mode. For information about
encryption and encryption algorithms in SQL Server, see the topics in the section, SQL Server Encryption.
A database master key is used for the encryption. The key is created when you create the catalog.
The following table lists the property names shown in the Catalog Proper ties dialog box and the
corresponding properties in the database view.
Folders
A folder contains one or more projects and environments in the SSISDB catalog. You can use the catalog.folders
(SSISDB Database) view to access information about folders in the catalog. You can use the following stored
procedures to manage folders:
catalog.create_folder (SSISDB Database)
catalog.delete_folder (SSISDB Database)
catalog.rename_folder (SSISDB Database)
catalog.set_folder_description (SSISDB Database)
Parameters
You use parameters to assign values to package properties at the time of package execution. To set the value of a
package or project parameter and to clear the value, call catalog.set_object_parameter_value (SSISDB Database)
and catalog.clear_object_parameter_value (SSISDB Database). To set the value of a parameter for an instance of
execution, call catalog.set_execution_parameter_value (SSISDB Database). You can retrieve default parameter
values by calling catalog.get_parameter_values (SSISDB Database).
These views show the parameters for all packages and projects, and parameter values that are used for an
instance of execution.
catalog.object_parameters (SSISDB Database)
catalog.execution_parameter_values (SSISDB Database)
P RO P ERT Y N A M E
P RO P ERT Y N A M E ( C ATA LO G ( C ATA LO G. C ATA LO G_P RO P ERT IES
P RO P ERT IES DIA LO G B O X) VIEW ) DESC RIP T IO N
DES
TRIPLE_DES
TRIPLE_DES_3KEY
DESPX
AES_128
AES_192
AES_256 (default)
Maximum Number of Versions per MAX_PROJECT_VERSIONS Specify how many versions of a project
Project are stored in the catalog. Older
versions of projects that exceed the
maximum are removed when the
project version cleanup job runs.
3. Back up the SSISDB database by using the Backup Database dialog box in SQL Server Management
Studio. For more information, see How to: Back Up a Database (SQL Server Management Studio).
4. Generate the CREATE LOGIN script for ##MS_SSISServerCleanupJobLogin##, by doing the following
things. For more information, see CREATE LOGIN (Transact-SQL).
a. In Object Explorer in SQL Server Management Studio, expand the Security node and then expand
the Logins node.
b. Right-click ##MS_SSISSer verCleanupJobLogin## , and then click Script Login as > CREATE
To > New Quer y Editor Window .
5. If you are restoring the SSISDB database to an SQL Server instance where the SSISDB catalog was never
created, generate the CREATE PROCEDURE script for sp_ssis_startup, by doing the following things. For
more information, see CREATE PROCEDURE (Transact-SQL).
a. In Object Explorer, expand the Databases node and then expand the master > Programmability
> Stored Procedures node.
b. Right-click dbo.sp_ssis_star tup , and then click Script Stored Procedure as > CREATE To >
New Quer y Editor Window .
6. Confirm that SQL Server Agent has been started
7. If you are restoring the SSISDB database to an SQL Server instance where the SSISDB catalog was never
created, generate a script for the SSIS Server Maintenance Job by doing the following things. The script is
created in SQL Server Agent automatically when the SSISDB catalog is created. The job helps clean up
cleanup operation logs outside the retention window and remove older versions of projects.
a. In Object Explorer, expand the SQL Ser ver Agent node and then expand the Jobs node.
b. Right-click SSIS Server Maintenance Job, and then click Script Job as > CREATE To > New
Quer y Editor Window .
To Restore the SSIS Database
1. If you are restoring the SSISDB database to an SQL Server instance where the SSISDB catalog was never
created, enable common language runtime (clr) by running the sp_configure stored procedure. For more
information, see sp_configure (Transact-SQL) and clr enabled Option.
use master
sp_configure 'clr enabled', 1
reconfigure
2. If you are restoring the SSISDB database to an SQL Server instance where the SSISDB catalog was never
created, create the asymmetric key and the login from the asymmetric key, and grant UNSAFE permission
to the login.
You can find the value for YourSQLServerDefaultCompatibilityLevel from a list of SQL Server default
compatibility levels.
Integration Services CLR stored procedures require UNSAFE permissions to be granted to the login
because the login requires additional access to restricted resources, such as the Microsoft Win32 API. For
more information about the UNSAFE code permission, see Creating an Assembly.
3. Restore the SSISDB database from the backup by using the Restore Database dialog box in SQL Server
Management Studio. For more information, see the following topics:
Restore Database (General Page)
Restore Database (Files Page)
Restore Database (Options Page)
4. Execute the scripts that you created in the To Back up the SSIS Database for
##MS_SSISServerCleanupJobLogin##, sp_ssis_startup, and SSIS Server Maintenance Job. Confirm that
SQL Server Agent has been started.
5. Run the following statement to set the sp_ssis_startup procedure for autoexecution. For more information,
see sp_procoption (Transact-SQL).
NOTE
Confirm that the SQL Server service account has permissions to read the backup key file.
NOTE
You see the following warning message displayed in SQL Server Management Studio if the database master
key has not yet been encrypted by the service master key. Ignore the warning message.
The current master key cannot be decr ypted. The error was ignored because the FORCE
option was specified.
The FORCE argument specifies that the restore process should continue even if the current database
master key is not open. For the SSISDB catalog, because the database master key has not been opened on
the instance where you are restoring the database, you see this message.
Method 2
Use this method if you have the original password that was used to create SSISDB.
open master key decryption by password = 'LS1Setup!' --'Password used when creating SSISDB'
Alter Master Key Add encryption by Service Master Key
8. Determine whether the SSISDB catalog schema and the Integration Services binaries (ISServerExec and
SQLCLR assembly) are compatible, by running catalog.check_schema_version.
9. To confirm that the SSISDB database has been restored successfully, perform operations against the
SSISDB catalog such as running packages that have been deployed to the Integration Services server. For
more information, see Run Integration Services (SSIS) Packages.
To Move the SSIS Database
Follow the instructions for moving user databases. For more information, see Move User Databases.
Ensure that you back up the master key for the SSISDB database and protect the backup file. For more
information, see To Back up the SSIS Database.
Ensure that the Integration Services (SSIS) relevant objects are created in the new SQL Server instance
where the SSISDB catalog has not yet been created.
4. On the Select Instance page, select a SQL Server instance on the local server.
IMPORTANT
The wizard can only upgrade the database on a local server instance.
Select the checkbox to indicate that you have backed up the SSISDB database before running the wizard.
5. Select Upgrade to upgrade the SSIS Catalog database.
6. On the Result page, review the results.
Always On for SSIS Catalog (SSISDB)
The Always On Availability Groups feature is a high-availability and disaster-recovery solution that provides an
enterprise-level alternative to database mirroring. An availability group supports a failover environment for a
discrete set of user databases, known as availability databases, that fail over together. For more information, see
Always On Availability Groups.
In order to provide the high-availability for the SSIS catalog (SSISDB) and its contents (projects, packages,
execution logs, etc.), you can add the SSISDB database ( just the same as any other user database) to an Always
On Availability Group. When a failover occurs, one of the secondary nodes automatically becomes the new
primary node.
IMPORTANT
When a failover occurs, packages that were running do not restart or resume.
In this section:
1. Prerequisites
2. Configure SSIS support for Always On
3. Upgrading SSISDB in an availability group
Prerequisites
Do the following prerequisite steps before enabling Always On support for the SSISDB database.
1. Set up a Windows failover cluster. See Installing the Failover Cluster Feature and Tools for Windows Server
2012 blog post for instructions. Install the feature and tools on all cluster nodes.
2. Install SQL Server 2016 with Integration Services (SSIS) feature on each node of the cluster.
3. Enable Always On Availability Groups for each SQL Server instance. See Enable Always On Availability
Groups for details.
Configure SSIS support for Always On
Step 1: Create Integration Services Catalog
Step 2: Add SSISDB to an Always On Availability Group
Step 3: Enable SSIS support for Always On
IMPORTANT
You must perform these steps on the primar y node of the availability group.
You must enable SSIS suppor t for Always On after you add SSISDB to an Always On Availability Group.
NOTE
For more info about this procedure, see the following walkthrough with additional screen shots by Data Platform MVP
Marcos Freccia: Adding SSISDB to AG for SQL Server 2016.
The newly added secondary replicas from the Always On availability group are shown in the table. Click
Connect... button for each replica in the list and enter authentication credentials to connect to the replica. The
user account must be a member of sysadmin group on each replica to enable SSIS support for Always On. After
you successfully connect to each replica, click OK to enable SSIS support for Always On.
If the Enable Always On suppor t option on the context menu appears to be disabled after you've completed
the other prerequisites, try these things:
1. Refresh the context menu by clicking the Refresh option.
2. Make sure you are connecting to the primary node. You have to enable Always On support on the primary
node.
3. Make sure the SQL Server version is 13.0 or higher. SSIS supports Always On only on SQL Server 2016 and
later versions.
Upgrading SSISDB in an availability group
If you're upgrading SQL Server from a previous version, and SSISDB is in an Always On availability group, your
upgrade may be blocked by the "SSISDB in Always On Availability Group check" rule. This blocking occurs
because upgrade runs in single-user mode, while an availability database must be a multi-user database.
Therefore, during upgrade or patching, all availability databases including SSISDB are taken offline and are not
upgraded or patched. To let upgrade continue, first remove SSISDB from the availability group, then upgrade or
patch each node, then add SSISDB back to the availability group.
If you are blocked by the "SSISDB in Always On Availability Group check" rule, follow these steps to upgrade SQL
Server.
1. Remove the SSISDB database from the availability group. For more info, see Remove a Secondary
Database from an Availability Group (SQL Server) and Remove a Primary Database from an Availability
Group (SQL Server).
2. Click Rerun in the upgrade wizard. The "SSISDB in Always On Availability Group check" rule passes.
3. Click the Next to continue the upgrade.
4. After you have upgraded all the nodes, add the SSISDB database back to the Always On availability group.
For more info, see Add a Database to an Availability Group (SQL Server).
If you're not blocked when you upgrade SQL Server, and SSISDB is in an Always On availability group, upgrade
SSISDB separately after you upgrade the SQL Server database engine. Use the SSIS Upgrade Wizard to upgrade
the SSISDB as described in the following procedure.
1. Move the SSISDB database out of the availability group, or delete the availability group if SSISDB is the
only database in the availability group. Launch SQL Ser ver Management Studio on the primar y node
of the availability group to perform this task.
2. Remove the SSISDB database from all replica nodes .
3. Upgrade the SSISDB database on the primar y node . InObject Explorer in SQL Server Management
Studio, expand Integration Ser vices Catalogs , right-click SSISDB , and then select Database Upgrade .
Follow the instructions in the SSISDB Upgrade Wizard to upgrade the database. Launch the SSIDB
Upgrade Wizard locally on the primar y node .
4. Follow the instructions in Step 2: Add SSISDB to an Always On Availability Group to add the SSISDB back
to an availability group.
5. Follow the instructions in Step 3: Enable SSIS support for Always On.
Related Content
Blog entry, SSIS and PowerShell in SQL Server 2012, on blogs.msdn.com.
Blog entry, SSIS Catalog Access Control Tips, on blogs.msdn.com.
Blog entry, A Glimpse of the SSIS Catalog Managed Object Model, on blogs.msdn.com.
View the List of Packages on the Integration Services
Server
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can view the list of packages that are stored on the Integration Services server in one of two ways.
Transact-SQL access
To view the list of packages that are stored on the server, query the view, catalog.packages (SSISDB Database).
In SQL Server Management Studio
To view packages stored on the server by using Object Explorer in SQL Server Management Studio, follow the
procedure below.
To view packages using SQL Server Management Studio
1. In SQL Server Management Studio, connect to the Integration Services server. That is, connect to the
instance of the SQL Server Database Engine that hosts the Integration Services database.
2. In Object Explorer, expand the tree to display the Integration Ser vices Catalogs node.
3. Expand the Integration Ser vices Catalogs node to display the SSISDB node.
4. Expand the SSISDB node to display a list of one or more folders. Each folder contains one or more projects
in the Projects folder, and each project contains one more packages in the Packages folder.
Integration Services (SSIS) Catalog Transact-SQL
Reference
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Views (Integration Services Catalog)
Stored Procedures (Integration Services Catalog)
Functions (Integration Services Catalog)
Browse All Principals Dialog Box
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Browse All Principals dialog box to select a database principal to change the principal's permissions on
the selected project or on all projects contained in a selected folder.
What do you want to do?
Open the Browse All Principals dialog box
Configure the Options
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Configure dialog box to configure parameters, connection managers, and references to environments, for
packages and projects.
What do you want to do?
Open the Configure Dialog Box
Set the options on the Parameters page
Set the options on the References page
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A folder contains projects and environments in the SSISDB catalog. Each folder defines permissions that apply to
the contents of the folder. For more information about Integration Services permissions, see
catalog.grant_permission (SSISDB Database).
See Also
Integration Services (SSIS) Server
catalog.grant_permission (SSISDB Database)
Package Properties Dialog Box
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Package Proper ties dialog box to view properties for packages that are stored on the Integration
Services server.
For more information, see Integration Services (SSIS) Server.
What do you want to do?
Open the Package Properties dialog box
Configure the Options
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An Integration Services project is a unit of deployment. Each project can contain packages, parameters, and
environment references. A project is a securable object and can define permissions for database principals. When a
project is re-deployed, the previous version of the project can be stored in the Integration Services catalog.
Project parameters and package parameters can be used to assign values to properties within packages at the time
of execution. Some parameters require values before the package can be executed. Parameter values that reference
environment variables require that the project has the corresponding environment reference prior to execution.
What do you want to do?
Open the Project Properties dialog box
Set the options on the General page
Set the options on the Permissions page
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Project Versions dialog box to view versions of a project and to restore a previous version.
You can also view previous versions in the catalog.object_versions (SSISDB Database) view, and use the
catalog.restore_project (SSISDB Database) stored procedure to restore previous versions.
What do you want to do?
Open the Project Versions dialog box
Restore a Project Version
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Set Parameter Value dialog box to set values for parameters and connection manager properties, for
projects and packages.
What do you want to do?
Open the Set Parameter Value dialog box
Configure the options
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Use the Validate dialog box to check for common problems in Integration Services a project or package.
If there is a problem, a message is displayed at the top of the dialog box. Otherwise, the term Ready displays at the
top.
What do you want to do?
Open the Validate dialog box
Set the options on the General page
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The topics in this section discuss the Integration Services service, a Windows service for managing Integration
Services packages. This service is not required to create, save, and run Integration Services packages. SQL Server
2012 (11.x) supports the Integration Services service for backward compatibility with earlier releases of
Integration Services.
Starting in SQL Server 2012 (11.x), Integration Services stores objects, settings, and operational data in the
SSISDB database for projects that you've deployed to the Integration Services server using the project
deployment model. The Integration Services server, which is an instance of the SQL Server Database Engine,
hosts the database. For more information about the database, see SSIS Catalog. For more information about
deploying projects to the Integration Services server, see Deploy Integration Services (SSIS) Projects and
Packages.
Management capabilities
The Integration Services service is a Windows service for managing Integration Services packages. The
Integration Services service is available only in SQL Server Management Studio.
Running the Integration Services service provides the following management capabilities:
Starting remote and locally stored packages
Stopping remote and locally running packages
Monitoring remote and locally running packages
Importing and exporting packages
Managing package storage
Customizing storage folders
Stopping running packages when the service is stopped
Viewing the Windows Event log
Connecting to multiple Integration Services servers
Startup type
The Integration Services service is installed when you install the Integration Services component of SQL Server.
By default, the Integration Services service is started and the startup type of the service is set to automatic. The
service must be running to monitor the packages that are stored in the SSIS Package Store. The SSIS Package
Store can be either the msdb database in an instance of SQL Server or the designated folders in the file system.
The Integration Services service is not required if you only want to design and execute Integration Services
packages. However, the service is required to list and monitor packages using SQL Server Management Studio.
NOTE
To connect directly to an instance of the legacy Integration Services Service, you have to use the version of SQL Server
Management Studio (SSMS) aligned with the version of SQL Server on which the Integration Services Service is running.
For example, to connect to the legacy Integration Services Service running on an instance of SQL Server 2016, you have to
use the version of SSMS released for SQL Server 2016. Download SQL Server Management Studio (SSMS).
In the SSMS Connect to Ser ver dialog box, you cannot enter the name of a server on which an earlier version of the
Integration Services service is running. However, to manage packages that are stored on a remote server, you do not have
to connect to the instance of the Integration Services service on that remote server. Instead, edit the configuration file for
the Integration Services service so that SQL Server Management Studio displays the packages that are stored on the
remote server.
You can only install a single instance of the Integration Services service on a computer. The service is not specific
to a particular instance of the Database Engine. You connect to the service by using the name of the computer on
which it is running.
You can manage the Integration Services service by using one of the following Microsoft Management Console
(MMC) snap-ins: SQL Server Configuration Manager or Services. Before you can manage packages in SQL Server
Management Studio, you must make sure that the service is started.
By default, the Integration Services service is configured to manage packages in the msdb database of the
instance of the Database Engine that is installed at the same time as Integration Services. If an instance of the
Database Engine is not installed at the same time, the Integration Services service is configured to manage
packages in the msdb database of the local, default instance of the Database Engine. To manage packages that are
stored in a named or remote instance of the Database Engine, or in multiple instances of the Database Engine,
you have to modify the configuration file for the service.
By default, the Integration Services service is configured to stop running packages when the service is stopped.
However, the Integration Services service does not wait for packages to stop and some packages may continue
running after the Integration Services service is stopped.
If the Integration Services service is stopped, you can continue to run packages using the SQL Server Import and
Export Wizard, the SSIS Designer, the Execute Package Utility, and the dtexec command prompt utility
(dtexec.exe). However, you cannot monitor the running packages.
By default, the Integration Services service runs in the context of the NETWORK SERVICE account. It is
recommended to run the SQL Server Integration Services service under an account that has limited permissions
such as the NETWORK SERVICE account. Running the SQL Server Integration Services service under a highly-
priveleged account represents a potential security risk.
The Integration Services service writes to the Windows event log. You can view service events in SQL Server
Management Studio. You can also view service events by using the Windows Event Viewer.
NOTE
The Advanced tab contains no information for Integration Services service.
4. Click OK .
5. On the File menu, click Exit to close the SQL Ser ver Configuration Manager snap-in.
To set properties of the Integration Services service by using Services
1. In Control Panel , if you are using Classic View, click Administrative Tools , or, if you are using Category
View, click Performance and Maintenance and then click Administrative Tools .
2. Click Ser vices .
3. In the Ser vices snap-in, locate SQL Ser ver Integration Ser vices in the list of services, right-click SQL
Ser ver Integration Ser vices , and then click Proper ties .
4. In the SQL Ser ver Integration Ser vices Proper ties dialog box, you can do the following:
Click the General tab. To enable the service, select either the manual or automatic startup type. To
disable the service, select Disable in the Star tup type box. Selecting Disable does not stop the
service if it is currently running.
If the service is already enabled, you can click Stop to stop the service, or click Star t to start the
service.
Click the Log On tab to view or edit the logon information.
Click the Recover y tab to view the default computer responses to service failure. You can modify
these options to suit your environment.
Click the Dependencies tab to view a list of dependent services. The Integration Services service
has no dependencies.
5. Click OK .
6. Optionally, if the startup type is Manual or Automatic, you can right-click SQL Ser ver Integration
Ser vices and click Star t, Stop, or Restar t .
7. On the File menu, click Exit to close the Ser vices snap-in.
NOTE
Some characters are not valid in folder names. Valid characters for folder names are determined by the .NET Framework
class System.IO.Path and the GetInvalidFilenameChars field. The GetInvalidFilenameChars field provides a
platform-specific array of characters that cannot be specified in path string arguments passed to members of the Path
class. The set of invalid characters can vary by file system. Typically, invalid characters are the quotation mark ("), less than
(<) character, and pipe (|) character.
However, you will have to modify the configuration file to manage packages that are stored in a named instance
or a remote instance of Database Engine. If you do not update the configuration file, you cannot use Object
Explorer in SQL Server Management Studio to view packages that are stored in the msdb database on the
named instance or the remote instance. If you try to use Object Explorer to view these packages, you receive
the following error message:
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
The SQL Server specified in Integration Services service configuration is not present or is not available.
This might occur when there is no default instance of SQL Server on the computer. For more information, see
the topic "Configuring the Integration Services Service" in SQL Server 2008 Books Online.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2008, this
failure may be caused by the fact that under the default settings SQL Server does not allow remote
connections.
Named Pipes Provider: Could not open a connection to SQL Server [2]. (MsDtsSvr).
To modify the configuration file for the Integration Services service, you use a text editor.
IMPORTANT
After you modify the service configuration file, you must restart the service to use the updated service configuration.
Incorrectly editing the Registry can cause serious problems that may require you to reinstall your operating
system. Microsoft cannot guarantee that problems resulting from editing the Registry incorrectly can be resolved.
Before editing the Registry, back up any valuable data. For information about how to back up, restore, and edit
the Registry, see the Microsoft Knowledge Base article, Description of the Microsoft Windows registry.
The Integration Services service loads the configuration file when the service is started. Any changes to the
Registry entry require that the service be restarted.
IMPORTANT
To connect directly to an instance of the legacy Integration Services Service, you have to use the version of SQL Server
Management Studio (SSMS) aligned with the version of SQL Server on which the Integration Services Service is running.
For example, to connect to the legacy Integration Services Service running on an instance of SQL Server 2016, you have to
use the version of SSMS released for SQL Server 2016. Download SQL Server Management Studio (SSMS).
To manage packages that are stored on a remote server, you do not have to connect to the instance of the Integration
Services service on that remote server. Instead, edit the configuration file for the Integration Services service so that SQL
Server Management Studio displays the packages that are stored on the remote server.
NOTE
The Integration Services service is not instance-specific. You connect to the service by using the name of the
computer on which the Integration Services service is running.
5. Click Connect .
NOTE
The Browse for Ser vers dialog box does not display remote instances of Integration Services. In addition, the options
available on the Connection Options tab of the Connect to Ser ver dialog box, which is displayed by clicking the
Options button, are not applicable to Integration Services connections.
IMPORTANT
To manage packages that are stored on a remote server, you do not have to connect to the instance of the Integration
Services service on that remote server. Instead, edit the configuration file for the Integration Services service so that SQL
Server Management Studio displays the packages that are stored on the remote server.
netsh firewall add portopening protocol=TCP port=135 name="RPC (TCP/135)" mode=ENABLE scope=SUBNET
The following procedure describes how to use the Windows user interface to open TCP port 135, add
MsDtsSrvr.exe to the exception list, and specify the scope of unblocking for the firewall.
To configure a firewall using the Windows firewall dialog box
1. In the Control Panel, double-click Windows Firewall .
2. In the Windows Firewall dialog box, click the Exceptions tab and then click Add Program.
3. In the Add a Program dialog box, click Browse , navigate to the Program Files\Microsoft SQL
Server\100\DTS\Binn folder, click MsDtsSrvr.exe, and then click Open . Click OK to close the Add a
Program dialog box.
4. On the Exceptions tab, click Add Por t.
5. In the Add a Por t dialog box, type RPC(TCP/135) or another descriptive name in the Nam e box, type
135 in the Por t Number box, and then select TCP .
IMPORTANT
Integration Services service always uses port 135. You cannot specify a different port.
6. In the Add a Por t dialog box, you can optionally click Change Scope to modify the default scope.
7. In the Change Scope dialog box, select My network (subnet only) or type a custom list, and then click
OK .
8. To close the Add a Por t dialog box, click OK .
9. To close the Windows Firewall dialog box, click OK .
NOTE
To configure the Windows firewall, this procedure uses the Windows Firewall item in Control Panel. The
Windows Firewall item only configures the firewall for the current network location profile. However, you can also
configure the Windows firewall by using the netsh command line tool or the Microsoft Management Console
(MMC) snap-in named Windows firewall with Advanced Security. For more information about these tools, see
Configure the Windows Firewall to Allow SQL Server Access.
Package Management (SSIS Service)
11/2/2020 • 11 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Package management includes monitoring, managing, importing and exporting packages.
Package Store
Integration Services provides two top-level folders for accessing packages:
Running Packages
Stored Packages
The Running Packages folder lists the packages that are currently running on the server. The Stored Packages
folder lists the packages that are saved in the package store. These are the only packages that the Integration
Services service manages. The package store can consist of either or both the msdb database and file system
folders listed in the Integration Services service configuration file. The configuration file specifies the msdb and
file system folders to manage. You might also have packages stored elsewhere in the file system that are not
managed by the Integration Services service.
Packages you save to msdb are stored in a table named sysssispackages. When you save packages to msdb, you
can group them in logical folders. Using logical folders can help you organize packages by purpose, or filter
packages in the sysssispackages table. Create new logical folders in SQL Server Management Studio. By default,
any logical folders that you add to msdb are automatically included in the package store.
The logical folders you create are represented as rows in the sysssispackagefolders table in msdb. The folderid
and parentfolderid columns in sysssispackagefolders define the folder hierarchy. The root logical folders in msdb
are the rows in sysssispackagefolders with null values in the parentfolderid column. For more information, see
sysssispackages (Transact-SQL) and sysssispackagefolders (Transact-SQL&).
When you open SQL Server Management Studio and connect to Integration Services, you will see the msdb
folders that Integration Services service manages listed within the Stored Packages folder. If the configuration file
specifies root file system folders, the Stored Packages folder also lists packages saved to the file system in those
folders and in all subfolders.
You can store packages in any file system folder, but they will not be listed in subfolders of the Stored Packages
folder unless you add the folder to the list of folders in the configuration file for the package store. For more
information about the configuration file, see Integration Services Service (SSIS Service).
The Running Packages folder contains no subfolders and it is not extensible.
By default, the Stored Packages folder contains two folders: File System and MSDB . The File System folder
lists the packages that are saved to the file system. The location of these files is specified in the configuration file
for the Integration Services service. The default folder is the Packages folder, located in %Program
Files%\Microsoft SQL Server\100\DTS. The MSDB folder lists the Integration Services packages that have been
saved to the SQL Server msdb database on the server. The sysssispackages table contains the packages saved to
msdb.
To view the list of packages in the package store, you must open SQL Server Management Studio and connect to
Integration Services.
Monitor running packages
The Running Packages folder lists packages currently running. To view information about current packages on
the Summar y page of SQL Server Management Studio, click the Running Packages folder. Information such as
the execution duration of running packages is listed on the Summar y page. Optionally, refresh the folder to
display the most current information.
To view information about a single running package on the Summar y page, click the package. The Summar y
page displays information such as the version and description of the package.
Stop a running package from the Running Packages folder by right-clicking the package and then clicking Stop .
IMPORTANT
If you cannot connect to Integration Services, the Integration Services service is likely not running. To learn the
status of the service, click Star t , point to All Programs , point to Microsoft SQL Ser ver , point to
Configuration Tools , and then click SQL Ser ver Configuration Manager . In the left pane, click SQL Ser ver
Ser vices . In the right pane, find the Integration Services service. Start the service if it is not already running.
SQL Server Management Studio opens. By default the Object Explorer window is open and positioned in
the lower-left corner of the studio. If Object Explorer is not open, click Object Explorer on the View menu.
To view the packages that Integration Services service manages
1. In Object Explorer, expand the Stored Packages folder.
2. Expand the Stored Packages subfolders to show packages.
IMPORTANT
Whenever possible, use Windows Authentication.
Authentication type
Select an authentication type.
User name
If using SQL Server Authentication, provide a user name.
Password
If using SQL Server Authentication, provide a password.
Package path
Type the package path, or click the browse button (...) and locate the package.
Package name
Optionally, rename the package. The default name is the name of the package to import.
Protection level
Click the browse button (...) and, in the Package Protection Level dialog box, update the protection level. For
more information, see Package and Project Protection Level Dialog Box.
IMPORTANT
Whenever possible, use Windows Authentication.
Authentication type
Select an authentication type.
User name
If using SQL Server Authentication, provide a user name.
Password
If using SQL Server Authentication, provide a password.
Package path
Type the package path, or click the browse button (...) and locate the folder in which to store the package.
Protection level
Click the browse button (...) and update the protection level in the Package Protection Level dialog box. For
more information, see Package and Project Protection Level Dialog Box.
See Also
Integration Services Service (SSIS Service)
Events Logged by the Integration Services Service
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Integration Services service logs various messages to the Windows Application event log. The service logs
these messages when the service starts, when the service stops, and when certain problems occur.
This topic provides information about the common event messages that the service logs to the Application event
log. The Integration Services service logs all the messages described in this topic with an Event Source of
SQLISService.
For general information about the Integration Services service, see Integration Services Service (SSIS Service).
EVEN T ID SY M B O L IC N A M E T EXT N OT ES
260 DTS_MSG_SERVER_START_FA Microsoft SSIS Service failed The service was not able to
ILED to start.%nError: %1 start. This inability to start
might be the result of a
damaged installation or an
inappropriate service
account.
EVEN T ID SY M B O L IC N A M E T EXT N OT ES
Other messages
EVEN T ID SY M B O L IC N A M E T EXT N OT ES
View events
There are two tools in which you can view events for the Integration Services service:
The Log File Viewer dialog box in SQL Server Management Studio. The Log File Viewer dialog box
includes options to export, filter, and search the log. For more information about the options in the Log File
Viewer , see Log File Viewer F1 Help.
The Windows Event Viewer.
For descriptions of the events logged by the Integration Services service, see Events Logged by the Integration
Services Service.
To view service events for Integration Services in SQL Server Management Studio
1. Open SQL Server Management Studio.
2. On the File menu, click Connect Object Explorer .
3. In the Connect to Ser ver dialog box, select the Integration Services server type, select or locate the server
to connect to, and then click Connect .
4. In Object Explorer, right-click Integration Services and click View Logs .
5. To view Integration Services events, select SQL Ser ver Integration Ser vices . The NT Events option is
automatically selected and cleared with the SQL Ser ver Integration Ser vices option.
To view service events for Integration Services in Windows Event Viewer
1. In Control Panel , if you are using Classic View, click Administrative Tools , or, if you are using Category
View, click Performance and Maintenance and then click Administrative Tools .
2. Click Event Viewer .
3. In the Event Viewer dialog box, click Application .
4. In the Application snap-in, locate an entry in the Source column that has the value SQLISSer vice , right-
click the entry, and then click Proper ties .
5. Optionally, click the up or down arrow to show the previous or next event.
6. Optionally, click the Copy to Clipboard icon to copy the event information.
7. Choose to display event data using bytes or words.
8. Click OK .
9. On the File menu, click Exit to close the Event Viewer dialog box.
Related Tasks
For information about how to view log entries, see Events Logged by an Integration Services Package
Integration Services (SSIS) in a Cluster
11/2/2020 • 9 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Clustering Integration Services is not recommended because the Integration Services service is not a clustered or
cluster-aware service, and does not support failover from one cluster node to another. Therefore, in a clustered
environment, Integration Services should be installed and started as a stand-alone service on each node in the
cluster.
Although the Integration Services service is not a clustered service, you can manually configure the service to
operate as a cluster resource after you install Integration Services separately on each node of the cluster.
However, if high availability is your goal in establishing a clustered hardware environment, you can achieve this
goal without configuring the Integration Services service as a cluster resource. To manage your packages on any
node in the cluster from any other node in the cluster, modify the configuration file for the Integration Services
service on each node in the cluster. You modify each of these configuration files to point to all available instances of
SQL Server on which packages are stored. This solution provides the high availability that most customers need,
without the potential problems encountered when the Integration Services service is configured as a cluster
resource. For more information about how to change the configuration file, see Integration Services Service (SSIS
Service).
Understanding the role of the Integration Services service is critical to making an informed decision about how to
configure the service in a clustered environment. For more information, see Integration Services Service (SSIS
Service).
Disadvantages
Some of the potential disadvantages of configuring the Integration Services service as a cluster resource include
the following:
When a failover occurs, running packages do not restar t.
You can recover from package failures by restarting packages from checkpoints. You can restart from
checkpoints without configuring the service as a cluster resource. For more information, see Restart
Packages by Using Checkpoints.
When you configure the Integration Services service in a different resource group from SQL Server, you
cannot use Management Studio from client computers to manage packages that are stored in the msdb
database. The Integration Services service cannot delegate credentials in this double-hop scenario.
When you have multiple SQL Server resource groups that include the Integration Services service in a
cluster, a failover could lead to unexpected results. Consider the following scenario. Group1, which includes
the SQL Server service and the Integration Services service, is running on Node A. Group2, which also
includes the SQL Server service and the Integration Services service, is running on Node B. Group 2 fails
over to Node A. The attempt to start another instance of the Integration Services service on Node A fails
because the Integration Services service is a single-instance service. Whether the SQL Server service that is
trying to fail over to Node A also fails depends on the configuration of the Integration Services service in
Group 2. If the Integration Services service was configured to affect the other services in the resource group,
the SQL Server service that is failing over will fail because the Integration Services service failed. If the
service was configured not to affect the other services in the resource group, the SQL Server service will be
able to fail over to Node A.Unless the Integration Services service in Group 2 was configured not to affect
the other services in the resource group, the failure of the Integration Services service that is failing over
could cause the SQL Server service that is failing over to fail also.
Client computers can use SQL Server Management Studio Client computers cannot use SQL Server Management
to manage packages stored in the msdb database because Studio to manage packages stored in the msdb database.
both the SQL Server Database Engine and Integration The client can connect to the virtual server on which the
Services service are running on the same virtual server. Integration Services service is running. However, that
This configuration avoids the delegation issues of the computer cannot delegate the user's credentials to the
double-hop scenario. virtual server on which SQL Server is running. This is
known as a double-hop scenario.
The Integration Services service competes with other SQL The Integration Services service does not compete with
Server services for CPU and other computer resources. other SQL Server services for CPU and other computer
resources because the different resource groups are
configured on different nodes.
The loading and saving of packages to the msdb database The loading and saving of packages to the msdb database
is faster and generates less network traffic because both might be slower and generate more network traffic.
services are running on the same computer.
Both services are online or offline at the same time. The Integration Services service might be online while the
SQL Server Database Engine is offline. Thus, the packages
stored in the msdb database of the SQL Server Database
Engine are unavailable.
The Integration Services service cannot be moved quickly The Integration Services service can be moved more
to another node if it is required. quickly to another node if it is required.
After you have decided to which resource group you will add Integration Services, you have to configure
Integration Services as a cluster resource in that group.
Configure the Integration Services service and package store.
Having configured Integration Services as a cluster resource, you must modify the location and the content
of the configuration file for the Integration Services service on each node in the cluster. These modifications
make both the configuration file and the package store available to all nodes if there is a failover. After you
modify the location and content of the configuration file, you have to bring the service online.
Bring the Integration Services service online as a cluster resource.
After configuring the Integration Services service on a cluster, or on any server, you might have to configure DCOM
permissions before you can connect to the service from a client computer. For more information, see Integration
Services Service (SSIS Service).
The Integration Services service cannot delegate credentials. Therefore, you cannot use Management Studio to
manage packages stored in the msdb database when the following conditions are true:
The Integration Services service and SQL Server are running on separate servers or virtual servers.
The client that is running SQL Server Management Studio is a third computer.
The client can connect to the virtual server on which the Integration Services service is running. However, that
computer cannot delegate the user's credentials to the virtual server on which SQL Server is running. This is known
as a double-hop scenario.
To Install Integration Services on a Cluster
1. Install and configure a cluster with one or more nodes.
2. (Optional) Install clustered services, such as the SQL Server Database Engine.
3. Install Integration Services on each node of the cluster.
To Configure Integration Services as a Cluster Resource
1. Open the Cluster Administrator .
2. In the console tree, select the Groups folder.
3. In the results pane, select the group to which you plan to add Integration Services:
To add Integrations Services as a cluster resource to the same resource group as SQL Server, select
the group to which SQL Server belongs.
To add Integrations Services as a cluster resource to a different group than SQL Server, select a group
other than the group to which SQL Server belongs.
4. On the File menu, point to New , and then click Resource .
5. On the New Resource page of the Resource Wizard, type a name and select "Generic Ser vice" as the
Ser vice Type . Do not change the value of Group . Click Next .
6. On the Possible Owners page, add or remove the nodes of the cluster as the possible owners of the
resource. Click Next .
7. To add dependencies, on the Dependencies page, select a resource under Available resources , and then
click Add . In case of a failover, both SQL Server and the shared disk that stores Integration Services
packages should come back online before Integration Services is brought online. After you have selected the
dependencies, click Next .
For more information, see Add Dependencies to a SQL Server Resource.
8. On the Generic Ser vice Parameters page, enter MsDtsSer ver as the name of the service. Click Next .
9. On the Registr y Replication page, click Add to add the registry key that identifies the location of the
configuration file for the Integration Services service. This file must be located on a shared disk that is in the
same resource group as the Integration Services service.
10. In the Registr y Key dialog box, type SOFTWARE\Microsoft\Microsoft SQL
Ser ver\100\SSIS\Ser viceConfigFile . Click OK , and then click Finish .
The Integration Services service has now been added as a cluster resource.
To Configure the Integration Services Service and Package Store
1. Locate the configuration file at %ProgramFiles%\Microsoft SQL Server\100\DTS\Binn\MsDtsSrvr.ini.xml.
Copy it to the shared disk for the group to which you added the Integration Services service.
2. On the shared disk, create a new folder named Packages to serve as the package store. Grant List Folders
and Write permissions on the new folder to appropriate users and groups.
3. On the shared disk, open the configuration file in a text or XML editor. Change the value of the Ser verName
element to the name of the virtual SQL Server that is in the same resource group.
4. Change the value of the StorePath element to the fully-qualified path of the Packages folder created on the
shared disk in a previous step.
5. On each node, update the value of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Ser ver\100\SSIS\Ser viceConfigFile in the Registry to the fully-qualified path and file name of the
service configuration file on the shared disk.
To bring the Integration Services service online
In the Cluster Administrator , select the Integration Services service, right-click, and select Bring Online from
the popup menu. The Integration Services service is now online as a cluster resource.
Security Overview (Integration Services)
11/2/2020 • 9 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Security in SQL Server Integration Services consists of several layers that provide a rich and flexible security
environment. These security layers include the use of digital signatures, package properties, SQL Server database
roles, and operating system permissions. Most of these security features fall into the categories of identity and
access control.
Package source The source of a package is the Identify the source of a package by
individual or organization that created using a digital signature, and run
the package. Running a package from packages that come from only known,
an unknown or untrusted source might trusted sources. For more information,
be risky. see Identify the Source of Packages with
Digital Signatures.
Package contents Package contents include the elements Control access to a package and to the
in the package and their properties. The contents by doing the following steps:
properties can contain sensitive data
such as a password or a connection 1) To control access to the package
string. Package elements such as an itself, apply SQL Server security features
SQL statement can reveal the structure to packages that are saved to the
of your database. msdb database in an instance of SQL
Server. To packages that are saved in
the file system, apply file system
security features, such as access
controls lists (ACLs).
Package output When you configure a package to use To protect configurations and logs that
configurations, checkpoints, and the package saves to SQL Server
logging, the package stores this database tables, use SQL Server
information outside the package. The security features.
information that is stored outside the
package might contain sensitive data. To control access to files, use the access
control lists (ACLs) available in the file
system.
Identity Features
By implementing identity features in your packages, you can achieve the following goal:
Ensure that you only open and run packages from trusted sources .
To ensure that you only open and run packages from trusted sources, you first have to identify the source of
packages. You can identify the source by signing packages with certificates. Then, when you open or run the
packages, you can have Integration Services check for the presence and the validity of the digital signatures. For
more information, see Identify the Source of Packages with Digital Signatures.
Related Tasks
The following list contains links to topics that show you how to perform a certain task pertaining to the security.
Create a User-Defined Role
Assign a Reader and Writer Role to a Package
Implement a Signing Policy by Setting a Registry Value
Sign a Package by Using a Digital Certificate
Set or Change the Protection Level of Packages
Access Control for Sensitive Data in Packages
11/2/2020 • 10 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To protect the data in an Integration Services package, you can set a protection level that helps protect just
sensitive data or all the data in the package. Furthermore, you can encrypt this data with a password or a user
key, or rely on the database to encrypt the data. Also, the protection level that you use for a package is not
necessarily static, but changes throughout the life cycle of the package. You often set one protection level during
development and another as soon as you deploy the package.
NOTE
In addition to the protection levels described in this topic, you can use fixed database-level roles to protect packages that
are saved to the Integration Services server.
Encryption
Encryption, as used by package protection levels, is performed by using the Microsoft Data Protection API
(DPAPI), which is part of the Cryptography API (CryptoAPI).
The package protection levels that encrypt packages by using passwords require that you provide a password
also. If you change the protection level from a level that does not use a password to one that does, you will be
prompted for a password.
Also, for the protection levels that use a password, Integration Services uses the Triple DES cipher algorithm with
a key length of 192 bits, available in the .NET Framework Class Library (FCL).
Protection Levels
The following table describes the protection levels that Integration Services provides. The values in parentheses
are values from the DTSProtectionLevel enumeration. These values appear in the Properties window that you use
to configure the properties of the package when you work with packages in SQL Server Data Tools (SSDT).
P ROT EC T IO N L EVEL DESC RIP T IO N
Do not save sensitive (DontSaveSensitive ) Suppresses the values of sensitive properties in the package
when the package is saved. This protection level does not
encrypt, but instead it prevents properties that are marked
sensitive from being saved with the package and therefore
makes the sensitive data unavailable to other users. If a
different user opens the package, the sensitive information is
replaced with blanks and the user must provide the sensitive
information.
Encrypt all with password (Encr yptAllWithPassword ) Uses a password to encrypt the whole package. The package
is encrypted by using a password that the user supplies
when the package is created or exported. To open the
package in SSIS Designer or run the package by using the
dtexec command prompt utility, the user must provide the
package password. Without the password the user cannot
access or run the package.
Encrypt all with user key (Encr yptAllWithUserKey ) Uses a key that is based on the current user profile to
encrypt the whole package. Only the user who created or
exported the package can open the package in SSIS Designer
or run the package by using the dtexec command prompt
utility.
Encrypt sensitive with password Uses a password to encrypt only the values of sensitive
(Encr yptSensitiveWithPassword ) properties in the package. DPAPI is used for this encryption.
Sensitive data is saved as a part of the package, but that data
is encrypted by using a password that the current user
supplies when the package is created or exported. To open
the package in SSIS Designer, the user must provide the
package password. If the password is not provided, the
package opens without the sensitive data and the current
user must provide new values for sensitive data. If the user
tries to execute the package without providing the password,
package execution fails. For more information about
passwords and command line execution, see dtexec Utility.
Encrypt sensitive with user key Uses a key that is based on the current user profile to
(Encr yptSensitiveWithUserKey ) encrypt only the values of sensitive properties in the
package. Only the same user who uses the same profile can
load the package. If a different user opens the package, the
sensitive information is replaced with blanks and the current
user must provide new values for the sensitive data. If the
user attempts to execute the package, package execution
fails. DPAPI is used for this encryption.
Rely on server storage for encryption (Ser verStorage ) Protects the whole package using SQL Server database roles.
This option is supported when a package is saved to the SQL
Server msdb database. In addition, the SSISDB catalog uses
the Ser verStorage protection level
NOTE
In addition to the procedures in this topic, you can typically set or change the ProtectionLevel property of a package
when you import or export the package. You can also change the ProtectionLevel property of a package when you use
the SQL Server Import and Export Wizard to save a package.
To set or change the protection level of a package in SQL Server Data Tools
1. Review the available values for the ProtectionLevel property in the section, Protection Levels, and
determine the appropriate value for your package.
2. In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package.
3. Open the package in the SSIS designer.
4. If the Properties window does not show the properties of the package, click the design surface.
5. In the Properties window, in the Security group, select the appropriate value for the ProtectionLevel
property.
If you select a protection level that requires a password, enter the password as the value of the
PackagePassword property.
6. On the File menu, select Save Selected Items to save the modified package.
To set or change the protection level of packages at the command prompt
1. Review the available values for the ProtectionLevel property in the section, Protection Levels, and
determine the appropriate value for your package.
2. Review the mappings for the Encr ypt option in the topic, dtutil Utility, and determine the appropriate
integer to use as the value of the selected ProtectionLevel property.
3. Open a Command Prompt window.
4. At the command prompt, navigate to the folder that contains the package or packages for which you want
to set the ProtectionLevel property.
The syntax examples shown in the following step assume that this folder is the current folder.
5. Set or change the protection level of the package or packages by using a command similar to the one of
the following examples:
The following command sets the ProtectionLevel property of an individual package in the file
system to level 2, "Encrypt sensitive with password", with the password, "strongpassword":
dtutil.exe /file "C:\Package.dtsx" /encrypt file;"C:\Package.dtsx";2;strongpassword
The following command sets the ProtectionLevel property of all packages in a particular folder in
the file system to level 2, "Encrypt sensitive with password", with the password, "strongpassword":
for %f in (*.dtsx) do dtutil.exe /file %f /encrypt file;%f;2;strongpassword
If you use a similar command in a batch file, enter the file placeholder, "%f", as "%%f" in the batch
file.
See Also
Integration Services (SSIS) Packages
Security Overview (Integration Services)
dtutil Utility
Identify the Source of Packages with Digital
Signatures
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An Integration Services package can be signed with a digital certificate to identify its source. After a package has
been signed with a digital certificate, you can have Integration Services check the digital signature before loading
the package. To have Integration Services check the signature, you set an option in either SQL Server Data Tools
(SSDT) or in the dtexec utility (dtexec.exe), or set an optional registry value.
NOTE: The optional BlockedSignatureStates registry value can specify a setting that is more restrictive
than the digital signature option set in SQL Server Data Tools (SSDT) or at the dtexec command line. In this
situation, the more restrictive registry setting overrides the other settings.
VA L UE DESC RIP T IO N
0 No administrative restriction.
NOTE
The recommended setting for BlockedSignatureStates is 3. This setting provides the greatest protection against
unsigned packages or signatures that are either not valid or untrusted. However, the recommended setting may not be
appropriate in all circumstances. For more information about signing digital assets, see the topic, "Introduction to Code
Signing," in the MSDN Library.
See also
Integration Services (SSIS) Packages
Security Overview (Integration Services)
Integration Services Roles (SSIS Service)
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SQL Server Integration Services provides certain fixed database-level roles to help secure access to packages that
are stored in SQL Server. The available roles are different depending on whether you're saving packages in the
SSIS Catalog database (SSISDB) or in the msdb database.
RO L E REA D A C T IO N W RIT E A C T IO N
RO L E REA D A C T IO N W RIT E A C T IO N
Windows administrators View execution details of all running Stop all currently running packages.
packages.
Sysssispackages Table
The sysssispackages table in msdb contains the packages that are saved to SQL Server. For more information,
see sysssispackages (Transact-SQL).
The sysssispackages table includes columns that contain information about the roles that are assigned to
packages.
The readerrole column specifies the role that has read access to the package.
The writerrole column specifies the role that has write access to the package.
The ownersid column contains the unique security identifier of the user who created the package. This
column defines the owner of the package.
Permissions
By default, the permissions of the db_ssisadmin and db_ssisoperator fixed database-level roles and the unique
security identifier of the user who created the package apply to the reader role for packages, and the permissions
of the db_ssisadmin role and the unique security identifier of the user who created the package apply to the
writer role. A user must be a member of the db_ssisadmin , db_ssisltduser , or db_ssisoperator role to have
read access to the package. A user must be a member of the db_ssisadmin role to have write access.
Access to Packages
The fixed database-level roles work in conjunction with user-defined roles. The user-defined roles are the roles that
you create in SQL Server Management Studio and then use to assign permissions to packages. To access a
package, a user must be a member of the user-defined role and the pertinent Integration Services fixed database-
level role. For example, if users are members of the AuditUsers user-defined role that is assigned to a package,
they must also be members of db_ssisadmin , db_ssisltduser , or db_ssisoperator role to have read access to
the package.
If you do not assign user-defined roles to packages, access to packages is determined by the fixed database-level
roles.
If you want to use user-defined roles, you must add them to the msdb database before you can assign them to
packages. You can create new database roles in SQL Server Management Studio.
The Integration Services database-level roles grant rights on the Integration Services system tables in the msdb
database.
SQL Server (the MSSQLSERVER service) must be started before you can connect to the Database Engine and
access the msdb database.
To assign roles to packages, you need to complete the following tasks.
Open Object Explorer and Connect to Integration Ser vices
Before you can assign roles to packages by using SQL Server Management Studio, you must open Object
Explorer in SQL Server Management Studio and connect to Integration Services.
The Integration Services service must be started before you can connect to Integration Services.
Assign Reader and Writer Roles to Packages
You can assign a reader and a writer role to each package.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can monitor Integration Services package executions, project validations, and other operations by using one of
more of the following tools. Certain tools such as data taps are available only for projects that are deployed to the
Integration Services server.
Logs
For more information, see Integration Services (SSIS) Logging.
Reports
For more information, see Reports for the Integration Services Server.
Views
For more information, see Views (Integration Services Catalog).
Performance counters
For more information, see Performance Counters.
Data taps
NOTE
This article describes how to monitor running SSIS packages in general, and how to monitor running packages on premises.
You can also run and monitor SSIS packages in Azure SQL Database. For more info, see Lift and shift SQL Server Integration
Services workloads to the cloud.
Although you can also run SSIS packages on Linux, no monitoring tools are provided on Linux. For more info, see Extract,
transform, and load data on Linux with SSIS.
Operation Types
Several different types of operations are monitored in the SSISDB catalog, on the Integration Services server. Each
operation can have multiple messages associated with it. Each message can be classified into one of several
different types. For example, a message can be of type Information, Warning, or Error. For the full list of message
types, see the documentation for the Transact-SQL catalog.operation_messages (SSISDB Database) view. For a full
list of the operations types, see catalog.operations (SSISDB Database).
Nine different status types are used to indicate the status of an operation. For a full list of the status types, see the
catalog.operations (SSISDB Database) view.
Stop
Click to stop a currently running operation.
Execution Information Shows the number of executions that are in different states
(failed, running, succeeded, others) in the past 24 hours.
Package Information Shows the total number of packages that have been executed
in the past 24 hours.
Connection Information Shows the connections that have been used in failed
executions in the past 24 hours.
Package Detailed Information Shows the details of the completed executions that have
occurred in the past 24 hours. For example, this section shows
the number of failed executions versus the total number of
executions, the duration of an executions (in seconds), and the
average duration of executions for over the past three
months.
The Over view report shows the state of package tasks. The
Messages report shows the event messages and error
messages for the package and tasks, such as reporting the
start and end times, and the number of rows written.
You can also click View Messages in the Over view report
to navigate to the Messages report. You can also click View
Over view in the Messages report to navigate to the
Over view report.
You can filter the table displayed on any page by clicking Filter and then selecting criteria in the Filter Settings
dialog. The filter criteria that are available depend on the data being displayed. You can change the sort order of
the report by clicking the sort icon in the Filter Settings dialog.
All Executions Report
The All Executions Repor t displays a summary of all Integration Services executions that have been performed
on the server. There can be multiple executions of the sample package. Unlike the Integration Ser vices
Dashboard report, you can configure the All Executions report to show executions that have started during a
range of dates. The dates can span multiple days, months, or years.
The report displays the following sections of information.
Filter Shows the current filter applied to the report, such as the
Start time range.
Execution Information Shows the start time, end time, and duration for each package
execution.You can view a list of the parameter values that
were used with a package execution, such as values that were
passed to a child package using the Execute Package task. To
view the parameter list, click Overview.
For more information about using the Execute Package task to make values available to a child package, see
Execute Package Task.
For more information about parameters, see Integration Services (SSIS) Package and Project Parameters.
All Connections
The All Connections report provides the following information for connections that have failed, for executions
that have occurred on the SQL Server instance.
The report displays the following sections of information.
NOTE
When you add custom reports to the SSISDB node under the Databases node, the SSISDB prefix is not necessary.
For instructions on how to create and add a custom report, see Add a Custom Report to Management Studio.
See Also
Execution of Projects and Packages
Troubleshooting Reports for Package Execution
Events Logged by an Integration Services Package
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An Integration Services package logs various event messages to the Windows Application event log. A package
logs these messages when the package starts, when the package stops, and when certain problems occur.
This topic provides information about the common event messages that a package logs to the Application event
log. By default, a package logs some of these messages even if you have not enabled logging on the package.
However, there are other messages that the package will log only if you have enabled logging on the package.
Regardless of whether the package logs these messages by default or because logging has been enabled, the Event
Source for the messages is SQLISPackage.
For general information about how to run SSIS packages, see Execution of Projects and Packages.
For information about how to troubleshoot running packages, see Troubleshooting Tools for Package Execution.
NOTE
The package will log the messages in the following table even if you have not enabled logging for the package.
EVEN T ID SY M B O L IC N A M E T EXT N OT ES
12291 DTS_MSG_PACKAGEFAILURE Package "" failed. The package could not run
successfully and stopped
running.
By default, in a new installation, Integration Services is configured not to log certain events that are related to the
running of packages to the Application event log. This setting prevents too many event log entries when you use
the Data Collector feature of the current release of SQL ServerIntegration Services. The events that are not logged
are EventID 12288, "Package started," and EventID 12289, "Package finished successfully." To log these events to
the Application event log, open the registry for editing. Then in the registry, locate the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\110\SSIS node, and change the DWORD
value of the LogPackageExecutionToEventLog setting from 0 to 1. However, in an upgrade insallation, Integration
Services is configured to log these two events. To disable logging, change the value of the
LogPackageExecutionToEventLog setting from 1 to 0.
12546 DTS_MSG_EVENTLOGENTRY Event Name: %1%r The object has finished its
_POSTEXECUTE Message: %9%r Operator: work.
%2%r Source Name: %3%r
Source ID: %4%r Execution
ID: %5%r Start Time: %6%r
End Time: %7%r Data Code:
%8
EVEN T ID SY M B O L IC N A M E T EXT N OT ES
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SQL Server Integration Services includes log providers that you can use to implement logging in
packages, containers, and tasks. With logging, you can capture run-time information about a package,
helping you audit and troubleshoot a package every time it is run. For example, a log can capture the
name of the operator who ran the package and the time the package began and finished.
You can configure the scope of logging that occurs during a package execution on the Integration Services
server. For more information, see Enable Logging for Package Execution on the SSIS Server.
You can also include logging when you run a package using the dtexec command prompt utility. For more
information about the command prompt arguments that support logging, see dtexec Utility.
NOTE
You cannot use the SQL Server Profiler log provider in a package that is running in 64-bit mode.
The SQL Server log provider, which writes log entries to the sysssislog table in a SQL Server
database.
The Windows Event log provider, which writes entries to the Application log in the Windows Event
log on the local computer.
The XML File log provider, which writes log files to an XML file. The default file name extension for
this provider is .xml.
If you add a log provider to a package or configure logging programmatically, you can use either a ProgID
or ClassID to identify the log provider, instead of using the names that SSIS Designer displays in the
Configure SSIS Logs dialog box.
The following table lists the ProgID and ClassID for the log providers that Integration Services includes,
and the location of the logs to which log providers write.
You can also create custom log providers. For more information, see Creating a Custom Log Provider.
The log providers in a package are members of the log providers collection of the package. When you
create a package and implement logging by using SSIS Designer, you can see a list of the collection
members in the Log Provider folders on the Package Explorer tab of SSIS Designer.
You configure a log provider by providing a name and description for the log provider and specifying the
connection manager that the log provider uses. The SQL Server log provider uses an OLE DB connection
manager. The Text File, SQL Server Profiler, and XML File log providers all use File connection managers.
The Windows Event log provider does not use a connection manager, because it writes directly to the
Windows Event log. For more information, see OLE DB Connection Manager and File Connection Manager.
Logging Customization
To customize the logging of an event or custom message, Integration Services provides a schema of
commonly logged information to include in log entries. The Integration Services log schema defines the
information that you can log. You can select elements from the log schema for each log entry.
A package and its containers and tasks do not have to log the same information, and tasks within the same
package or container can log different information. For example, a package can log operator information
when the package starts, one task can log the source of the task's failure, and another task can log
information when errors occur. If a package and its containers and tasks use multiple logs, the same
information is written to all the logs.
You can select a level of logging that suits your needs by specifying the events to log and the information
to log for each event. You may find that some events provide more useful information than others. For
example, you might want to log only the computer and operator names for the PreExecute event but all
available information for the Error event.
To prevent log files from using large amounts of disk space, or to avoid excessive logging, which could
degrade performance, you can limit logging by selecting specific events and information items to log. For
example, you can configure a log to capture only the date and the computer name for each error.
In SSIS Designer, you define the logging options by using the Configure SSIS Logs dialog box.
Log Schema
The following table describes the elements in the log schema.
EL EM EN T DESC RIP T IO N
SourceName The name of the container or task in which the log event
occurred.
DataBytes A byte array specific to the log entry. The meaning of this
field varies by log entry.
The following table describes three additional elements in the log schema that are not available on the
Details tab of the Configure SSIS Logs dialog box.
EL EM EN T DESC RIP T IO N
0 - Success
1 - Failure
2 - Completed
3 - Canceled
Log Entries
Integration Services supports log entries on predefined events and provides custom log entries for many
Integration Services objects. The Configure SSIS Logs dialog box in SSIS Designer lists these events and
custom log entries.
The following table describes the predefined events that can be enabled to write log entries when run-time
events occur. These log entries apply to executables, the package, and the tasks and containers that the
package includes. The name of the log entry is the same as the name of the run-time event that was raised
and caused the log entry to be written.
OnQuer yCancel Writes a log entry at any juncture in the task processing
where it is feasible to cancel execution.
PipelineComponentTime For each data flow component, writes a log entry for each
phase of validation and execution. The log entry specifies
the processing time for each phase.
DiagnosticEx For example, you can log a message before and after
every call to an external data provider. For more
information, see Troubleshooting Tools for Package
Execution.
The package and many tasks have custom log entries that can be enabled for logging. For example, the
Send Mail task provides the SendMailTaskBegin custom log entry, which logs information when the
Send Mail task starts to run, but before the task sends an e-mail message. For more information, see
Custom Messages for Logging.
Differentiating Package Copies
Log data includes the name and the GUID of the package to which the log entries belong. If you create a
new package by copying an existing package, the name and the GUID of the existing package are also
copied. As a result, you may have two packages that have the same GUID and name, making it difficult to
differentiate between the packages in the log data.
To eliminate this ambiguity, you should update the name and the GUID of the new packages. In SQL Server
Data Tools (SSDT), you can regenerate the GUID in the ID property and update the value of the Name
property in the Properties window. You can also change the GUID and the name programmatically, or by
using the dtutil command prompt. For more information, see Set Package Properties and dtutil Utility.
Parent Logging Options
Frequently, the logging options of tasks and For Loop, Foreach Loop, and Sequence containers match
those of the package or a parent container. In that case, you can configure them to inherit their logging
options from their parent container. For example, in a For Loop container that includes an Execute SQL
task, the Execute SQL task can use the logging options that are set on the For Loop container. To use the
parent logging options, you set the LoggingMode property of the container to UseParentSetting . You
can set this property in the Proper ties window of SQL Server Data Tools (SSDT) or through the
Configure SSIS Logs dialog box in SSIS Designer.
Logging Templates
In the Configure SSIS Logs dialog box, you can also create and save frequently used logging
configurations as templates, and then use the templates in multiple packages. This makes it easy to apply a
consistent logging strategy across multiple packages and to modify log settings on packages by updating
and then applying the templates. The templates are stored in XML files.
To configure logging using the Configure SSIS Logs dialog box
1. Enable the package and its tasks for logging. Logging can occur at the package, the container, and
the task level. You can specify different logs for packages, containers, and tasks.
2. Select a log provider and add a log for the package. Logs can be created only at the package level,
and a task or container must use one of the logs created for the package. Each log is associated with
one of the following log providers: Text file, SQL Server Profiler, SQL Server, Windows Event Log, or
XML file. For more information, see Enable Package Logging in SQL Server Data Tools.
3. Select the events and the log schema information about each event you want to capture in the log.
For more information, see Configure Logging by Using a Saved Configuration File.
Configuration of Log Provider
You can set properties through SSIS Designer or programmatically.
A log provider is created and configured as a step in implementing logging in a package.
After you create a log provider, you can view and modify its properties in the Properties window of SQL
Server Data Tools (SSDT).
For information about programmatically setting these properties, see the documentation for the
LogProvider class.
Logging for Data Flow Tasks
The Data Flow task provides many custom log entries that can be used to monitor and adjust performance.
For example, you can monitor components that might cause memory leaks, or keep track of how long it
takes to run a particular component. For a list of these custom log entries and sample logging output, see
Data Flow Task.
Capture the names of columns in which errors occur
When you configure an error output in the data flow, by default the error output provides only the
numeric identifier of the column in which the error occurred. For more info, see Error Handling in Data.
You can find column names by enabling logging and selecting the DiagnosticEx event. This event writes a
data flow lineage map to the log. You can then look up the column name from its identifier in this lineage
map. Note that the DiagnosticEx event does not preserve whitespace in its XML output to reduce the size
of the log. To improve readability, copy the log into an XML editor - in Visual Studio, for example - that
supports XML formatting and syntax highlighting.
Use the PipelineComponentTime Event
Perhaps the most useful custom log entry is the PipelineComponentTime event. This log entry reports the
number of milliseconds that each component in the data flow spends on each of the five major processing
steps. The following table describes these processing steps. Integration Services developers will recognize
these steps as the principal methods of a PipelineComponent.
ST EP DESC RIP T IO N
ST EP DESC RIP T IO N
When you enable the PipelineComponentTime event, Integration Services logs one message for each
processing step performed by each component. The following log entries show a subset of the messages
that the Integration Services CalculatedColumns package sample logs:
The component "Calculate LineItemTotalCost" (3522) spent 356 milliseconds in ProcessInput.
The component "Sum Quantity and LineItemTotalCost" (3619) spent 79 milliseconds in ProcessInput.
The component "Extract Data" (3869) spent 688 milliseconds in PrimeOutput filling buffers on output
"OLE DB Source Output" (3879).
The component "Sum Quantity and LineItemTotalCost" (3619) spent 141 milliseconds in PrimeOutput filling
buffers on output "Aggregate Output 1" (3621).
The component "Sort by ProductID" (3717) spent 16 milliseconds in PrimeOutput filling buffers on output
"Sort Output" (3719).
These log entries show that the data flow task spent the most time on the following steps, shown here in
descending order:
The OLE DB source that is named "Extract Data" spent 688 ms. loading data.
The Derived Column transformation that is named "Calculate LineItemTotalCost" spent 356 ms.
performing calculations on incoming rows.
The Aggregate transformation that is named "Sum Quantity and LineItemTotalCost" spent a
combined 220 ms-141 in PrimeOutput and 79 in ProcessInput-performing calculations and passing
the data to the next transformation.
By default, the containers in the package use the same logging configuration as their parent container. For
information about setting logging options for individual containers, see Configure Logging by Using a
Saved Configuration File.
To enable logging in a package
1. In SQL Server Data Tools, open the Integration Services project that contains the package you want.
2. On the SSIS menu, click Logging .
3. Select a log provider in the Provider type list, and then click Add .
4. In the Configuration column, select a connection manager or click <New connection> to create
a new connection manager of the appropriate type for the log provider. Depending on the selected
provider, use one of the following connection managers:
For Text files, use a File connection manager. For more information, see File Connection
Manager
For SQL Server Profiler, use a File connection manager.
For SQL Server, use an OLE DB connection manager. For more information, see OLE DB
Connection Manager.
For Windows Event Log, do nothing. SSIS automatically creates the log.
For XML files, use a File connection manager.
5. Repeat steps 3 and 4 for each log to use in the package.
NOTE
A package can use more than one log of each type.
6. Optionally, select the package-level check box, select the logs to use for package-level logging, and
then click the Details tab.
7. On the Details tab, select Events to log all log entries, or clear Events to select individual events.
8. Optionally, click Advanced to specify which information to log.
NOTE
By default, all information is logged.
9. On the Details tab, click Save. The Save As dialog box appears. Locate the folder in which to save
the logging configuration, type a file name for the new log configuration, and then click Save .
10. Click OK .
11. To save the updated package, click Save Selected Items on the File menu.
VA L UE DESC RIP T IO N
Operator The user name of the person who started the package.
Basic
Select or clear events to log. This option hides logging details except the list of events. If you select an
event, all logging details are selected for the event by default. Click Advanced to show all logging details.
Load
Specify an existing XML file to use as a template for setting logging options.
Save
Save configuration details as a template to an XML file.
NOTE
You can create logs only at the package level. For more information, see Enable Package Logging in SQL
Server Data Tools.
NOTE
The new container may include additional log entries that are not available for the container originally used
to create the logging configuration. These additional log entries must be selected manually if you want
them to be logged.
Create and manage customized logging levels by using the Customized Logging Level Management
dialog box
You can create customized logging levels that collect only the statistics and events that you want.
Optionally you can also capture the context of events, which includes variable values, connection strings,
and component properties. When you run a package, you can select a customized logging level wherever
you can select a built-in logging level.
TIP
To capture the values of package variables, the IncludeInDebugDump property of the variables must be set to
True .
1. To create and manage customized logging levels, in SQL Server Management Studio, right-click on
the SSISDB database and select Customized Logging Level to open the Customized Logging
Level Management dialog box. The Customized Logging Levels list contains all the existing
customized logging levels.
2. To create a new customized logging level, click Create , and then provide a name and description.
On the Statistics and Events tabs, select the statistics and events that you want to collect. On the
Events tab, optionally select Include Context for individual events. Then click Save .
3. To update an existing customized logging level, select it in the list, reconfigure it, and then click
Save .
4. To delete an existing customized logging level, select it in the list, and then click Delete .
Permissions for customized logging levels.
All users of the SSISDB database can see customized logging levels and select a customized logging
level when they run packages.
Only users in the ssis_admin or sysadmin role can create, update, or delete customized logging
levels.
LO G EN T RY DESC RIP T IO N
PackageStar t Indicates that the package began to run. This log entry is
automatically written to the log. You cannot exclude it.
LO G EN T RY DESC RIP T IO N
LO G EN T RY DESC RIP T IO N
BufferSizeTuning Indicates that the Data Flow task changed the size of the
buffer. The log entry describes the reasons for the size
change and lists the temporary new buffer size.
OnPipelinePostPrimeOutput Indicates that the component has completed its last call
to the PrimeOutput method. Depending on the data
flow, multiple log entries may be written. If the
component is a source, this means that the component
has finished processing rows.
PipelineExecutionTrees Reports the execution trees of the layout in the data flow.
The scheduler of the data flow engine use the trees to
build the execution plan of the data flow.
LO G EN T RY DESC RIP T IO N
ExecuteDTS80PackageTaskBegin Indicates that the task began to run a DTS 2000 package.
LO G EN T RY DESC RIP T IO N
LO G EN T RY DESC RIP T IO N
LO G EN T RY DESC RIP T IO N
FileSystemOperation Reports the operation that the task performs. The log
entry is written when the file system operation starts and
includes information about the source and destination.
FTP Task
The following table lists the custom log entries for the FTP task.
LO G EN T RY DESC RIP T IO N
FTPConnectingToSer ver Indicates that the task initiated a connection to the FTP
server.
LO G EN T RY DESC RIP T IO N
Script Task
The following table describes the custom log entry for the Script task.
LO G EN T RY DESC RIP T IO N
LO G EN T RY DESC RIP T IO N
LO G EN T RY DESC RIP T IO N
SourceSQLSer ver Specifies the computer from which the database was
copied.
LO G EN T RY DESC RIP T IO N
TransferErrorMessagesTaskStar tTransferringObject Indicates that the task started to transfer error messages.
s
LO G EN T RY DESC RIP T IO N
TransferJobsTaskStar tTransferringObjects Indicates that the task started to transfer SQL Server
Agent jobs.
LO G EN T RY DESC RIP T IO N
LO G EN T RY DESC RIP T IO N
LO G EN T RY DESC RIP T IO N
TransferSqlSer verObjectsTaskFinishedTransferring Indicates that the task finished transferring SQL Server
Objects database objects.
TransferSqlSer verObjectsTaskStar tTransferringObj Indicates that the task started to transfer SQL Server
ects database objects.
LO G EN T RY DESC RIP T IO N
LO G EN T RY DESC RIP T IO N
WMIEventWatcherEventOccurred Denotes that the event occurred that the task was
monitoring.
WMIEventWatcherWatchingForWMIEvents Indicates that the task began to execute the WQL query.
The entry includes the query.
XML Task
The following table describes the custom log entry for the XML task.
LO G EN T RY DESC RIP T IO N
Related Tasks
The following list contains links to topics that show how to perform tasks related to the logging feature.
Events Logged by an Integration Services Package
Related Content
DTLoggedExec Tool for Full and Detail Logging (CodePlex Project)
Performance Counters
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services installs a set of performance counters that you can use to monitor the performance of the
data flow engine. For example, you can watch the "Buffers spooled" counter to determine whether data buffers are
being written to disk temporarily while a package is running. This swapping reduces performance and indicates
that the computer has insufficient memory.
NOTE: If you install Integration Services on a computer that is running Windows Server 2003, and then
upgrade that computer to Windows Server 2008, the upgrade process removes the Integration Services
performance counters from the computer. To restore the Integration Services performance counters on the
computer, run SQL Server Setup in repair mode.
BLOB bytes read The number of bytes of binary large object (BLOB) data that
the data flow engine has read from all sources.
BLOB bytes written The number of bytes of BLOB data that the data flow engine
has written to all destinations.
BLOB files in use The number of BLOB files that the data flow engine currently
is using for spooling.
Buffer memory The amount of memory that is in use. This may include both
physical and virtual memory. When this number is larger than
the amount of physical memory, the Buffers Spooled count
rises as an indication that memory swapping is increasing.
Increased memory swapping slows performance of the data
flow engine.
Buffers in use The number of buffer objects, of all types, that all data flow
components and the data flow engine is currently using.
Buffers spooled The number of buffers currently written to the disk. If the
data flow engine runs low on physical memory, buffers not
currently used are written to disk and then reloaded when
needed.
Flat buffer memory The total amount of memory, in bytes, that all flat buffers use.
Flat buffers are blocks of memory that a component uses to
store data. A flat buffer is a large block of bytes that is
accessed byte by byte.
Flat buffers in use The number of flat buffers that the Data flow engine uses. All
flat buffers are private buffers.
P ERF O RM A N C E C O UN T ER DESC RIP T IO N
Private buffer memory The total amount of memory in use by all private buffers. A
buffer is not private if the data flow engine creates it to
support data flow. A private buffer is a buffer that a
transformation uses for temporary work only. For example,
the Aggregation transformation uses private buffers to do its
work.
Rows read The number of rows that a source produces. The number
does not include rows read from reference tables by the
Lookup transformation.
You use the Performance Microsoft Management Console (MMC) snap-in to create a log that captures
performance counters.
For information about how to improve performance, see Data Flow Performance Features.
In the following example, the function returns statistics for all the executions running on the Integration Services
server.
IMPORTANT!! If you are a member of the ssis_admin database role, performance statistics for all running
executions are returned. If you are not a member of the ssis_admin database role, performance statistics for
the running executions for which you have read permissions, are returned.
Related Content
Tool, SSIS Performance Visualization for Business Intelligence Development Studio (CodePlex Project), on
codeplex.com.
Video, Measuring and Understanding the Performance of Your SSIS Packages in the Enterprise (SQL Server
Video), on msdn.microsoft.com.
Support article, The SSIS performance counter is no longer available in the Performance Monitor after you
upgrade to Windows Server 2008, on support.microsoft.com.
NOTE
If you install Integration Services on a computer that is running Windows Server 2003, and then upgrade that computer to
Windows Server 2008, the upgrade process removes the Integration Services performance counters from the computer. To
restore the Integration Services performance counters on the computer, run SQL Server Setup in repair mode.
NOTE
You must start the Performance Logs and Alerts service using a local account or a domain account that is a member
of the Administrators group.
See Also
Execution of Projects and Packages Events Logged by an Integration Services Package
Troubleshoot Integration Services (SSIS) Packages
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In this section
Troubleshooting Tools for Package Development
Troubleshooting Tools for Package Connectivity
Troubleshooting Tools for Package Execution
Troubleshooting Reports for Package Development
Generating Dump Files for Package Execution
Troubleshooting Tools for Package Development
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services includes features and tools that you can use to troubleshoot packages while you are
developing them in SQL Server Data Tools (SSDT).
NOTE
When you debug a package that contains multiple Script tasks, the debugger hits breakpoints in only one Script
task and will ignore breakpoints in the other Script tasks. If a Script task is part of a Foreach Loop or For Loop
container, the debugger ignores breakpoints in the Script task after the first iteration of the loop.
For more information, see Debugging Script. For suggestions about how to debug the Script component, see
Coding and Debugging the Script Component.
See Also
Troubleshooting Tools for Package Execution
Data Flow Performance Features
Debugging Control Flow
11/2/2020 • 7 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SQL Server Data Tools (SSDT) and Microsoft Integration Services include features and tools that you can use to
troubleshoot the control flow in an Integration Services package.
Integration Services supports breakpoints on containers and tasks.
SSIS Designer provides progress reporting at run time.
SQL Server Data Tools (SSDT) provides debug windows.
Breakpoints
SSIS Designer provides the Set Breakpoints dialog box, in which you can set breakpoints by enabling break
conditions and specifying the number of times a breakpoint can occur before the execution of the package is
suspended. Breakpoints can be enabled at the package level, or at the level of the individual component. If break
conditions are enabled at the task or container level, the breakpoint icon appears next to the task or container on
the design surface of the Control Flow tab. If the break conditions are enabled on the package, the breakpoint
icon appears on the label of the Control Flow tab.
When a breakpoint is hit, the breakpoint icon changes to help you identify the source of the breakpoint. You can
add, delete, and change breakpoints when the package is running.
Integration Services provides ten break conditions that you can enable on all tasks and containers. In the Set
Breakpoints dialog box, you can enable breakpoints on the following conditions:
When the task or container receives the OnPreExecute Called when a task is about to execute. This event is raised by
event. a task or a container immediately before it runs.
When the task or container receives the OnPostExecute Called immediately after the execution logic of the task
event. finishes. This event is raised by a task or container
immediately after it runs.
When the task or container receives the OnError event. Called by a task or container when an error occurs.
When the task or container receives the OnWarning event. Called when the task is in a state that does not justify an
error, but does warrant a warning.
When the task or container receives the OnInformation Called when the task is required to provide information.
event.
When the task or container receives the OnTaskFailed event. Called by the task host when it fails.
When the task or container receives the OnProgress event. Called to update progress about task execution.
When the task or container receives the OnQuer yCancel Called at any time in task processing when you can cancel
event. execution.
B REA K C O N DIT IO N DESC RIP T IO N
When the task or container receives the Called by the Integration Services runtime when the value of
OnVariableValueChanged event. a variable changes. The RaiseChangeEvent of the variable
must be set to true to raise this event.
When the task or container receives the OnCustomEvent Called by tasks to raise custom task-defined events.
event.
In addition to the break conditions available to all tasks and containers, some tasks and containers include special
break conditions for setting breakpoints. For example, you can enable a break condition on the For Loop container
that sets a breakpoint that suspends execution at the start of each iteration of the loop.
To add flexibility and power to a breakpoint, you can modify the behavior of a breakpoint by specifying the
following options:
The hit count, or the maximum number of times that a break condition occurs before the execution is
suspended.
The hit count type, or the rule that specifies when the break condition triggers the breakpoint.
The hit count types, except for the Always type, are further qualified by the hit count. For example, if the type is "Hit
count equals" and the hit count is 5, execution is suspended on the sixth occurrence of the break condition.
The following table describes the hit count types.
H IT C O UN T T Y P E DESC RIP T IO N
Hit count equals Execution is suspended when the number of times the
breakpoint has occurred is equal to the hit count.
Hit count greater than or equal to Execution is suspended when the number of times the
breakpoint has occurred is equal to or greater than the hit
count.
Hit count multiple Execution is suspended when a multiple of the hit count
occurs. For example, if you set this option to 5, execution is
suspended every fifth time.
To set breakpoints
Debug a Package by Setting Breakpoints on a Task or a Container
Progress Reporting
SSIS Designer includes two types of progress reporting: color-coding on the design surface of the Control Flow
tab, and progress messages on the Progress tab.
When you run a package, SSIS Designer depicts execution progress by displaying each task or container using a
color that indicates execution status. You can tell by its color whether the element is waiting to run, currently
running, has completed successfully, or has ended unsuccessfully. After you stop package execution, the color-
coding disappears.
The following table describes the colors that are used to depict execution status.
C O LO R EXEC UT IO N STAT US
Yellow Running
The Progress tab lists tasks and containers in execution order and includes the start and finish times, warnings,
and error messages. After you stop package execution, the progress information remains available on the
Execution Results tab.
NOTE
To enable or disable the display of messages on the Progress tab, toggle the Debug Progress Repor ting option on the
SSIS menu.
Debug Windows
SQL Server Data Tools (SSDT) includes many windows that you can use to work with breakpoints, and to debug
packages that contain breakpoints. To learn more about each window, open the window, and then press F1 to
display Help for the window.
To open these windows in SQL Server Data Tools (SSDT), click the Debug menu, point to Windows , and then click
Breakpoints , Output , or Immediate .
The following table describes the windows.
W IN DO W DESC RIP T IO N
Set Breakpoints
Use the Set Breakpoints dialog box to specify the events on which to enable breakpoints and to control the
behavior of the breakpoint.
Options
Enabled
Select to enable a breakpoint on an event.
Break Condition
View a list of available events on which to set breakpoints.
Hit Count Type
Specify when the breakpoint takes effect.
VA L UE DESC RIP T IO N
Hit count equals Execution is suspended when the number of times the
breakpoint has occurred is equal to the hit count.
VA L UE DESC RIP T IO N
Hit greater or equal Execution is suspended when the number of times the
breakpoint has occurred is equal to or greater than the hit
count.
Hit count multiple Execution is suspended when a multiple of the hit count
occurs. For example, if you set this option to 5, execution is
suspended every fifth time.
Hit Count
Specify the number of hits at which to trigger a break. This option is not available if the breakpoint is always in
effect.
See Also
Troubleshooting Tools for Package Development
Debug a Script by Setting Breakpoints in a Script Task and Script Component
Debugging Script
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You write the scripts that the Script task and Script component use, in Microsoft Visual Studio Tools for Applications
(VSTA).
You set and script breakpoints in VSTA. You can manage breakpoints in VSTA, but you can also manage the
breakpoints using the Set Breakpoints dialog box that SSIS Designer provides. For more information, see
Debugging Control Flow.
The Set Breakpoints dialog box includes the script breakpoints. These breakpoints appear at the bottom of the
breakpoint list, and display the line number and the name of the function in which the breakpoint appears. You can
delete a script breakpoint from the Set Breakpoints dialog box.
At run time, the breakpoints set on lines of code in script are integrated with the breakpoints set on the package or
the tasks and containers in the package. The debugger can run from a breakpoint in the script to a breakpoint set
on the package, task, or container, and vice versa. For example, a package might have breakpoints set on the break
conditions that occur when the package receives the OnPreExecute and OnPostExecute events, and also have a
Script task that has breakpoints on lines of its script. In this scenario, the package can suspend execution on the
break condition associated with the OnPreExecute event, run to the breakpoints in the script, and finally run to the
break condition associated with the OnPostExecute event.
For more information about debugging the Script task and Script component, see Coding and Debugging the
Script Task and Coding and Debugging the Script Component.
To set a breakpoint in Visual Studio for Applications
Debug a Script by Setting Breakpoints in a Script Task and Script Component
See Also
Troubleshooting Tools for Package Development
Debugging Data Flow
11/2/2020 • 12 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Microsoft Integration Services and the SSIS Designer include features and tools that you can use to
troubleshoot the data flows in an Integration Services package.
SSIS Designer provides data viewers.
SSIS Designer and Integration Services transformations provide row counts.
SSIS Designer provides progress reporting at run time.
Data Viewers
Data viewers display data between two components in a data flow. Data viewers can display data when the data
is extracted from a data source and first enters a data flow, before and after a transformation updates the data,
and before the data is loaded into its destination.
To view the data, you attach data viewers to the path that connects two data flow components. The ability to
view data between data flow components makes it easier to identify unexpected data values, view the way a
transformation changes column values, and discover the reason that a transformation fails. For example, you
may find that a lookup in a reference table fails, and to correct this you may want to add a transformation that
provides default data for blank columns.
A data viewer can display data in a grid. Using a grid, you select the columns to display. The values for the
selected columns display in a tabular format.
You can also include multiple data viewers on a path. You can display the same data in different formats-for
example, create a chart view and a grid view of the data-or create different data viewers for different columns
of data.
When you add a data viewer to a path, SSIS Designer adds a data viewer icon to the design surface of the Data
Flow tab, next to the path. Transformations that can have multiple outputs, such as the Conditional Split
transformation, can include a data viewer on each path.
At run time, a Data Viewer window opens and displays the information specified by the data viewer format.
For example, a data viewer that uses the grid format shows data for the selected columns, the number of
output rows passed to the data flow component, and the number of rows displayed. The information displays
buffer by buffer and, depending on the width of the rows in the data flow, a buffer may contain more or fewer
rows.
In the Data Viewer dialog box, you can copy the data to the Clipboard, clear all data from the table,
reconfigure the data viewer, resume the flow of data, and detach or attach the data viewer.
To add a data viewer
Add a Data Viewer to a Data Flow
Row Counts
The number of rows that have passed through a path is displayed on the design surface of the Data Flow tab
in SSIS Designer next to the path. The number is updated periodically while the data moves through the path.
You can also add a Row Count transformation to the data flow to capture the final row count in a variable. For
more information, see Row Count Transformation.
Progress Reporting
When you run a package, SSIS Designer depicts progress on the design surface of the Data Flow tab by
displaying each data flow component in a color that indicates status. When each component starts to perform
its work, it changes from no color to yellow, and when it finishes successfully, it changes to green. A red color
indicates that the component failed.
The following table describes the color-coding.
C O LO R DESC RIP T IO N
NOTE
The logging level must be set to Verbose in order to capture information with the catalog.execution_data_statistics view.
The following example displays the number of rows sent between components of a package.
use SSISDB
select package_name, task_name, source_component_name, destination_component_name, rows_sent
from catalog.execution_data_statistics
where execution_id = 132
order by source_component_name, destination_component_name
The following example calculates the number of rows per millisecond sent by each component for a specific
execution. The calculated values are:
total_rows - the sum of all the rows sent by the component
wall_clock_time_ms - the total elapsed execution time, in milliseconds, for each component
num_rows_per_millisecond - the number of rows per millisecond sent by each component
The HAVING clause is used to prevent a divide-by-zero error in the calculations.
use SSISDB
select source_component_name, destination_component_name,
sum(rows_sent) as total_rows,
DATEDIFF(ms,min(created_time),max(created_time)) as wall_clock_time_ms,
((0.0+sum(rows_sent)) / (datediff(ms,min(created_time),max(created_time)))) as
[num_rows_per_millisecond]
from [catalog].[execution_data_statistics]
where execution_id = 132
group by source_component_name, destination_component_name
having (datediff(ms,min(created_time),max(created_time))) > 0
order by source_component_name desc
NOTE
The list of columns includes the columns in the component input, the ErrorCode and ErrorColumn columns
added by previous error outputs, and the ErrorCode and ErrorColumn columns added by this component.
7. Click OK.
8. To save the updated package, on the File menu, click Save Selected Items .
NOTE
In the grid, values that represent the DT_DATE, DT_DBTIME2, DT_FILETIME, DT_DBTIMESTAMP,
DT_DBTIMESTAMP2, and DT_DBTIMESTAMPOFFSET data types appear as ISO 8601 formatted strings and a
space separator replaces the T separator. Values that represent the DT_DATE and DT_FILETIME data types include
seven digits for fractional seconds. Because the DT_FILETIME data type stores only three digits of fractional
seconds, the grid displays zeros for the remaining four digits. Values that represent the DT_DBTIMESTAMP data
type include three digits for fractional seconds. For values that represent the DT_DBTIME2, DT_DBTIMESTAMP2,
and DT_DBTIMESTAMPOFFSET data types, the number of digits for fractional seconds corresponds to the scale
specified for the column's data type. For more information about ISO 8601 formats, see Date and Time Formats.
For more information about data types, see Integration Services Data Types.
10. Click OK .
The folder name, project name, and package name parameters of the create_execution stored procedure
correspond to the folder, project, and package names in the Integration Services catalog. You can get the folder,
project, and package names to use in the create_execution call from the SQL Server Management Studio as
shown in the following image. If you do not see your SSIS project here, you may not have deployed the project
to SSIS server yet. Right-click on SSIS project in Visual Studio and click Deploy to deploy the project to the
expected SSIS server.
Instead of typing the SQL statements, you can generate the execute package script by performing the following
steps:
1. Right-click Package.dtsx and click Execute .
2. Click Script toolbar button to generate the script.
3. Now, add the add_data_tap statement before the start_execution call.
The task_package_path parameter of add_data_tap stored procedure corresponds to the PackagePath property
of the data flow task in Visual Studio. In Visual Studio, right-click the Data Flow Task , and click Proper ties to
launch the Properties window. Note the value of the PackagePath property to use it as a value for the
task_package_path parameter for add_data_tap stored procedure call.
The dataflow_path_id_string parameter of add_data_tap stored procedure corresponds to the
IdentificationString property of the data flow path to which you want to add a data tap. To get the
dataflow_path_id_string, click the data flow path (arrow between tasks in the data flow), and note the value of
the IdentificationString property in the Properties window.
When you execute the script, the output file is stored in <Program Files>\Microsoft SQL
Server\110\DTS\DataDumps. If a file with the name already exists, a new file with a suffix (for example:
output[1].txt) is created.
As mentioned earlier, you can also use catalog.add_data_tap_by_guidstored procedure instead of using
add_data_tap stored procedure. This stored procedure takes the ID of data flow task as a parameter instead of
task_package_path. You can get the ID of data flow task from the properties window in Visual Studio.
Removing a data tap
You can remove a data tap before starting the execution by using the catalog.remove_data_tap stored
procedure. This stored procedure takes the ID of data tap as a parameter, which you can get as an output of the
add_data_tap stored procedure.
Performance consideration
Enabling verbose logging level and adding data taps increase the I/O operations performed by your data
integration solution. Hence, we recommend that you add data taps only for troubleshooting purposes
Video
This video on TechNet demonstrates how to add/use data taps in SQL Server 2012 SSISDB catalog that help
with debugging packages programmatically and capturing the partial results at the runtime. It also discusses
how to list/ remove these data taps and best practices for using data taps in SSIS packages.
See Also
Error Handling in Data
Troubleshooting Tools for Package Connectivity
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services includes features and tools that you can use to troubleshoot connectivity between packages
and the data sources from which packages extract and load data.
ExternalRequest_pre: The object is ready to make the following external request: '%1!s!'.
ExternalRequest_post: '%1!s!'. The external request has completed.
To troubleshoot the interaction with the external data provider, review the log to see whether every "before"
message ( ExternalRequest_pre ) has a corresponding "after" message ( ExternalRequest_post ). If there is no
corresponding "after" message, you know that the external data provider did not respond as expected.
The following example shows some sample rows from a log that contains these logging messages:
ExternalRequest_pre: The object is ready to make the following external request:
'ITransactionJoin::JoinTransaction'.
ExternalRequest_post: 'ITransactionJoin::JoinTransaction succeeded'. The external request has completed.
ExternalRequest_pre: The object is ready to make the following external request: 'IDbConnection.Open'.
ExternalRequest_post: 'IDbConnection.Open succeeded'. The external request has completed.
ExternalRequest_pre: The object is ready to make the following external request:
'IDbConnection.CreateCommand'.
ExternalRequest_post: 'IDbConnection.CreateCommand finished'. The external request has completed."
ExternalRequest_pre: The object is ready to make the following external request:
'IDbCommand.ExecuteReader'.
ExternalRequest_post: 'IDbCommand.ExecuteReader finished'. The external request has completed."
ExternalRequest_pre: The object is ready to make the following external request:
'IDataReader.GetSchemaTable'.
ExternalRequest_post: 'IDataReader.GetSchemaTable finished'. The external request has completed."
ExternalRequest_pre: The object is ready to make the following external request: 'IDataReader.Close'.
ExternalRequest_post: 'IDataReader.Close finished'. The external request has completed."
ExternalRequest_pre: The object is ready to make the following external request: 'IDbConnection.Close'.
ExternalRequest_post: 'IDbConnection.Close finished'. The external request has completed."
See Also
Troubleshooting Tools for Package Development
Troubleshooting Tools for Package Execution
Troubleshooting Tools for Package Execution
11/2/2020 • 7 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services includes features and tools that you can use to troubleshoot packages when you execute
them after they have been completed and deployed.
At design time, SQL Server Data Tools (SSDT) provides breakpoints to pause package execution, the Progress
window, and data viewers to watch your data as it passes through the data flow. However, these features are
not available when you are running packages that have been deployed. The main techniques for
troubleshooting deployed packages are as follows:
Catch and handle package errors by using event handlers.
Capture bad data by using error outputs.
Track the steps of package execution by using logging.
You can also use the following tips and techniques to avoid problems with running packages
Help to ensure data integrity by using transactions . For more information, see Integration
Services Transactions.
Restar t packages from the point of failure by using checkpoints . For more information, see
Restart Packages by Using Checkpoints.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In the current release of SQL ServerIntegration Services, standard reports are available in SQL Server
Management Studio to help you monitor and troubleshoot Integration Services packages that have been deployed
to the Integration Services catalog. Two of these package reports in particular help you to view package execution
status and identify the cause of execution failures.
Integration Ser vices Dashboard - This report provides an overview of all the package executions on the
SQL Server instance in the past 24 hours. The report displays information such as Status, Operation Type,
Package Name, etc., for each package.
The Start Time, End Time, and Duration can be interpreted as follows:
If the package is still running, then Duration = current time - Start Time
If the package has completed, then Duration = End Time - Start Time
For each package that has run on the server, the dashboard allows you to "zoom in" to find specific details
on package execution errors that may have occurred. For example, click Over view to display a high-level
overview of the status of the tasks in the execution, or All Messages to display the detailed messages that
were captured as part of the package execution.
You can filter the table displayed on any page by clicking Filter and then selecting criteria in the Filter
Settings dialog. The filter criteria available depends on the data being displayed. You can change the sort
order of the report by clicking the sort icon in the Filter Settings dialog.
Activity - All Executions Repor t - This report displays a summary of all Integration Services executions
that have been performed on the server. The summary displays information for each execution such as
status, start time, and end time. Each summary entry includes links to more information about the
execution including messages generated during execution and performance data. As with the Integration
Services Dashboard, you can apply a filter to the table to narrow down the information displayed.
Related Content
Reports for the Integration Services Server
Troubleshooting Tools for Package Execution
Generating Dump Files for Package Execution
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In Integration Services, you can create debug dump files that provide information about the execution of a
package. The information in these files can help you with troubleshooting package execution issues.
NOTE
Debug dump files might contain sensitive information. To help protect sensitive information, you can use an access control
list (ACL) to restrict access to the files, or copy the files to a folder that has restricted access. For example, before you send
your debug files to Microsoft support services, we recommend that you remove any sensitive or confidential information.
When you deploy a project to the Integration Services server, you can create dump files that provide information
about the execution of the packages contained in the project. When the ISServerExec.exe process ends, the dump
files are created. You can specify that a dump file is created when errors occur during the package execution, by
selecting the Dump on errors option in the Execute Package Dialog box. You can also use the following
stored procedures:
catalog.set_execution_parameter_value (SSISDB Database)
Call this stored procedure to configure a dump file to be created when any error or event occurs, and
when specific events occur, during a package execution.
catalog.create_execution_dump
Call this stored procedure to cause a running package to pause and create a dump file.
If you are using the package deployment model, you create the debug dump files by using either the dtexec
utility or the dtutil utility to specify a debug dump option in the command line. For more information, see dtexec
Utility and dtutil Utility. For more information about the package deployment model, see Deploy Integration
Services (SSIS) Projects and Packages and Legacy Package Deployment (SSIS).
Dynamic-link library (DLL) path and Path and version number of each DLL # Loaded Module:
version that the system loads during the c:\bb\Sql\DTS\src\bin\debug\i386\DTEx
processing of a package. ec.exe (10.0.1069.5)
# Loaded Module:
C:\Windows\SysWOW64\ntdll.dll
(6.0.6000.16386)
# Loaded Module:
C:\Windows\syswow64\kernel32.dll
(6.0.6000.16386)
Recent messages Recent messages issued by the system. [M:1] Ring buffer entry: (*pRecord)
Includes the time, type, description,
and thread ID of each message. [D:2]
<<<CRingBufferLogging::RingBufferLo
ggingRecord>>> ( @ 0282F1A8 )
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
This section describes the Transact-SQL views that are available for administering Integration Services projects that
have been deployed to an instance of SQL Server.
Query the Integration Services views to inspect objects, settings, and operational data that are stored in the
SSISDB catalog.
The default name of the catalog is SSISDB. The objects that are stored in the catalog include projects, packages,
parameters, environments, and operational history.
You can use the database views and stored procedures directly, or write custom code that calls the managed API.
Management Studio and the managed API query the views and call the stored procedures that are described in
this section to perform many of their tasks.
In This Section
catalog.catalog_properties (SSISDB Database)
Displays the properties of the Integration Services catalog.
catalog.effective_object_permissions (SSISDB Database)
Displays the effective permissions for the current principal for all objects in the Integration Services catalog.
catalog.environment_variables (SSISDB Database)
Displays the environment variable details for all environments in the Integration Services catalog.
catalog.environments (SSISDB Database)
Displays the environment details for all environments in the Integration Services catalog. Environments contain
variables that can be referenced by Integration Services projects.
catalog.execution_parameter_values (SSISDB Database)
Displays the actual parameter values that are used by Integration Services packages during an instance of
execution.
catalog.executions (SSISDB Database)
Displays the instances of package execution in the Integration Services catalog. Packages that are executed with
the Execute Package task run in the same instance of execution as the parent package.
catalog.explicit_object_permissions (SSISDB Database)
Displays only the permissions that have been explicitly assigned to the user.
catalog.extended_operation_info (SSISDB Database)
Displays extended information for all operations in the Integration Services catalog.
catalog.folders (SSISDB Database)
Displays the folders in the Integration Services catalog.
catalog.object_parameters (SSISDB Database)
Displays the parameters for all packages and projects in the Integration Services catalog.
catalog.object_versions (SSISDB Database)
Displays the versions of objects in the Integration Services catalog. In this release, only versions of projects are
supported in this view.
catalog.operation_messages (SSISDB Database)
Displays messages that are logged during operations in the Integration Services catalog.
catalog.operations (SSISDB Database)
Displays the details of all operations in the Integration Services catalog.
catalog.packages (SSISDB Database)
Displays the details for all packages that appear in the Integration Services catalog.
catalog.environment_references (SSISDB Database)
Displays the environment references for all projects in the Integration Services catalog.
catalog.projects (SSISDB Database)
Displays the details for all projects that appear in the Integration Services catalog.
catalog.validations (SSISDB Database)
Displays the details of all project and package validations in the Integration Services catalog.
catalog.master_properties (SSISDB Database)
Displays the properties of the Integration Services Scale Out Master.
catalog.worker_agents (SSISDB Database)
Displays the information of Integration Services Scale Out Worker.
catalog.catalog_properties (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the properties of the Integration Services catalog.
Remarks
This view displays a row for each catalog property.
IS_SCALEOUT_ENABLED When the value is True , the SSIS Scale Out feature is
enabled. If you have not enabled Scale Out, this property
may not appear in the view.
MAX_PROJECT_VERSIONS The number of new project versions that are retained for a
single project. When version cleanup is enabled, older
versions beyond this count are deleted.
SERVER_LOGGING_LEVEL The default logging level for the Integration Services server.
Permissions
This view requires one of the following permissions:
Membership to the ssis_admin database role
Membership to the sysadmin server role
catalog.effective_object_permissions (SSISDB
Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the effective permissions for the current principal for all objects in the Integration Services catalog.
Remarks
This view displays the permission types listed in the following table:
Only objects on which the caller has permissions are evaluated. The permissions are computed based on the
following:
Explicit permissions
Inherited permissions
Membership of the principal in roles
Membership of the principal in groups
Permissions
Users can see effective permissions only for themselves and for roles of which they are members.
catalog.environment_variables (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the environment variable details for all environments in the Integration Services catalog.
Remarks
This view displays a row for each environment variable in the catalog.
Permissions
This view requires one of the following permissions:
READ permission on the corresponding environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
NOTE
When you have permission to perform an operation on the server, you also have permission to view information about the
operation. Row-level security is enforced; only rows that you have permission to view are displayed.
catalog.environment_references (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the environment references for all projects in the SSISDB catalog.
Remarks
This view displays a row for each environment reference in the catalog.
A project can have relative or absolute environment references. Relative references refer to the environment
by name and require that it resides in the same folder as the project. Absolute references refer to the
environment by name and folder, and may refer to environments that reside in a different folder than the
project. A project can reference multiple environments.
Permissions
This view requires one of the following permissions:
READ permission on the corresponding project
Membership to the ssis_admin database role
Membership to the sysadmin server role.
NOTE
If you have READ permission on a project, you also have READ permission on all of the packages and environment
references associated with that project. Row-level security is enforced; only rows that you have permission to view are
displayed.
catalog.environments (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the environment details for all environments in the Integration Services catalog. Environments contain
variables that can be referenced by Integration Services projects.
Remarks
This view displays a row for each environment in the catalog. Environment names are only unique with respect to
the folder in which they are located. For example, an environment named E1 can exist in more than one folder in
the catalog, but each folder can have only one environment named E1 .
Permissions
This view requires one of the following permissions:
READ permission on the environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
NOTE
Row-level security is enforced; only rows that you have permission to view are displayed.
catalog.event_message_context
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays information about the conditions that are associated with execution event messages, for executions on the
Integration Services server.
Remarks
The following table lists the context types.
Permissions
This view requires one of the following permissions:
READ permission on the operation
Membership to the ssis_admin database role.
Membership to the sysadmin server role.
catalog.event_messages
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays information about messages that were logged during operations.
Remarks
This view displays the following message source types.
30 Package-level objects
Permissions
This view requires one of the following permissions:
READ permission on the operation
Membership to the ssis_admin database role.
Membership to the sysadmin server role.
See Also
catalog.event_message_context
catalog.executable_statistics
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays a row for each executable that is run, including each iteration of an executable.
An executable is a task or container that you add to the control flow of a package.
0 (Success)
1 (Failure)
2 (Completion)
3 (Cancelled)
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
This view displays a row for each executable in the specified execution.
An executable is a task or container that you add to the control flow of a package.
Permissions
This view requires one of the following permissions:
READ permission on the instance of execution
Membership to the ssis_admin database role
Membership to the sysadmin server role
NOTE
When you have permission to perform an operation on the server, you also have permission to view information about the
operation. Row-level security is enforced; only rows that you have permission to view are displayed.
Remarks
catalog.execution_component_phases
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the time spent by a data flow component in each execution phase.
Remarks
This view displays a row for each execution phase of a data flow component, such as Validate, Pre-Execute, Post-
Execute, PrimeOutput, and ProcessInput. Each row displays the start and end time for a specific execution phase.
Example
The following example uses the catalog.execution_component_phases view to find the total amount of time that a
specific package has spent executing in all phases (active_time ), and the total elapsed time for the package
(total_time ).
WARNING
The catalog.execution_component_phases view provides this information when the logging level of the package execution is
set to Performance or Verbose. For more information, see Enable Logging for Package Execution on the SSIS Server.
use SSISDB
select package_name, task_name, subcomponent_name, execution_path,
SUM(DATEDIFF(ms,start_time,end_time)) as active_time,
DATEDIFF(ms,min(start_time), max(end_time)) as total_time
from catalog.execution_component_phases
where execution_id = 1841
group by package_name, task_name, subcomponent_name, execution_path
order by package_name, task_name, subcomponent_name, execution_path
Permissions
This view requires one of the following permissions:
READ permission on the instance of execution
Membership to the ssis_admin database role
Membership to the sysadmin server role
NOTE
When you have permission to perform an operation on the server, you also have permission to view information about the
operation. Row-level security is enforced; only rows that you have permission to view are displayed.
catalog.execution_data_statistics
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
This view displays a row each time a data flow component sends data to a downstream component, for a given
package execution. The information in this view can be used to compute the data throughput for a component.
Remarks
When there are multiple outputs from the component, a row is added for each of the outputs.
By default, when an execution is started, the information about the number of rows that are sent is not
logged.
To view this data for a given package execution, set the logging level to Verbose . For more information, see
Enable Logging for Package Execution on the SSIS Server.
Permissions
This view requires one of the following permissions:
READ permission on the instance of execution
Membership to the ssis_admin database role
Membership to the sysadmin server role
NOTE
When you have permission to perform an operation on the server, you also have permission to view information about the
operation. Row-level security is enforced; only rows that you have permission to view are displayed.
catalog.execution_data_taps
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays information for each data tap defined in an execution.
package_path nvarchar(max) The package path for the data flow task
where the data is tapped.
Permissions
This view requires one of the following permissions:
READ permission on the instance of execution
Membership to the ssis_admin database role
Membership to the sysadmin server role
NOTE
When you have permission to perform an operation on the server, you also have permission to view information about the
operation. Row-level security is enforced; only rows that you have permission to view are displayed.
See Also
Generating Dump Files for Package Execution
catalog.execution_parameter_values (SSISDB
Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the actual parameter values that are used by Integration Services packages during an instance of
execution.
LOGGING_LEVEL
DUMP_ON_ERROR
DUMP_ON_EVENT
DUMP_EVENT_CODE
CALLER_INFO
SYNCHRONIZED
Remarks
This view displays a row for each execution parameter in the catalog. An execution parameter value is the value
that is assigned to a project parameter or package parameter during a single instance of execution.
Permissions
This view requires one of the following permissions:
READ permission on the instance of execution
Membership to the ssis_admin database role
Membership to the sysadmin server role
NOTE
When you have permission to perform an operation on the server, you also have permission to view information about the
operation. Row-level security is enforced; only rows that you have permission to view are displayed.
catalog.execution_property_override_values
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the property override values that were set during execution of the package.
Remarks
This view displays a row for each execution in which property values were overridden using the Proper ty
overrides section in the Advanced tab of the Execute Package dialog. The path to the property is derived from
the Package Path property of the package task.
Permissions
This view requires one of the following permissions:
READ permission on the instance of execution
Membership to the ssis_admin database role
Membership to the sysadmin server role
NOTE
When you have permission to perform an operation on the server, you also have permission to view information about the
operation. Row-level security is enforced; only rows that you have permission to view are displayed.
catalog.executions (SSISDB Database)
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the instances of package execution in the Integration Services catalog. Packages that are executed with
the Execute Package task run in the same instance of execution as the parent package.
executed_as_sid varbinar y(85) The SID of the user who started the
instance of execution.
Remarks
This view displays a row for each instance of execution in the catalog.
Permissions
This view requires one of the following permissions:
READ permission on the instance of execution
Membership to the ssis_admin database role
Membership to the sysadmin server role
NOTE
Row-level security is enforced; only rows that you have permission to view are displayed.
catalog.explicit_object_permissions (SSISDB
Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays only the permissions that have been explicitly assigned to the user.
Remarks
This view displays the permission types listed in the following table:
Permissions
This view does not give a complete view of permissions for the current principal. The user must also check whether
the principal is a member of roles and groups that have permissions assigned.
catalog.extended_operation_info (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays extended information for all operations in the Integration Services catalog.
Remarks
A single operation can have multiple extended information rows.
Permissions
This view requires one of the following permissions:
READ permission on the operation
Membership to the ssis_admin database role
Membership to the sysadmin server role
NOTE
When you have permission to perform an operation on the server, you also have permission to view information about the
operation. Row-level security is enforced; only rows that you have permission to view are displayed.
catalog.folders (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the folders in the Integration Services catalog.
Remarks
This view displays a row for each folder in the catalog.
Permissions
This view requires one of the following permissions:
READ permission on the folder
Membership to the ssis_admin database role
Membership to the sysadmin server role
NOTE
When you have permission to perform an operation on the server, you also have permission to view information about the
operation. Row-level security is enforced; only rows that you have permission to view are displayed.
catalog.object_parameters (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the parameters for all packages and projects in the Integration Services catalog.
Permissions
To see rows in this view, you must have one of the following permissions:
READ permission on the project
Membership to the ssis_admin database role
Membership in the sysadmin server role.
Row-level security is enforced; only rows that you have permission to view are displayed.
catalog.object_versions (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the versions of objects in the Integration Services catalog. In this release, only versions of projects are
supported in this view.
Remarks
This view displays a row for each version of an object in the catalog.
Permissions
To see rows in this view, you must have one of the following permissions:
READ permission on the object
Membership to the ssis_admin database role
Membership in the sysadmin server role.
NOTE
Row-level security is enforced; only rows that you have permission to view are displayed.
catalog.operation_messages (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays messages that are logged during operations in the Integration Services catalog.
Remarks
This view displays a row for each message that is logged during an operation in the catalog. The message can be
generated by the server, by the package execution process, or by the execution engine.
This view displays the following message types:
-1 Unknown
120 Error
110 Warning
70 Information
10 Pre-validate
20 Post-validate
M ESSA GE_T Y P E VA L UE DESC RIP T IO N
30 Pre-execute
40 Post-execute
60 Progress
50 StatusChange
100 QueryCancel
130 TaskFailed
90 Diagnostic
200 Custom
140 DiagnosticEx
400 NonDiagnostic
80 VariableValueChanged
30 Package-level objects
Permissions
This view requires one of the following permissions:
READ permission on the operation
Membership to the ssis_admin database role
Membership to the sysadmin server role
NOTE
When you have permission to perform an operation on the server, you also have permission to view information about the
operation. Row-level security is enforced; only rows that you have permission to view are displayed.
catalog.operations (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the details of all operations in the Integration Services catalog.
stopped_by_sid varbinar y(85) The SID of the user who stopped the
operation.
Remarks
This view displays one row for each operation in the Integration Services catalog. It allows the administrator to
enumerate all the logical operations that were performed on the server, such as deploying a project or executing
a package.
This view displays the following operation types, as listed in the operation_type column:
(Stored procedure)
(Stored procedure)
(Stored procedures)
(Stored procedure)
O P ERAT IO N _T Y P E O P ERAT IO N _T Y P E O B JEC T _ID O B JEC T _N A M E
VA L UE DESC RIP T IO N DESC RIP T IO N DESC RIP T IO N
(Stored procedure)
(Stored procedure)
(Stored procedure)
Permissions
This view requires one of the following permissions:
READ permission on the operation
Membership to the ssis_admin database role
Membership to the sysadmin server role
NOTE
When you have permission to perform an operation on the server, you also have permission to view information about
the operation. Row-level security is enforced; only rows that you have permission to view are displayed.
catalog.packages (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the details for all packages that appear in the SSISDB catalog.
Remarks
This view displays a row for each package in the catalog.
Permissions
This view requires one of the following permissions:
READ permission on the corresponding project
Membership to the ssis_admin database role
Membership to the sysadmin server role.
NOTE
If you have READ permission on a project, you also have READ permission on all of the packages and environment
references associated with that project. Row-level security is enforced; only rows that you have permission to view are
displayed.
catalog.projects (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the details for all projects that appear in the SSISDB catalog.
Remarks
This view displays a row for each project in the catalog.
Permissions
This view requires one of the following permissions:
READ permission on the project
Membership to the ssis_admin database role
Membership to the sysadmin server role.
NOTE
If you have READ permission on a project, you also have READ permission on all of the packages and environment
references associated with that project. Row-level security is enforced; only rows that you have permission to view are
displayed.
catalog.validations (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Displays the details of all project and package validations in the Integration Services catalog.
stopped_by_sid varbinar y(85) The SID of the user who stopped the
operation.
Remarks
This view displays one row for each validation in the Integration Services catalog.
Permissions
This view requires one of the following permissions:
READ permission on the corresponding operation
Membership to the ssis_admin database role
Membership to the sysadmin server role
NOTE
When you have permission to perform an operation on the server, you also have permission to view information about the
operation. Row-level security is enforced; only rows that you have permission to view are displayed.
catalog.master_properties (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Displays the properties of the Integration Services Scale Out Master.
Remarks
This view displays a row for each scale out master property. The properties displayed by this view include the
following:
Permissions
All members of public database role have read permission for this view.
catalog.worker_agents (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Displays the information for the Integration Services Scale Out Worker.
LastOnlineTime datetimeoffset(7) The last time that the Scale Out Worker
is online.
Remarks
This view displays a row for each Scale Out Worker connecting to the Scale Out Master working with the SSISDB
catalog.
Permissions
This view requires one of the following permissions:
Membership to the ssis_admin database role
Membership to the ssis_cluster_executor database role
Membership to the sysadmin server role
Stored Procedures (Integration Services Catalog)
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
This section describes the Transact-SQL stored procedures that are available for administering Integration Services
projects that have been deployed to an instance of SQL Server.
Call the Integration Services stored procedures to add, remove, modify, or execute objects that are stored in the
SSISDB catalog.
The default name of the catalog is SSISDB. The objects that are stored in the catalog include projects, packages,
parameters, environments, and operational history.
You can use the database views and stored procedures directly, or write custom code that calls the managed API.
Management Studio and the managed API query the views and call the stored procedures that are described in
this section to perform many of their tasks.
In This Section
catalog.add_data_tap
Adds a data tap on the output of a component in a package data flow.
catalog.add_data_tap_by_guid
Adds a data tap to a specific data flow path in a package data flow.
catalog.check_schema_version
Determines whether the SSISDB catalog schema and the Integration Services binaries (ISServerExec and SQLCLR
assembly) are compatible.
catalog.clear_object_parameter_value (SSISDB Database)
Clears the value of a parameter for an existing Integration Services project or package that is stored on the server.
catalog.configure_catalog (SSISDB Database)
Configures the Integration Services catalog by setting a catalog property to a specified value.
catalog.create_environment (SSISDB Database)
Creates an environment in the Integration Services catalog.
catalog.create_environment_reference (SSISDB Database)
Creates an environment reference for a project in the Integration Services catalog.
catalog.create_environment_variable (SSISDB Database)
Create an environment variable in the Integration Services catalog.
catalog.create_execution (SSISDB Database)
Creates an instance of execution in the Integration Services catalog.
catalog.create_execution_dump
Causes a running package to pause and create a dump file.
catalog.create_folder (SSISDB Database)
Creates a folder in the Integration Services catalog.
catalog.delete_environment (SSISDB Database)
Deletes an environment from a folder in the Integration Services catalog.
catalog.delete_environment_reference (SSISDB Database)
Deletes an environment reference from a project in the Integration Services catalog.
catalog.delete_environment_variable (SSISDB Database)
Deletes an environment variable from an environment in the Integration Services catalog.
catalog.delete_folder (SSISDB Database)
Deletes a folder from the Integration Services catalog.
catalog.delete_project (SSISDB Database)
Deletes an existing project from a folder in the Integration Services catalog.
catalog.deny_permission (SSISDB Database)
Denies a permission on a securable object in the Integration Services catalog.
catalog.deploy_project (SSISDB Database)
Deploys a project to a folder in the Integration Services catalog or updates an existing project that has been
deployed previously.
catalog.get_parameter_values (SSISDB Database)
Resolves and retrieves the default parameter values from a project and corresponding packages in the Integration
Services catalog.
catalog.get_project (SSISDB Database)
Retrieves the properties of an existing project in the Integration Services catalog.
catalog.grant_permission (SSISDB Database)
Grants a permission on a securable object in the Integration Services catalog.
catalog.move_environment (SSISDB Database)
Moves an environment from one folder to another within the Integration Services catalog.
catalog.move_project ((SSISDB Database)
Moves a project from one folder to another within the Integration Services catalog.
catalog.remove_data_tap
Removes a data tap from a component output that is in an execution.
catalog.rename_environment (SSISDB Database)
Renames an environment in the Integration Services catalog.
catalog.rename_folder (SSISDB Database)
Renames a folder in the Integration Services catalog.
catalog.restore_project (SSISDB Database)
Restores a project in the Integration Services catalog to a previous version.
catalog.revoke_permission (SSISDB Database)
Revokes a permission on a securable object in the Integration Services catalog.
catalog.set_environment_property (SSISDB Database)
Sets the property of an environment in the Integration Services catalog.
catalog.set_environment_reference_type (SSISDB Database)
Sets the reference type and environment name associated with an existing environment reference for a project in
the Integration Services catalog.
catalog.set_environment_variable_property (SSISDB Database)
Sets the property of an environment variable in the Integration Services catalog.
catalog.set_environment_variable_protection (SSISDB Database)
Sets the sensitivity bit of an environment variable in the Integration Services catalog.
catalog.set_environment_variable_value (SSISDB Database)
Sets the value of an environment variable in the Integration Services catalog.
catalog.set_execution_parameter_value (SSISDB Database)
Sets the value of a parameter for an instance of execution in the Integration Services catalog.
catalog.set_execution_property_override_value
Sets the value of a property for an instance of execution in the Integration Services catalog.
catalog.set_folder_description (SSISDB Database)
Sets the description of a folder in the Integration Services catalog.
catalog.set_object_parameter_value (SSISDB Database)
Sets the value of a parameter in the Integration Services catalog. Associates the value to an environment variable
or assigns a literal value that will be used by default if no other values are assigned.
catalog.start_execution (SSISDB Database)
Starts an instance of execution in the Integration Services catalog.
catalog.startup
Performs maintenance of the state of operations for the SSISDB catalog.
catalog.stop_operation (SSISDB Database)
Stops a validation or instance of execution in the Integration Services catalog.
catalog.validate_package (SSISDB Database)
Asynchronously validates a package in the Integration Services catalog.
catalog.validate_project (SSISDB Database)
Asynchronously validates a project in the Integration Services catalog.
catalog.add_execution_worker (SSISDB Database)
Adds a Integration Services Scale Out Worker to an instance of execution in Scale Out.
catalog.enable_worker_agent (SSISDB Database)
Enable a Scale Out Worker for Scale Out Master working with this Integration Services catalog.
catalog.disable_worker_agent (SSISDB Database)
Disable a Scale Out Worker for Scale Out Master working with this Integration Services catalog.
catalog.add_data_tap
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Adds a data tap on the output of a component in a package data flow, for an instance of the execution.
Syntax
catalog.add_data_tap [ @execution_id = ] execution_id
, [ @task_package_path = ] task_package_path
, [ @dataflow_path_id_string = ] dataflow_path_id_string
, [ @data_filename = ] data_filename
, [ @max_rows = ] max_rows
, [ @data_tap_id = ] data_tap_id OUTPUT
Arguments
[ @execution_id = ] execution_id
The execution ID for the execution that contains the package. The execution_id is a bigint .
[ @task_package_path = ] task_package_path
The package path for the data flow task. The PackagePath property for the data flow task specifies the path. The
path is case-sensitive. To locate the package path, in SQL Server Data Tools right-click the Data Flow task, and then
click Proper ties . The PackagePath property appears in the Proper ties window.
The task_package_path is a nvarchar(max) .
[ @dataflow_path_id_string = ] dataflow_path_id_string
The identification string for the data flow path. A path connects two data flow components. The
IdentificationString property for the path specifies the string.
To locate the identification string, in SQL Server Data Tools right-click the path between two data flow components
and then click Proper ties . The IdentificationString property appears in the Proper ties window.
The dataflow_path_id_string is a nvarchar(4000) .
[ @data_filename = ] data_filename
The name of the file that stores the tapped data. If the data flow task executes inside a Foreach Loop or a For Loop
container, separate files store tapped data for each iteration of the loop. Each file is prefixed with a number that
corresponds to an iteration.
By default, the file is stored in the <drive>:\Program Files\Microsoft SQL Server\130\DTS\DataDumps folder.
The data_filename is a nvarchar(4000) .
[ @max_rows = ] max_rows
The number of rows that are captured during the data tap. If this value is not specified, all rows are captured. The
max_rows is an int .
[ @data_tap_id = ] data_tap_id
Returns the ID of the data tap. The data_tap_id is a bigint .
Example
In the following example, a data tap is created on the data flow path, 'Paths[OLE DB Source.OLE DB Source Output] ,
in the data flow task, \Package\Data Flow Task . The tapped data is stored in the output0.txt file in the DataDumps
folder (<drive>:\Program Files\Microsoft SQL Server\130\DTS\DataDumps).
Remarks
To add data taps, the instance of the execution must be in the created state (a value of 1 in the status column of
the catalog.operations (SSISDB Database)view) . The state value changes once you run the execution. You can
create an execution by calling catalog.create_execution (SSISDB Database).
The following are considerations for the add_data_tap stored procedure.
If an execution contains a parent package and one or more child packages, you need to add a data tap for
each package that you want to tap data for.
If a package contains more than one data flow task with the same name, the task_package_path uniquely
identifies the data flow task that contains the component output that is tapped.
When you add data tap, it is not validated before the package is run.
It is recommended that you limit the number of rows that are captured during the data tap, to avoid
generating large data files. If the machine on which the stored procedure is executed, runs out of storage
space for the data files, the package stops running and an error message is written to a log.
Running the add_data_tap stored procedure impacts the performance of the package. It is recommended
that you run the stored procedure only to troubleshoot data issues.
To access the file that stores the tapped data, you must be an administrator on the machine on which the
stored procedure is run. You must also be the user who started the execution that contains the package with
the data tap.
Return Codes
0 (success)
When the stored procedure fails, it throws an error.
Result Set
None
Permissions
This stored procedure requires one of the following permissions:
MODIFY permissions on the instance of execution
Membership to the ssis_admin database role
Membership to the sysadmin server role
Requirements
External Resources
Blog entry, SSIS 2012: A Peek to Data Taps, on rafael-salas.com.
See Also
catalog.add_data_tap_by_guid
catalog.add_data_tap_by_guid
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Adds a data tap to a specific data flow path in a package data flow, for an instance of the execution.
Syntax
catalog.add_data_tap_by_guid [ @execution_id = ] execution_id
, [ @dataflow_task_guid = ] dataflow_task_guid
, [ @dataflow_path_id_string = ] dataflow_path_id_string
, [ @data_filename = ] data_filename
, [ @max_rows = ] max_rows
, [ @data_tap_id = ] data_tap_id
Arguments
[ @execution_id = ] execution_id
The execution ID for the execution that contains the package. The execution_id is a bigint .
[ @dataflow_task_guid = ] dataflow_task_guid
The ID for the data task flow in the package that contains the data flow path to be tapped. The dataflow_task_guid
is auniqueidentifier .
[ @dataflow_path_id_string = ] dataflow_path_id_string
The identification string for the data flow path. A path connects two data flow components. The
IdentificationString property for the path specifies the string.
To locate the identification string, in SQL Server Data Tools right-click the path between two data flow components
and then click Proper ties . The IdentificationString property appears in the Proper ties window.
The dataflow_path_id_string is a nvarchar(4000) .
[ @data_filename = ] data_filename
The name of the file that stores the tapped data. If the data flow task executes inside a Foreach Loop or a For Loop
container, separate files store tapped data for each iteration of the loop. Each file is prefixed with a number that
corresponds to an iteration. Data tap files are written to the folder "<SQL Server installation folder>\130\DTS\".
The data_filename is a nvarchar(4000) .
[ @max_rows = ] max_rows
The number of rows that are captured during the data tap. If this value is not specified, all rows are captured. The
max_rows is an int .
[ @data_tap_id = ] data_tap_id
The ID of the data tap. The data_tap_id is a bigint .
Example
In the following example, a data tap is created on the data flow path, Paths[SRC DimDCVentor.OLE DB Source Output] ,
in the data flow task {D978A2E4-E05D-4374-9B05-50178A8817E8} . The tapped data is stored in the
DCVendorOutput.csv file.
Remarks
To add data taps, the instance of the execution must be in the created state (a value of 1 in the status column of
the catalog.operations (SSISDB Database)view) . The state value changes once you run the execution. You can
create an execution by calling catalog.create_execution (SSISDB Database).
The following are considerations for the add_data_tap_by_guid stored procedure.
When you add a data tap, it is not validated before the package is run.
It is recommended that you limit the number of rows that are captured during the data tap, to avoid
generating large data files. If the machine on which the stored procedure is executed, runs out of storage
space for the data files, the stored procedure stops running.
Running the add_data_tap_by_guid stored procedure impacts the performance of the package. It is
recommended that you run the stored procedure only to troubleshoot data issues.
To access the file that stores the tapped data, you must have administrator permissions on the machine on
which the stored procedure is run, or you must be the user that started the execution that contains the
package with the data tap.
Return Codes
0 (success)
When the stored procedure fails, it throws an error.
Result Set
None
Permissions
This stored procedure requires one of the following permissions:
MODIFY permissions on the instance of execution
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server 2017 (14.x) and later
Adds a Integration Services Scale Out Worker to an instance of execution in Scale Out.
Syntax
catalog.add_execution_worker [ @execution_id = ] execution_id, [ @workeragent_id = ] workeragent_id
Arguments
[ @execution_id = ] execution_id
The unique identifier for the instance of execution. The execution_id is bigint .
[@workeragent_id = ] workeragent_id
The worker agent id of a Scale Out Worker. The workeragent_id is uniqueIdentifier .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the instance of execution
Membership to the ssis_admin database role
Membership to the sysadmin server role
See Also
Execute packages in Scale Out.
catalog.check_schema_version
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Determines whether the SSISDB catalog schema and the Integration Services binaries (ISServerExec and SQLCLR
assembly) are compatible.
The ISServerExec.exc logs an error message when the schema and the binaries are incompatible.
The SSISDB schema version is incremented when the schema changes during the application of patches and
during upgrades. It is recommended that you run this stored procedure after an SSISDB backup has been restored
to ensure that the schema and binaries are compatible.
Syntax
catalog.check_schema_version [ @use32bitruntime = ] use32bitruntime
Arguments
[ @use32bitruntime= ] use32bitruntime
When the parameter is set to 1 , the 32-bit version of dtexec is called. The use32bitruntime is an int .
Result Set
None
Permissions
This stored procedure requires the following permission:
Membership to the ssis_admin database role.
catalog.clear_object_parameter_value (SSISDB
Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Clears the value of a parameter for an existing Integration Services project or package that is stored on the server.
Syntax
catalog.clear_object_parameter [ @folder_name = ] folder_name
, [ @project_name = ] project_name
, [ @object_type = ] object_type
, [ @object_name = ] object_name
, [ @parameter_ name = ] parameter_name
Arguments
[ @folder_name = ] folder_name
The name of the folder that contains the project. The folder_name is nvarchar(128) .
[ @project_name = ] project_name
The name of project. The project_name is nvarchar(128) .
[ @object_type = ] object_type
The type of object. Valid values include 20 for a project and 30 for a package. The object_type is smallInt .
[ @ object _name = ] object _name
The name of the package. The object _name is nvarchar(260) .
[ @parameter_ name = ] parameter_name
The name of the parameter. The parameter_ name is nvarchar(128) .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the project
Membership to the ssis_admin database role
Membership to the sysadmin server role
Errors and Warnings
The following list describes some conditions that may cause the clear_object_parameter stored procedure to raise
an error:
An invalid object type is specified or the object name cannot be found in the project.
The project does not exist, the project is not accessible, or the project name is invalid
An invalid parameter name is specified.
The user does not have the appropriate permissions.
catalog.configure_catalog (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Configures the Integration Services catalog by setting a catalog property to a specified value.
Syntax
catalog.configure_catalog [ @property_name = ] property_name , [ @property_value = ] property_value
Arguments
[ @property_name = ] property_name
The name of the catalog property. The property_name is nvarchar(255) . For more information about available
properties, see catalog.catalog_properties (SSISDB Database).
[ @property_value = ] property_value
The value of the catalog property. The property_value is nvarchar(255) . For more information about property
values, see catalog.catalog_properties (SSISDB Database)
Result Sets
None
Remarks
This stored procedure determines whether the property_value is valid for each property_name.
This stored procedure can be performed only when there are no active executions, such as pending, queued,
running, and paused executions.
While the catalog is being configured, all other catalog stored procedures fail with the error message "Server is
currently being configured."
When the catalog is configured, an entry is written to the operation log.
Permissions
This stored procedure requires one of the following permissions:
Membership to the ssis_admin database role
Membership to the sysadmin server role
Errors and Warnings
The following list describes some conditions that may raise an error or warning:
The property does not exist
The property value is invalid
catalog.create_customized_logging_level
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server 2016 (13.x) and later
Creates a new customized logging level. For more info about customized logging levels, see Integration Services
(SSIS) Logging.
Syntax
catalog.create_customized_logging_level [ @level_name = ] level_name
, [ @level_description = ] level_description
, [ @profile_value = ] profile_value
, [ @events_value = ] events_value
, [ @level_id = ] level_id OUT
Arguments
[ @level_name = ] level_name
The name for the new existing customized logging level.
The level_name is nvarchar(128) .
[ @level_description = ] level_description
The description for the new existing customized logging level.
The level_description is nvarchar(max) .
[ @profile_value = ] profile_value
The statistics that you want the new customized logging level to log.
Valid values for statistics include the following. These values correspond to the values on the Statistics tab of the
Customized Logging Level Management dialog box.
Execution = 0
Volume = 1
Performance = 2
The profile_value is a bigint .
[ @events_value = ] events_value
The events that you want the new customized logging level to log.
Valid values for events include the following. These values correspond to the values on the Events tab of the
Customized Logging Level Management dialog box.
EVEN T S W IT H O UT EVEN T C O N T EXT EVEN T S W IT H EVEN T C O N T EXT
OnVariableValueChanged = 0 OnVariableValueChanged_IncludeContext = 32
OnExecutionStatusChanged = 1 OnExecutionStatusChanged_IncludeContext = 33
OnPreExecute = 2 OnPreExecute_IncludeContext = 34
OnPostExecute = 3 OnPostExecute_IncludeContext = 35
OnPreValidate = 4 OnPreValidate_IncludeContext = 36
OnPostValidate = 5 OnPostValidate_IncludeContext = 37
OnWarning = 6 OnWarning_IncludeContext = 38
OnInformation = 7 OnInformation_IncludeContext = 39
OnError = 8 OnError_IncludeContext = 40
OnTaskFailed = 9 OnTaskFailed_IncludeContext = 41
OnProgress = 10 OnProgress_IncludeContext = 42
OnQueryCancel = 11 OnQueryCancel_IncludeContext= 43
OnBreakpointHit = 12 OnBreakpointHit_IncludeContext = 44
OnCustomEvent = 13 OnCustomEvent_IncludeContext = 45
Diagnostic = 14 Diagnostic_IncludeContext = 46
DiagnosticEx = 15 DiagnosticEx_IncludeContext = 47
NonDiagnostic = 16 NonDiagnostic_IncludeContext = 48
Remarks
To combine multiple values in Transact-SQL for the profile_value or events_value argument, follow this example. To
capture the OnError (8) and DiagnosticEx (15) events, the formula to calculate events_value is 2^8 + 2^15 = 33024 .
Return Codes
0 (success)
When the stored procedure fails, it throws an error.
Result Set
None
Permissions
This stored procedure requires one of the following permissions:
Membership in the ssis_admin database role
Membership in the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Creates an environment in the Integration Services catalog.
Syntax
catalog.create_environment [ @folder_name = ] folder_name
, [ @environment_name = ] environment_name
[ , [ @environment_description = ] environment_description ]
Arguments
[@folder_name =] folder_name
The name of the folder to contain the environment. The folder_name is nvarchar(128) .
[@environment_name =] environment_name
The name of the environment. The environment_name is nvarchar(128) .
[@environment_description=] environment_description
An optional description of the environment. The environment_description is nvarchar(1024) .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the folder
Membership to the ssis_admin database role
database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Creates an environment reference for a project in the Integration Services catalog.
Syntax
catalog.create_environment_reference [ @folder_name = ] folder_name
, [ @project_name = ] project_name
, [ @environment_name = ] environment_name
, [ @reference_type = ] reference_type
[ , [ @environment_folder_name = ] environment_folder_name ]
[ , [ @reference_id = ] reference_id OUTPUT ]
Arguments
[ @folder_name = ] folder_name
The name of the folder of the project that is referencing the environment. The folder_name is nvarchar(128) .
[ @project_name = ] project_name
The name of the project that is referencing the environment. The project_name is nvarchar(128) .
[ @environment_name = ] environment_name
The name of the environment being referenced. The environment_name is nvarchar(128) .
[ @reference_type = ] reference_type
Indicates whether the environment can be located in the same folder as the project (relative reference) or in a
different folder (absolute reference). Use the value R to indicate a relative reference. Use the value A to indicate
an absolute reference. The reference_type is char(1) .
[ @environment_folder_name = ] environment_folder_name
The name of the folder in which the environment that being referenced is located. This value is required for
absolute references. The environment_folder_name is nvarchar(128) .
[ @reference_id = ] reference_id
Returns the unique identifier for the new reference. This parameter is optional. The reference_id is bigint .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the project, and READ permission on the environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
Remarks
A project can have relative or absolute environment references. Relative references refer to the environment by
name and require that it resides in the same folder as the project. Absolute references refer to the environment by
name and folder, and may refer to environments that reside in a different folder than the project. A project can
reference multiple environments.
catalog.create_environment_variable (SSISDB
Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Create an environment variable in the Integration Services catalog.
Syntax
catalog.create_environment_variable [ @folder_name = ] folder_name
, [ @environment_name = ] environment_name
, [ @variable_name = ] variable_name
, [ @data_type = ] data_type
, [ @sensitive = ] sensitive
, [ @value = ] value
, [ @description = ] description
Arguments
[@folder_name =] folder_name
The name of the folder that contains the environment. The folder_name is nvarchar(128) .
[@environment_name =] environment_name
The name of the environment. The environment_name is nvarchar(128) .
[@variable_name =] variable_name
The name of the environment variable. The variable_name is nvarchar(128) .
[@data_type =] data_type
The data type of the variable. Supported environment variable data types include Boolean , Byte , DateTime ,
Double , Int16 , Int32 , Int64 , Single , String , UInt32 , and UInt64 . Unsupported environment variable data types
include Char , DBNull , Object , and Sbyte . The data type of the data_type parameter is nvarchar(128) .
[@sensitive =] sensitive
Indicates whether the variable contains a sensitive value or not. Use a value of 1 to indicate that the value of the
environment variable is sensitive or a value of 0 to indicate that it is not. A sensitive value is encrypted when it is
stored. A value that is not sensitive is stored in plaintext.Sensitive is bit .
[@value =] value
The value of the environment variable. The value is sql_variant .
[@description =] description
The description of the environment variable. The value is nvarchar(1024) .
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
Remarks
An environment variable can be used to efficiently assign a value to a project parameter or package parameter for
use in the execution of a package. Environment variables enable the organization of parameter values. Variable
names must be unique within an environment.
The stored procedure validates the data type of the variable to make sure it is supported by the Integration
Services catalog.
TIP
Consider using the Int16 data type in Integration Services instead of the unsupported Sbyte data type.
The value passed to this stored procedure with the value parameter is converted from an Integration Services data
type to a SQL Server data type according to the following table:
Boolean bit
Int16 smallint
Int32 int
Int64 bigint
IN T EGRAT IO N SERVIC ES DATA T Y P E SQ L SERVER DATA T Y P E
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Creates an instance of execution in the Integration Services catalog.
This stored procedure uses the default server logging level.
Syntax
catalog.create_execution [ @folder_name = ] folder_name
, [ @project_name = ] project_name
, [ @package_name = ] package_name
[ , [ @reference_id = ] reference_id ]
[ , [ @use32bitruntime = ] use32bitruntime ]
[ , [ @runinscaleout = ] runinscaleout ]
[ , [ @useanyworker = ] useanyworker ]
, [ @execution_id = ] execution_id OUTPUT
Arguments
[@folder_name =] folder_name
The name of the folder that contains the package that is to be executed. The folder_name is nvarchar(128) .
[@project_name =] project_name
The name of the project that contains the package that is to be executed. The project_name is nvarchar(128) .
[@package_name =] package_name
The name of the package that is to be executed. The package_name is nvarchar(260) .
[@reference_id =] reference_id
A unique identifier for an environment reference. This parameter is optional. The reference_id is bigint .
[@use32bitruntime =] use32bitruntime
Indicates if the 32-bit runtime should be used to run the package on a 64-bit operating system. Use the value of
1 to execute the package with the 32-bit runtime when running on a 64-bit operating system. Use the value of 0
to execute the package with the 64-bit runtime when running on a 64-bit operating system. This parameter is
optional. The Use32bitruntime is bit .
[@runinscaleout =] runinscaleout
Indicate whether the execution is in Scale Out. Use the value of 1 to execute the package in Scale Out. Use the
value of 0 to execute the package without Scale Out. This parameter is optional. If not specified, its value is set to
DEFAULT_EXECUTION_MODE in [SSISDB].[catalog].[catalog_properties]. The runinscaleout is bit .
[@useanyworker =] useanyworker
Indicate whether any Scale Out Worker is allowed to do the execution.
Use the value of 1 to execute the package with any Scale Out Worker. When you set @useanyworker to
true, any worker whose maximum task count (as specified in the worker configuration file) is not yet
reached is available to run the package. For info about the worker configuration file, see Integration
Services (SSIS) Scale Out Worker.
Use the value of 0 to indicate that not all Scale Out Workers are allowed to execute the package. When
you set @useanyworker to false, you have to specify the workers that are allowed to run the package by
using Scale Out Manager or by calling the stored procedure [catalog].[add_execution_worker] . If you
specify a worker that's already running another package, the worker finishes running the current package
before it requests another execution.
This parameter is optional. If not specified, its value is set to 1. The useanyworker is bit .
[@execution_id =] execution_id
Returns the unique identifier for an instance of execution. The execution_id is bigint .
Remarks
An execution is used to specify the parameter values that are a package uses during a single instance of package
execution.
If an environment reference is specified with the reference_id parameter, the stored procedure populates the
project and package parameters with literal values or referenced values from the corresponding environment
variables. If environment reference is specified, default parameter values are used during package execution. To
determine exactly which values are used for a particular instance of execution, use the execution_id output
parameter value from this stored procedure and query the execution_parameter_values view.
Only packages that are marked as entry point packages can be specified in an execution. If a package that is not
an entry point is specified, the execution fails.
Example
The following example calls catalog.create_execution to create an instance of execution for the Child1.dtsx
package, which is not in Scale Out. Integration Services Project1 contains the package. The example calls
catalog.set_execution_parameter_value to set values for the Parameter1, Parameter2, and LOGGING_LEVEL
parameters. The example calls catalog.start_execution to start an instance of execution.
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and EXECUTE permissions on the project and, if applicable, READ permissions on the referenced
environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
If @runinscaleout is 1, the stored procedure requires one of the following permissions:
Membership to the ssis_admin database role
Membership to the ssis_cluster_executor database role
Membership to the sysadmin server role
See Also
catalog.start_execution (SSISDB Database)
catalog.set_execution_parameter_value (SSISDB Database)
catalog.add_execution_worker (SSISDB Database)
catalog.create_execution_dump
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Causes a running package to pause and create a dump file. The file is stored in the <drive>:\Program
Files\Microsoft SQL Server\130\Shared\ErrorDumps folder.
Syntax
catalog.create_execution_dump [ @execution_id = ] execution_id
Arguments
[ @execution_id = ] execution_id
The execution ID for the running package. The execution_id is bigint .
Example
In the following example, the running package with an execution ID of 88 is prompted to create a dump file.
Return Codes
0 (success)
When the stored procedure fails, it throws an error.
Result Set
None
Permissions
This stored procedure requires users to be members of the ssis_admin database role.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Creates a folder in the Integration Services catalog.
Syntax
catalog.create_folder [ @folder_name = ] folder_name, [ @folder_id = ] folder_id OUTPUT
Arguments
[@folder_name =] folder_name
The name of the new folder. The folder_name is nvarchar(128) .
[@folder_name =] folder_id
The unique identifier (ID) of the folder. The folder_id is bigint .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Deletes an existing customized logging level. For more info about customized logging levels, see Integration
Services (SSIS) Logging.
Syntax
catalog.delete_customized_logging_level [ @level_name = ] level_name
Arguments
[ @level_name = ] level_name
The name of the existing customized logging level to delete.
The level_name is nvarchar(128) .
Remarks
Return Codes
0 (success)
When the stored procedure fails, it throws an error.
Result Set
None
Permissions
This stored procedure requires one of the following permissions:
Membership in the ssis_admin database role
Membership in the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Deletes an environment from a folder in the Integration Services catalog.
Syntax
catalog.delete_environment [ @folder_name = ] folder_name , [ @environment_name = ] environment_name
Arguments
[ @folder_name = ] folder_name
The name of the folder that contains the environment. The folder_name is nvarchar(128) .
[ @environment_name = ] environment_name
The name of the environment that is to be deleted. The environment_name is nvarchar(128) .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Deletes an environment reference from a project in the Integration Services catalog.
Syntax
catalog.delete_environment_reference [ @reference_id = ] reference_id
Arguments
[ @reference_id = ] reference_id
The unique identifier of the environment reference. The reference_id is bigint .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
MODIFY permission on the project
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Deletes an environment variable from an environment in the Integration Services catalog.
Syntax
catalog.delete_environment_variable [ @folder_name = ] folder_name
, [ @environment_name = ] environment_name
, [ @variable_name = ] variable_name
Arguments
[ @folder_name = ] folder_name
The name of the folder that contains the environment. The folder_name is nvarchar(128) .
[ @environment_name = ] environment_name
The name of the environment that contains the variable. The environment_name is nvarchar(128) .
[ @variable_name = ] variable_name
The name of the variable that is to be deleted. The variable_name is nvarchar(128) .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Deletes a folder from the Integration Services catalog.
Syntax
catalog.delete_folder [ @folder_name = ] folder_name
Arguments
[ @folder_name = ] folder_name
The name of the folder that is to be deleted. The folder_name is nvarchar(128) .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Deletes an existing project from a folder in the Integration Services catalog.
Syntax
catalog.delete_project [ @folder_name = ] folder_name , [ @project_name = ] project_name
Arguments
[ @folder_name = ] folder_name
The name of the folder that contains the project. folder_name is nvarchar(128) .
[ @project_name = ] project_name
The name of the project that is to be deleted. project_name is nvarchar(128) .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the project
Membership to the ssis_admin database role
Membership to the sysadmin server role
Remarks
All objects and environment references of the corresponding project are deleted along with the project. However,
the versions of the project and the relevant operations records are retained until the next time the operation
cleanup job runs.
catalog.deny_permission (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Denies a permission on a securable object in the Integration Services catalog.
Syntax
catalog.deny_permission [ @object_type = ] object_type
, [ @object_id = ] object_id
, [ @principal_id = ] principal_id
, [ @permission_type = ] permission_type
Arguments
[ @object_type = ] object_type
The type of securable object. Securable objects types include folder ( 1 ), project ( 2 ), environment ( 3 ), and
operation ( 4 ).The object_type is smallint .
[ @object_id = ] object_id
The unique identifier (ID) or primary key of the securable object. The object_id is bigint .
[ @principal_id = ] principal_id
The ID of the principal who is to be denied. The principal_id is int .
[ @permission_type = ] permission_type
The type of permission that is to be denied. The permission_type is smallint .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
MANAGE_PERMISSIONS permission on the object
Membership to the ssis_admin database role
Membership to the sysadmin server role
Remarks
This stored procedure allows you to deny the permission types described in the following table:
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Deploys one or more packages to a folder in the Integration Services catalog or updates an existing package that
has been deployed previously.
Syntax
catalog.deploy_packages [ @folder_name = ] folder_name
, [ @project_name = ] project_name
, [ @packages_table = ] packages_table
[, [ @operation_id OUTPUT = ] operation_id OUTPUT]
Arguments
[ @folder_name = ] folder_name
The name of the folder. The folder_name is nvarchar(128) .
[ @project_name = ] project_name
The name of the project in the folder. The project_name is nvarchar(128) .
[ @packages_table = ] packages_table
The binary contents of Integration Services package (.dtsx) file(s). The packages_table is [catalog].
[Package_Table_Type]
[ @operation_id = ] operation_id
Returns the unique identifier for the deployment operation. The operation_id is bigint .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
CREATE_OBJECTS permissions on the project or MODIFY permissions on the package to update a package.
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Deploys a project to a folder in the Integration Services catalog or updates an existing project that has been
deployed previously.
Syntax
catalog.deploy_project [@folder_name =] folder_name
, [ @project_name = ] project_name
, [ @project_stream = ] projectstream
[ , [ @operation_id = ] operation_id OUTPUT ]
Arguments
[@folder_name =] folder_name
The name of the folder where the project is deployed. The folder_name is nvarchar(128) .
[@project_name =] project_name
The name of the new or updated project in the folder. The project_name is nvarchar(128) .
[@projectstream =] projectstream
The binary contents of an Integration Services project deployment file (.ispac extension).
You can use a SELECT statement with the OPENROWSET function and the BULK rowset provider to retrieve the
binary contents of the file. For an example, see Deploy Integration Services (SSIS) Projects and Packages. For more
information about OPENROWSET, see OPENROWSET (Transact-SQL).
The projectstream is varbinar y(MAX)
[@operation_id =] operation_id
Returns the unique identifier for the deployment operation. The operation_id is bigint .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
CREATE_OBJECTS permissions on the folder to deploy a new project or MODIFY permissions on the project
to update a project
Membership to the ssis_admin database role
Membership to the sysadmin server role
Remarks
During a project deployment or update, the stored procedure does not check the protection level of individual
packages in the project.
catalog.disable_worker_agent (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Disable a Scale Out Worker for Scale Out Master working with this Integration Services catalog.
Syntax
catalog.disable_worker_agent [ @WorkerAgentId = ] WorkerAgentId
Arguments
[@WorkerAgentId =] WorkerAgentId The worker agent ID of Scale Out Worker. The WorkerAgentId is
uniqueidentifier .
Example
This example disables the Scale Out Worker on MachineA.
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Enable a Scale Out Worker for Scale Out Master working with this Integration Services catalog.
Syntax
catalog.enable_worker_agent [ @WorkerAgentId = ] WorkerAgentId
Arguments
[@WorkerAgentId =] WorkerAgentId The worker agent ID of Scale Out Worker. The WorkerAgentId is
uniqueidentifier .
Example
This example enables the Scale Out Worker on MachineA.
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Resolves and retrieves the default parameter values from a project and corresponding packages in the Integration
Services catalog.
Syntax
catalog.get_parameter_values [ @folder_name = ] folder_name
, [ @project_name = ] project_name
, [ @package_name = ] package_name
[ , [ @reference_id = ] reference_id ]
Arguments
[ @folder_name = ] folder_name
The name of the folder that contains the project. The folder_name is nvarchar(128) .
[ @project_name = ] project_name
The name of the project where the parameters resides. The project_name is nvarchar(128) .
[ @package_name = ] package_name
The name of the package. Specify the package name to retrieve all project parameters and the parameters from a
specific package. The package_name is nvarchar(260) .
[ @reference_id = ] reference_id
The unique identifier of an environment reference. This parameter is optional. The reference_id is bigint .
Result Sets
Returns a table that has the following format:
NOTE
Literal values are displayed in plaintext. NULL is displayed in place of sensitive values.
Permissions
This stored procedure requires one of the following permissions:
READ permissions on the project and, if applicable, READ permission on the referenced environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Retrieves the binary stream of a project that has been deployed to the Integration Services server.
Syntax
catalog.get_project [ @folder_name = ] folder_name , [ @project_name = ] project_name
Arguments
[ @folder_name = ] folder_name
The name of the folder that contains the project. folder_name is nvarchar(128) .
[ @project_name = ] project_name
The name of the project. project_name is nvarchar(128) .
Result Sets
The binary stream of the project is returned as varbinar y(MAX) . No results are returned if the folder or project is
not found.
Permissions
This stored procedure requires one of the following permissions:
READ permissions on the project
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Grants a permission on a securable object in the Integration Services catalog.
Syntax
catalog.grant_permission [ @object_type = ] object_type
, [ @object_id = ] object_id
, [ @principal_id = ] principal_id
, [ @permission_type = ] permission_type
Arguments
[ @object_type = ] object_type
The type of securable object. Securable objects types include folder ( 1 ), project ( 2 ), environment ( 3 ), and
operation ( 4 ).The object_type is smallint .
[ @object_id = ] object_id
The unique identifier (ID) of the securable object. The object_id is bigint .
[ @principal_id = ] principal_id
The ID of the principal to be granted permission. The principal_id is int .
[ @permission_type = ] permission_type
The type of permission to be granted. The permission_type is smallint .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
ASSIGN_PERMISSIONS permissions on the object
Membership to the ssis_admin database role
Membership to the sysadmin server role
This procedure cannot be called by logins that were authenticated by SQL Server. It cannot be called by the sa
login.
Remarks
This stored procedure allows you to grant the permission types described in the following table:
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Moves an environment from one folder to another within the Integration Services catalog.
Syntax
catalog.move_environment [ @source_folder = ] source_folder
, [ @environment_name = ] environment_name
, [ @destination_folder = ] destination_folder
Arguments
[ @source_folder = ] source_folder
The name of the source folder, where the environment resides before the move. The source_folder is
nvarchar(128) .
[ @environment_name = ] environment_name
The name of the environment that is to be moved. The environment_name is nvarchar(128) .
[ @destination_folder = ] destination_folder
The name of the destination folder, where the environment resides after the move. The destination_folder is
nvarchar(128) .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
Remarks
Environment references from projects do not follow the environment during the move. Environment references
must be updated accordingly. This stored procedure will succeed even if environment references are broken by
moving an environment. Environment references must be updated after this stored procedure completes.
NOTE
A project can have relative or absolute environment references. Relative references refer to the environment by name, and
these references require that the environment reside in the same folder as the project. Absolute references refer to the
environment by name and folder, and these references refer to environments that reside in a different folder from that of the
project.
catalog.move_project - SSISDB Database
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Moves a project from one folder to another within the Integration Services catalog.
Syntax
catalog.move_project [ @source_folder = ] source_folder
, [ @project_name = ] project_name
, [ @destination_folder = ] destination_folder
Arguments
[ @source_folder = ] source_folder
The name of the source folder, where the project resides before the move. The source_folder is nvarchar(128) .
[ @project_name = ] project_name
The name of the project that is to be moved. The project_name is nvarchar(128) .
[ @destination_folder = ] destination_folder
The name of the destionation folder, where the project resides after the move. The destination_folder is
nvarchar(128) .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the project that you want to move and CREATE_OBJECTS permission on
the destination folder
Membership to the ssis_admin database role
Membership to the sysadmin server role
Remarks
When a project is moved from a source folder to a destination folder, the project in the source folder and
corresponding environment references are deleted. In the destination folder, an identical project and environment
references are created. Relative environment references will resolve to a different folder after the move. Absolute
references will resolve to the same folder after the move.
NOTE
A project can have relative or absolute environment references. Relative references refer to the environment by name, and
these references require that the environment reside in the same folder as the project. Absolute references refer to the
environment by name and folder, and these references refer to environments that reside in a different folder from that of the
project.
catalog.remove_data_tap
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Removes a data tap from a component output that is in an execution. The unique identifier for the data tap is
associated with an instance of the execution.
Syntax
catalog.remove_data_tap [ @data_tap_id = ] data_tap_id
Arguments
[ @data_tap_id = ] data_tap_id
The unique identifier for the data tap that is created by using the catalog.add_data_tap stored procedure. The
data_tap_id is bigint .
Remarks
When a package contains more than one data flow tasks that have the same name, the data tap is added to
the first data flow task with the given name.
To remove data taps, the instance of the execution must be in the created state (a value of 1 in the status
column of the catalog.operations (SSISDB Database)view) .
Return Codes
0 (success)
When the stored procedure fails, it throws an error.
Result Set
None
Permissions
This stored procedure requires one of the following permissions:
MODIFY permissions on the instance of execution
Membership to the ssis_admin database role
Membership to the sysadmin server role
See Also
catalog.add_data_tap
catalog.add_data_tap_by_guid
catalog.rename_customized_logging_level
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Renames an existing customized logging level. For more info about customized logging levels, see Integration
Services (SSIS) Logging.
Syntax
catalog.rename_customized_logging_level [ @old_name = ] old_name
, [ @new_name = ] new_name
Arguments
[ @old_name = ] old_name
The name of the existing customized logging level to rename.
The old_name is nvarchar(128) .
[ @new_name = ] new_name
The new name for the specified customized logging level.
The new_name is nvarchar(128) .
Remarks
Return Codes
0 (success)
When the stored procedure fails, it throws an error.
Result Set
None
Permissions
This stored procedure requires one of the following permissions:
Membership in the ssis_admin database role
Membership in the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Renames an environment in the Integration Services catalog.
Syntax
catalog.rename_environment [ @folder_name = ] folder_name
, [ @environment_name = ] environment_name
, [ @new_environment_name= ] new_environment_name
Arguments
[ @folder_name = ] folder_name
The name of the folder that contains the environment. The folder_name is nvarchar(128) .
[ @environment_name = ] environment_name
The original name of the environment. The environment_name is nvarchar(128) .
[ @new_environment_name = ] new_environment_name
The new name of the environment. The new_environment_name is nvarchar(128) .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
MODIFY permissions on the environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
NOTE
When an environment reference is not valid, validation and execution of the corresponding packages that use those
references will fail.
catalog.rename_folder (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Renames a folder in the Integration Services catalog.
Syntax
catalog.rename_folder [ @old_name = ] old_name , [ @new_name = ] new_name
Arguments
[ @old_name = ] old_name
The original name of the folder. The old_name is nvarchar(128) .
[ @new_name = ] new_name
The new name of the folder. The new_name is nvarchar(128) .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Restores a project in the Integration Services catalog to a previous version.
Syntax
catalog.restore_project [ @folder_name = ] folder_name
, [ @project_name = ] project _name
, [ @object_version_lsn = ] object_version_lsn
Arguments
[ @folder_name = ] folder_name
The name of the folder that contains the project. The folder_name is nvarchar(128) .
[ @project _name = ] project_name
The name of the project. The project_name is nvarchar(128) .
[ @object_version_lsn = ] object_version_lsn
The version of the project. The object_version_lsn is bigint .
Result Sets
Project details are returned as varbinar y(MAX) as part of the result set if the project_name is found.
NO RESULT SET is returned if the project cannot be restored to the specified folder.
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the project
Membership to the ssis_admin database role
Membership to the sysadmin server role
Remarks
When a project is restored, all parameters are assigned default values and all environment references remain
unchanged. The maximum number of project versions that are retained in the catalog is determined by the catalog
property MAX_VERSIONS_PER_PROJECT , as shown in the catalog_property view.
WARNING
Environment references may no longer be valid after a project has been restored.
catalog.revoke_permission (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Revokes a permission on a securable object in the Integration Services catalog.
Syntax
catalog.revoke_permission [ @object_type = ] object_type
, [ @object_id = ] object_id
, [ @principal_id = ] principal_id
, [ @permission_type = ] permission_type
Arguments
[ @object_type = ] object_type
The type of securable object. Securable objects types include folder ( 1 ), project ( 2 ), environment ( 3 ), and
operation ( 4 ).The object_type is smallint .
[ @object_id = ] object_id
The unique identitifier (ID) of the securable object. The object_id is bigint .
[ @principal_id = ] principal_id
The ID of the principal to be revoked permission. The principal_id is int .
[ @permission_type = ] permission_type
The type of permission. The permission_type is smallint .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
ASSIGN_PERMISSIONS permissions on the object
Membership to the ssis_admin database role
Membership to the sysadmin server role
Remarks
If permission_type is specified, the stored procedure removes the permission that is explicitly assigned to the
principal for the object. Even if there are no such instances, the procedure returns a success code value ( 0 ). If
permission_type is omitted, the stored procedure removes all permissions of the principal to the object.
NOTE
The principal may still have the specified permission on the object if the principal is a member of a role that has the specified
permission.
This stored procedure allows you to revoke the permission types described in the following table:
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Changes the description of an existing customized logging level. For more info about customized logging levels,
see Integration Services (SSIS) Logging.
Syntax
catalog.set_customized_logging_level_description [ @level_name = ] level_name
, [ @level_description = ] level_description
Arguments
[ @level_name = ] level_name
The name of an existing customized logging level.
The level_name is nvarchar(128) .
[ @level_description = ] level_description
The new description for the specified customized logging level.
The level_description is nvarchar(1024) .
Remarks
Return Codes
0 (success)
When the stored procedure fails, it throws an error.
Result Set
None
Permissions
This stored procedure requires one of the following permissions:
Membership in the ssis_admin database role
Membership in the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Changes the statistics or the events logged by an existing customized logging level. For more info about
customized logging levels, see Integration Services (SSIS) Logging.
Syntax
catalog.set_customized_logging_level_value [ @level_name = ] level_name
, [ @property_name = ] property_name
, [ @property_value = ] property_value
Arguments
[ @level_name = ] level_name
The name of an existing customized logging level.
The level_name is nvarchar(128) .
[ @property_name = ] property_name
The name of the property to change. Valid values are PROFILE and EVENTS .
The property_name is nvarchar(128) .
[ @property_value = ] property_value
The new value for the specified property of the specified customized logging level.
For a list of valid values for profile and events, see catalog.create_customized_logging_level.
The property_value is a bigint .
Remarks
Return Codes
0 (success)
When the stored procedure fails, it throws an error.
Result Set
None
Permissions
This stored procedure requires one of the following permissions:
Membership in the ssis_admin database role
Membership in the sysadmin server role
Errors and Warnings
The following list describes conditions that cause the stored procedure to fail.
The user does not have the required permissions.
catalog.set_environment_property (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Sets the property of an environment in the Integration Services catalog.
Syntax
catalog.set_environment_property [ @folder_name = ] folder_name
, [ @environment_name = ] environment_name
, [ @property_name = ] property_name
, [ @property_value = ] property_value
Arguments
[ @folder_name = ] folder_name
The name of the folder that contains the environment. The folder_name is nvarchar(128) .
[ @environment_name = ] environment_name
The name of the environment. The environment_name is nvarchar(128) .
[ @property_name = ] property_name
The name of an environment property. The property_name is nvarchar(128) .
[ @property_value = ] property_value
The value of the environment property. The property_value is nvarchar(1024) .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
Remarks
In this release, only the Description property can be set. The property value for the Description property cannot
exceed 4000 characters.
catalog.set_environment_reference_type (SSISDB
Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Sets the reference type and environment name associated with an existing environment reference for a project in
the Integration Services catalog.
Syntax
catalog.set_environment_reference_location [ @reference_id = reference_id
, [ @reference_type = ] reference_type
[ , [ @environment_folder_name = ] environment_folder_name ]
Arguments
[ @reference_id = ] reference_id
The unique identifier of the environment reference that is to be updated. The reference_id is bigint .
[ @reference_type = ] reference_type
Indicates whether the environment can be located in the same folder as the project (relative reference) or in a
different folder (absolute reference). Use the value R to indicate a relative reference. Use the value A to indicate
an absolute reference. The reference_type is char(1) .
[ @environment_folder_name = ] environment_folder_name
The folder in which the environment is located. This value is required for absolute references. The
environment_folder_name is nvarchar(128) .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the project, and READ permission on the environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
Remarks
A project can have relative or absolute environment references. Relative references refer to the environment by
name and require that it resides in the same folder as the project. Absolute references refer to the environment by
name and folder, and may refer to environments that reside in a different folder than the project. A project can
reference multiple environments.
IMPORTANT
If a relative reference is specified, the environment_folder_name parameter value is not used, and the environment folder
name is automatically set to NULL . If an absolute reference is specified, the environment folder name must be provided in
the environment_folder_name parameter.
catalog.set_environment_variable_property (SSISDB
Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Sets the property of an environment variable in the Integration Services catalog.
Syntax
catalog.set_environment_variable_property [ @folder_name = ] folder_name
, [ @environment_name = ] environment_name
, [ @variable_name = ] variable_name
, [ @property_name = ] property_name
, [ @property_value = ] property_value
Arguments
[ @folder_name = ] folder_name
The name of the folder that contains the environment. The folder_name is nvarchar(128) .
[ @environment_name = ] environment_name
The name of the environment. The environment_name is nvarchar(128) .
[ @variable_name = ] variable_name
The name of the environment variable. The variable_name is nvarchar(128) .
[ @property_name = ] property_name
The name of the environment variable property. The property_name is nvarchar(128) .
[ @property_value = ] property_value
The value of the environment variable property. The property_value is nvarchar(4000) .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
Errors and Warnings
The following list describes some conditions that may raise an error or warning:
The folder name is not valid
The environment name is not valid
The environment variable name is not valid
The environment variable property name is not valid
The user does not have the appropriate permissions
Remarks
In this release, only the Description property can be set. The property value for the Description property cannot
exceed 4000 characters.
catalog.set_environment_variable_protection (SSISDB
Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Sets the sensitivity bit of an environment variable in the Integration Services catalog.
Syntax
catalog.set_environment_variable_protection [ @folder_name = ] folder_name
, [ @environment_name = ] environment_name
, [ @variable_name = ] variable_name
, [ @sensitive = ] sensitive
Arguments
[ @folder_name = ] folder_name
The name of the folder that contains the environment. The folder_name is nvarchar(128) .
[ @environment_name = ] environment_name
The name of the environment. The environment_name is nvarchar(128) .
[ @variable_name = ] variable_name
The name of the environment variable. The variable_name is nvarchar(128) .
[ @sensitive = ] sensitive
Indicates whether the variable contains a sensitive value or not. Use a value of 1 to indicate that the value of the
environment variable is sensitive or a value of 0 to indicate that it is not. A sensitive value is encrypted when it is
stored. A value that is not sensitive is stored in plaintext. The sensitive parameter is bit .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
Errors and Warnings
The following list describes some conditions that may raise an error or warning:
The folder name is not valid
The environment name is not valid
The environment variable name is not valid
The user does not have the appropriate permissions
catalog.set_environment_variable_value (SSISDB
Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Sets the value of an environment variable in the Integration Services catalog.
Syntax
catalog.set_environment_variable_value [ @folder_name = ] folder_name
, [ @environment_name = ] environment_name
, [ @variable_name = ] variable _name
, [ @value = ] value
Arguments
[ @folder_name = ] folder_name
The name of the folder that contains the environment. The folder_name is nvarchar(128) .
[ @environment_name = ] environment_name
The name of the environment. The environment_name is nvarchar(128) .
[ @variable _name = ] variable _name
The name of the environment variable. The variable _name is nvarchar(128) .
[ @value = ] value
The value of the environment variable. The value is sql_variant .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Sets the value of a parameter for an instance of execution in the Integration Services catalog.
A parameter value cannot be changed after an instance of execution has started.
Syntax
catalog.set_execution_parameter_value [ @execution_id = execution_id
, [ @object_type = ] object_type
, [ @parameter_name = ] parameter_name
, [ @parameter_value = ] parameter_value
Arguments
[ @execution_id = ] execution_id
The unique identifier for the instance of execution. The execution_id is bigint .
[ @object_type = ] object_type
The type of parameter.
For the following parameters, set object_type to 50
LOGGING_LEVEL
CUSTOMIZED_LOGGING_LEVEL
DUMP_ON_ERROR
DUMP_ON_EVENT
DUMP_EVENT_CODE
CALLER_INFO
SYNCHRONIZED
Use the value 20 to indicate a project parameter or the value 30 to indicate a package parameter.
The object_type is smallint .
[ @parameter_name = ] parameter_name
The name of the parameter. The parameter_name is nvarchar(128) .
[ @parameter_value = ] parameter_value
The value of the parameter. The parameter_value is sql_variant .
Remarks
To find out the parameter values that were used for a given execution, query the
catalog.execution_parameter_values view.
To specify the scope of information that is logged during a package execution, set parameter_name to
LOGGING_LEVEL and set parameter_value to one of the following values.
Set the object_type parameter to 50.
VA L UE DESC RIP T IO N
0 None
1 Basic
2 Performance
3 Verbose
4 Runtime lineage
To specify that the Integration Services server generates dump files when any error occurs during a package
execution, set the following parameter values for an execution instance that hasn't run.
PA RA M ET ER VA L UE
object_type 50
parameter_name 'DUMP_ON_ERROR
parameter_value 1
To specify that the Integration Services server generates dump files when events occur during a package
execution, set the following parameter values for an execution instance that hasn't run.
PA RA M ET ER VA L UE
object_type 50
parameter_name 'DUMP_ON_EVENT
parameter_value 1
To specify the events during package execution that cause the Integration Services server to generate dump files,
set the following parameter values for an execution instance that hasn't run. Separate multiple event codes using
a semi-colon.
PA RA M ET ER VA L UE
object_type 50
parameter_name DUMP_EVENT_CODE
Examples
A. Generate dump files for errors
The following example specifies that the Integration Services server generates dump files when any error occurs
during a package execution.
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the instance of execution
Membership to the ssis_admin database role
Membership to the sysadmin server role
See Also
catalog.execution_parameter_values (SSISDB Database)
Generating Dump Files for Package Execution
catalog.set_execution_property_override_value
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Sets the value of a property for an instance of execution in the Integration Services catalog.
Syntax
catalog.set_execution_property_override_value [ @execution_id = execution_id
, [ @property_path = ] property_path
, [ @property_value = ] property_value
, [ @sensitive = ] sensitive
Arguments
[ @execution_id = ] execution_id
The unique identifier for the instance of execution. The execution_id is bigint .
[ @property_path = ] property_path
The path to the property in the package. The property_path is nvarchar(4000) .
[ @property_value = ] property_value
The override value to assign to the property. The property_value is nvarchar(max) .
[ @sensitive = ] sensitive
When the value is 1, the property is sensitive and is encrypted when it is stored. When the value is 0, the property
is not sensitive and the value is stored in plaintext. The sensitive argument is bit .
Remarks
This procedure performs the same function as the Proper ty overrides section in the Advanced tab of the
Execute Package dialog. The path to the property is derived from the Package Path property of the package
task.
Result Sets
None
See Also
catalog.set_execution_parameter_value (SSISDB Database)
catalog.set_folder_description (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Sets the description of a folder in the Integration Services catalog.
Syntax
catalog.set_folder_description [ @folder_name = ] folder_name
, [ @folder_description = ] folder_description
Arguments
[ @folder_name = ] folder_name
The name of the folder. The folder_name is nvarchar(128) .
[ @folder_description = ] folder_description
The description of the folder. The folder_description is nvarchar(MAX) .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Sets the value of a parameter in the Integration Services catalog. Associates the value to an environment variable
or assigns a literal value that is used by default when no other values are assigned.
Syntax
catalog.set_object_parameter_value [ @object_type = ] object_type
, [ @folder_name = ] folder_name
, [ @project_name = ] project_name
, [ @parameter_name = ] parameter_name
, [ @parameter_value = ] parameter_value
[ , [ @object_name = ] object_name ]
[ , [ @value_type = ] value_type ]
Arguments
[@object_type =] object_type
The type of parameter. Use the value 20 to indicate a project parameter or the value 30 to indicate a package
parameter. The object_type is smallInt .
[@folder_name =] folder_name
The name of the folder that contains the parameter. The folder_name is nvarchar(128) .
[@project_name =] project_name
The name of the project that contains the parameter. The project_name is nvarchar(128) .
[@parameter_name =] parameter_name
The name of the parameter. The parameter_name is nvarchar(128) .
[@parameter_value =] parameter_value
The value of the parameter. The parameter_value is sql_variant .
[@object_name =] object_name
The name of the package. This argument required when the parameter is a package parameter. The object_name is
nvarchar(260) .
[@value_type =] value_type
The type of parameter value. Use the character V to indicate that parameter_value is a literal value that is used by
default when no other values are assigned prior to execution. Use the character R to indicate that
parameter_value is a referenced value and has been set to the name of an environment variable. This argument is
optional, the character V is used by default. The value_type is char(1) .
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the project
Membership to the ssis_admin database role
Membership to the sysadmin server role
Remarks
If no value_type is specified, a literal value for parameter_value is used by default. When a literal value is
used, the value_set in the object_parameters view is set to 1 . A NULL parameter value is not allowed.
If value_type contains the character R , which denotes a referenced value, parameter_value refers to the
name of an environment variable.
The value 20 may be used for object_type to denote a project parameter. In this case, a value for
object_name is not necessary, and any value specified for object_name is ignored. This value is used when
the user wants to set a project parameter.
The value 30 may be used for object_type to denote a package parameter. In this case, a value for
object_name is used to denote the corresponding package. If object_name is not specified, the stored
procedure returns an error and terminates.
catalog.set_worker_agent_property (SSISDB
Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Sets the property of a Integration Services Scale Out Worker.
Syntax
catalog.set_worker_agent_property [ @WorkerAgentId = ] WorkerAgentId
, [ @PropertyName = ] PropertyName
, [ @PropertyValue = ] PropertyValue
Arguments
[@WorkerAgentId =] WorkerAgentId
The worker agent ID of Scale Out Worker. The WorkerAgentId is uniqueidentifier .
[@PropertyName =] PropertyName
The name of the property. The PropertyName is nvarchar(256) .
[@PropertyValue =] PropertyValue
The value of the property. The PropertyValue is nvarchar(max) .
Remarks
The valid property names are DisplayName , Description , Tags .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Performs maintenance of the state of operations for the SSISDB catalog.
The stored procedure fixes the status of any packages there were running if and when the SSIS server instance
goes down.
You have the option of enabling the stored procedure to run automatically each time the SSIS server instance is
restarted, by selecting the Enable automatic execution of Integration Ser vices stored procedure at SQL
Ser ver star tup option in the Create Catalog dialog box.
Syntax
catalog.startup
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the instance of execution, READ and EXECUTE permissions on the
project, and if applicable, READ permissions on the referenced environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
catalog.start_execution (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Starts an instance of execution in the Integration Services catalog.
Syntax
catalog.start_execution [ @execution_id = ] execution_id [, [ @retry_count = ] retry_count]
Arguments
[@execution_id =] execution_id
The unique identifier for the instance of execution. The execution_id is bigint .
[@retry_count =] retry_count
The retry count if the execution fails. It takes effect only if the execution is in Scale Out. This parameter is
optional. If not specified, its value is set to 0. The retry_count is int .
Remarks
An execution is used to specify the parameter values that is used by a package during a single instance of
package execution. After an instance of execution has been created, before it has been started, the corresponding
project might be redeployed. In this case, the instance of execution references a project that is outdated. This
invalid reference causes the stored procedure to fail.
NOTE
Executions can only be started once. To start an instance of execution, it must be in the created state (a value of 1 in the
status column of the catalog.operations view).
Example
The following example calls catalog.create_execution to create an instance of execution for the Child1.dtsx
package. Integration Services Project1 contains the package. The example calls
catalog.set_execution_parameter_value to set values for the Parameter1, Parameter2, and LOGGING_LEVEL
parameters. The example calls catalog.start_execution to start an instance of execution.
Declare @execution_id bigint
EXEC [SSISDB].[catalog].[create_execution] @package_name=N'Child1.dtsx', @execution_id=@execution_id OUTPUT,
@folder_name=N'TestDeply4', @project_name=N'Integration Services Project1', @use32bitruntime=False,
@reference_id=Null
Select @execution_id
DECLARE @var0 sql_variant = N'Child1.dtsx'
EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id, @object_type=20,
@parameter_name=N'Parameter1', @parameter_value=@var0
DECLARE @var1 sql_variant = N'Child2.dtsx'
EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id, @object_type=20,
@parameter_name=N'Parameter2', @parameter_value=@var1
DECLARE @var2 smallint = 1
EXEC [SSISDB].[catalog].[set_execution_parameter_value] @execution_id, @object_type=50,
@parameter_name=N'LOGGING_LEVEL', @parameter_value=@var2
EXEC [SSISDB].[catalog].[start_execution] @execution_id
GO
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the instance of execution, READ and EXECUTE permissions on the
project, and if applicable, READ permissions on the referenced environment
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Stops a validation or instance of execution in the Integration Services catalog.
Syntax
catalog.stop_operation [ @operation_id = ] operation_id
Arguments
[ @operation_id = ] operation_id
The unique identifier of the validation or instance of execution. The operation_id is bigint .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ and MODIFY permissions on the validation or instance of execution
Membership to the ssis_admin database role
Membership to the sysadmin server role
Remarks
Only one user at a time should stop an operation in Integration Services catalog. If multiple users try to stop the
operation, the stored procedure will return success (the value 0 ) on the first attempt, but subsequent attempts
will raise an error.
catalog.update_logdb_info (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server 2017 (14.x) and later
Update the Integration Services Scale Out Logging information.
Syntax
catalog.update_logdb_info [ @server_name = ] server_name, [ @connection_string = ] connection_string
Arguments
[ @server_name = ] server_name
The Sql Server used for Scale Out logging. The server_name is nvarchar .
[ @connection_string = ] connection_string
The connection string used for Scale Out logging. The connection_string is nvarchar .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
Membership to the ssis_admin database role
Membership to the sysadmin server role
catalog.update_master_address (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server 2017 (14.x) and later
Update the Integration Services Scale Out Master endpoint.
Syntax
catalog.update_master_address [ @MasterAddress = ] masterAddress
Arguments
[ @MasterAddress = ] masterAddress
The Scale Out Master endpoint. The masterAddress is nvarchar .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
Membership to the ssis_admin database role
Membership to the sysadmin server role
catalog.validate_package (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Asynchronously validates a package in the Integration Services catalog.
Syntax
catalog.validate_package [ @folder_name = ] folder_name
, [ @project_name = ] project_name
, [ @package_name = ] package_name
, [ @validation_id = ] validation_id OUTPUT
[ , [ @use32bitruntime = ] use32bitruntime ]
[ , [ @environment_scope = ] environment_scope ]
[ , [ @reference_id = ] reference_id ]
Arguments
[ @folder_name = ] folder_name
The name of the folder that contains the package. The folder_name is nvarchar(128) .
[ @project_name = ] project_name
The name of the project that contains the package. The project_name is nvarchar(128) .
[ @package_name = ] package_name
The name of the package. The package_name is nvarchar(260) .
[ @validation_id = ] validation_id
Returns the unique identifier (ID) of the validation. The validation_id is bigint .
[ @use32bitruntime = ] use32bitruntime
Indicates if the 32-bit runtime should be used to run the package on a 64-bit operating system. Use the value of 1
to execute the package with the 32-bit runtime when running on a 64-bit operating system. Use the value of 0 to
execute the package with the 64-bit runtime when running on a 64-bit operating system. This parameter is
optional. The use32bitruntime is bit .
[ @environment_scope = ] environment_scope
Indicates the environment references that are considered by the validation. When the value is A , all environment
references associated with the project are included in the validation. When the value is S , only a single
environment reference is included. When the value is D , no environment references are included and each
parameter must have a literal default value in order to pass validation. This parameter is optional. The character D
is used by default. The environment_scope is char(1) .
[ @reference_id = ] reference_id
The unique ID of the environment reference. This parameter is required only when a single environment reference
is included in the validation, when environment_scope is S . The reference_id is bigint .
Result Sets
None
Permissions
This stored procedure requires one of the following permissions:
READ permissions on the project and, if applicable, READ permissions on the referenced environments
Membership to the ssis_admin database role
Membership to the sysadmin server role
Remarks
Validation helps identify issues that may prevent the package from running successfully. Use the
catalog.validations or catalog.operations views to monitor for validation status.
catalog.validate_project (SSISDB Database)
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Asynchronously validates a project in the Integration Services catalog.
Syntax
catalog.validate_project [ @folder_name = ] folder_name
, [ @project_name = ] project_name
, [ @validate_type = ] validate_type
, [ @validation_id = ] validation_id OUTPUT
[ , [ @use32bitruntime = ] use32bitruntime ]
[ , [ @environment_scope = ] environment_scope ]
[ , [ @reference_id = ] reference_id ]
Arguments
[ @folder_name = ] folder_name
The name of a folder that contains the project. The folder_name is nvarchar(128) .
[ @project_name = ] project_name
The name of the project. The project_name is nvarchar(128) .
[ @validate_type = ] validate_type
Indicates the type of validation to perform. Use the character F to perform a full validation. This parameter is
optional, the character F will be used by default. The validate_type is char(1) .
[ @validation_id = ] validation_id
Returns the unique identifier (ID) of the validation. The validation_id is bigint .
[ @use32bitruntime = ] use32bitruntime
Indicates if the 32-bit runtime should be used to run the package on a 64-bit operating system. Use the value of 1
to execute the package with the 32-bit runtime when running on a 64-bit operating system. Use the value of 0 to
execute the package with the 64-bit runtime when running on a 64-bit operating system. This parameter is
optional. The use32bitruntime is bit .
[ @environment_scope = ] environment_scope
Indicates the environment references that are considered by the validation. When the value is A , all environment
references associated with the project are included in the validation. When the value is S , only a single
environment reference is included. When the value is D , no environment references are included and each
parameter must have a literal default value in order to pass validation. This parameter is optional, the character D
will be used by default. The environment_scope is char(1) .
[ @reference_id = ] reference_id
The unique ID of the environment reference. This parameter is required only when a single environment reference
is included in the validation, when environment_scope is S . The reference_id is bigint .
Result Sets
Output from the validation steps is returned as different sections of the result set.
Permissions
This stored procedure requires one of the following permissions:
READ permissions on the project and, if applicable, READ permissions on the referenced environments
Membership to the ssis_admin database role
Membership to the sysadmin server role
Remarks
Validation helps identify issues that will prevent the packages in the project from running successfully. Use the
catalog.validations or catalog.operations views to monitor for validation status.
Only environments that are accessible by the user can be used in the validation. Validation output is sent to the
client as a result set.
In this release, project validation does not support dependency validation.
Full validation confirms that all referenced environment variables are found within the referenced environments
that were included in the validation. Full validation results list environment references that are not valid and
referenced environment variables that could not be found in any of the referenced environments that were
included in the validation.
catalog.cleanup_server_execution_keys
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Drops certificates and symmetric keys from the SSISDB database.
Syntax
catalog.cleanup_server_execution_keys [ @cleanup_flag = ] cleanup_flag ,
[ @delete_batch_size = ] delete_batch_size
Arguments
[ @cleanup_flag = ] cleanup_flag
Indicates whether execution level (1) or project level (2) certificates and symmetric keys are to be dropped.
Use execution level (1) only when the SERVER_OPERATION_ENCRYPTION_LEVEL is set to PER_EXECUTION (1).
Use project level (2) only when the SERVER_OPERATION_ENCRYPTION_LEVEL is set to PER_PROJECT (2).
Certificates and symmetric keys are dropped only for projects that have been deleted and for which the operation
logs have been cleaned.
[ @delete_batch_size = ] delete_batch_size
The number of keys and certificates to be dropped. The default value is 1000.
Result Sets
None.
Permissions
This stored procedure requires one of the following permissions:
READ and EXECUTE permissions on the project and, if applicable, READ permissions on the referenced
environment.
Membership in the ssis_admin database role.
Membership to the sysadmin server role.
Remarks
SQL Server 2012 Service Pack 2 added the SERVER_OPERATION_ENCRYPTION_LEVEL property to the
internal.catalog_proper ties table. This property has two possible values:
PER_EXECUTION (1) - The certificate and symmetric key used for protecting sensitive execution
parameters and execution logs are created for each execution. This is the default value. You may run into
performance issues (deadlocks, failed maintenance jobs etc...) in a production environment because
certificate/keys are generated for each execution. However, this setting provides a higher level of security
than the other value (2).
PER_PROJECT (2) - The certificate and symmetric key used for protecting sensitive parameters are created
for each project. This gives you a better performance than the PER_EXECUTION level because the key and
certificate are generated once for a project rather than for each execution.
You have to run the catalog.cleanup_server_log stored procedure before you can change the
SERVER_OPERATION_ENCRYPTION_LEVEL from 1 to 2 (or) from 2 to 1. Before running this stored procedure, do
the following things:
1. Ensure that the value of the property OPERATION_CLEANUP_ENABLED is set to TRUE in the
catalog.catalog_properties (SSISDB Database) table.
2. Set the Integration Services database (SSISDB) to single-user mode. In SQL Server Management Studio,
launch Database Properties dialog box for SSISDB, switch to the Options tab, and set the Restrict Access
property to single-user mode (SINGLE_USER). After you run the cleanup_server_log stored procedure, set
the property value back to the original value.
3. Run the stored procedure catalog.cleanup_server_log.
4. Now, go ahead and change the value for the SERVER_OPERATION_ENCRYPTION_LEVEL property in the
catalog.catalog_properties (SSISDB Database) table.
5. Run the stored procedure catalog.cleanup_server_execution_keys to clean up certificates keys from the
SSISDB database. Dropping certificates and keys from the SSISDB database may take a long time, so it
should be run periodically during off-peak times.
You can specify the scope or level (execution vs. project) and number of keys to be deleted. The default batch
size for deletion is 1000. When you set the level to 2, the keys and certificates are deleted only if the
associated projects have been deleted.
For more info, see the following Knowledge Base article. FIX: Performance issues when you use SSISDB as your
deployment store in SQL Server 2012
Example
The following example calls the cleanup_server_execution_keys stored procedure.
USE [SSISDB]
GO
DECLARE@return_value int
EXEC@return_value = [internal].[cleanup_server_execution_keys]
@cleanup_flag = 1,
@delete_batch_size = 500
GO
catalog.cleanup_server_log
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Applies to: SQL Server (all supported versions)
Cleans up operation logs to bring the SSISDB database into a state that lets you change the value of the
SERVER_OPERATION_ENCRYPTION_LEVEL property.
Syntax
catalog.cleanup_server_log
Arguments
None.
Result Sets
None.
Permissions
This stored procedure requires one of the following permissions:
READ and EXECUTE permissions on the project and, if applicable, READ permissions on the referenced
environment.
Membership in the ssis_admin database role.
Membership to the sysadmin server role.
Remarks
SQL Server 2012 Service Pack 2 added the SERVER_OPERATION_ENCRYPTION_LEVEL property to the
internal.catalog_proper ties table. This property has two possible values:
PER_EXECUTION (1) - The certificate and symmetric key used for protecting sensitive execution
parameters and execution logs are created for each execution. You may run into performance issues
(deadlocks, failed maintenance jobs, etc.) in a production environment because certificate/keys are
generated for each execution. However, this setting provides a higher level of security than the other value
(2).
PER_PROJECT (2) - The certificate and symmetric key used for protecting sensitive parameters are
created for each project. PER_PROJECT (2) is the default value. This setting gives you a better performance
than the PER_EXECUTION level because the key and certificate are generated once for a project rather than
for each execution.
You have to run the catalog.cleanup_server_log stored procedure before you can change the
SERVER_OPERATION_ENCRYPTION_LEVEL from 2 to 1 or from 1 to 2. Before running this stored procedure, do
the following things:
1. Ensure that the value of the property OPERATION_CLEANUP_ENABLED is set to TRUE in the
catalog.catalog_properties (SSISDB Database) table.
2. Set the Integration Services database (SSISDB) to single-user mode. In SQL Server Management Studio,
launch Database Properties dialog box for SSISDB, switch to the Options tab, and set the Restrict Access
property to single-user mode (SINGLE_USER). After you run the cleanup_server_log stored procedure, set
the property value back to the original value.
3. Run the stored procedure catalog.cleanup_server_log.
4. Now, go ahead and change the value for the SERVER_OPERATION_ENCRYPTION_LEVEL property in the
catalog.catalog_properties (SSISDB Database) table.
5. Run the stored procedure catalog.cleanup_server_execution_keys to clean up certificates keys from the
SSISDB database. Dropping certificates and keys from the SSISDB database may take a long time, so it
should be run periodically during off-peak times.
You can specify the scope or level (execution vs. project) and number of keys to be deleted. The default
batch size for deletion is 1000. When you set the level to 2, the keys and certificates are deleted only if the
associated projects have been deleted.
For more info, see the following Knowledge Base article: FIX: Performance issues when you use SSISDB as your
deployment store in SQL Server 2012
Example
The following example calls the cleanup_server_log stored procedure.
USE [SSISDB]
GO
DECLARE@return_value int
EXEC@return_value = [internal].[cleanup_server_log]
SELECT'Return Value' = @return_value
GO
Functions - dm_execution_performance_counters
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Returns the performance statistics for an execution that is running on the Integration Services server.
Syntax
dm_execution_performance_counters [ @execution_id = ] execution_id
Arguments
[ @execution_id = ] execution_id
The unique identifier of the execution that contains one or more packages. Packages that are executed with the
Execute Package task, run in the same execution as the parent package.
If an execution ID is not specified, performance statistics for multiple executions are returned. If you are a member
of the ssis_admin database role, performance statistics for all running executions are returned. If you are not a
member of the ssis_admin database role, performance statistics for the running executions for which you have
read permissions, are returned. The execution_id is a BigInt .
Remarks
The following table lists the counter name values returned by the dm_execution_performance_counter function.
C O UN T ER N A M E DESC RIP T IO N
BLOB bytes read Number of bytes of binary large object (BLOB) data that the
data flow engine reads from all sources.
BLOB bytes written Number of bytes of BLOB data that the data flow engine
writes to all destinations.
BLOB files in use Number of BLOB files that the data flow engine is using for
spooling.
Buffers in use Number of buffer objects, of all types, that all data flow
components and the data flow engine are using.
Flat buffer memory Amount of memory, in bytes, that is used by all flat buffers.
Flat buffers are blocks of memory that a component uses to
store data.
C O UN T ER N A M E DESC RIP T IO N
Flat buffers in use Number of flat buffers that the data flow engine uses. All flat
buffers are private buffers.
Private buffer memory Amount of memory in use by all private buffers. A private
buffer is a buffer that a transformation uses for temporary
work.
Private buffers in use Number of buffers that the transformations use for temporary
work.
Return
The dm_execution_performance_counters function returns a table with the following columns, for a running
execution. The information returned is for all of the packages contained in the execution. If there are no running
executions, an empty table is returned.
counter_name nvarchar(128) The name of the counter. See the Remarks section of
values.
Examples
A. Return statistics for a running execution
In the following example, the function returns statistics for a running execution with an ID of 34.
Permissions
This function requires one of the following permissions:
READ and MODIFY permissions on the instance of execution
Membership to the ssis_admin database role
Membership to the sysadmin server role
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This section of the documentation contains information about several errors and events related to Integration
Services. Cause and resolution information is included for error messages.
For more information about Integration Services error messages, including a list of most Integration Services
errors and their descriptions, see Integration Services Error and Message Reference. However, the list currently does
not include troubleshooting information.
IMPORTANT
Many of the error messages that you may see when you are working with Integration Services come from other components.
These may include OLE DB providers, other database components such as the Database Engine and Analysis Services , or
other services or components such as the file system, the SMTP server, or Microsoft Message Queueing. To find information
about these external error messages, see the documentation specific to the component.
Error Messages
SY M B O L IC N A M E O F ERRO R DESC RIP T IO N
DTS_E_CONNECTIONNOTFOUND Indicates that the package cannot run because the specified
connection manager cannot be found.
DTS_E_UNPROTECTXMLFAILED Indicates that the system did not decrypt a protected XML
node.
DTS_W_EXTERNALMETADATACOLUMNSOUTOFSYNC Indicates that the column metadata in the data source does
not match the column metadata in the source or destination
component that is connected to the data source.
Events (SQLISPackage)
For more information, see Events Logged by an Integration Services Package.
SQLISPACKAGE_12291 Indicates that a package was unable to finish running and has
stopped.
SQLISPackage_12551 Indicates that a package did not finish its work and stopped.
Events (SQLISService)
For more information, see Events Logged by the Integration Services Service.
EVEN T DESC RIP T IO N
SQLISService_260 Indicates that the service tried to start, but could not.
SQLISService_272 Indicates that the configuration file does not exist at the
specified location.
SQLISService_273 Indicates that the configuration file could not be read or is not
valid.
SQLISService_274 Indicates that the registry entry that contains the location of
the configuration file does not exist or is empty.
See Also
Integration Services Error and Message Reference
Integration Services Error and Message Reference
11/2/2020 • 218 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The following tables list predefined Integration Services errors, warnings, and informational messages, in
ascending numerical order within each category, along with their numeric codes and symbolic names. Each of
these errors is defined as a field in the Microsoft.SqlServer.Dts.Runtime.Hresults class in the
Microsoft.SqlServer.Dts.Runtime namespace.
This list may be useful when you encounter an error code without its description. The list does not include
troubleshooting information at this time.
This list contains the following groups of messages:
Error Messages (DTS_E_*)
Warning Messages (DTS_W_*)
Informational Messages(DTS_I_*)
General and Event Messages(DTS_MSG_*)
Success Messages(DTS_S_*)
Data Flow Component Error Messages (DTSBC_E_*)
IMPORTANT
Many of the error messages that you may see while working with Integration Services come from other components.
In this topic, you will find all the errors raised by Integration Services components. If you do not see your error in the
list, the error was raised by a component outside Integration Services. These may include OLE DB providers, other
database components such as the Database Engine and Analysis Services, or other services or components such as the
file system, the SMTP server, Message Queuing (also known as MSMQ), and so forth. To find information about these
external error messages, see the documentation specific to the component.
Error Messages
The symbolic names of Integration Services error messages begin with DTS_E_ .
%2.
H EXA DEC IM A L C O DE DEC IM A L C O DE SY M B O L IC N A M E DESC RIP T IO N
Warning Messages
The symbolic names of Integration Services warning messages begin with DTS_W_ .
Informational Messages
The symbolic names of Integration Services informational messages begin with DTS_I_ .
Server version %1
Server version %1
Error: %1
Error: %1
Package ID: %2
Package name: %3
Package description: %4
Operator: %2
Source Name: %3
Source ID: %4
Execution ID: %5
Start Time: %6
End Time: %7
Data Code: %8
H EXA DEC IM A L C O DE DEC IM A L C O DE SY M B O L IC N A M E DESC RIP T IO N
Operator: %2
Source Name: %3
Source ID: %4
Execution ID: %5
Start Time: %6
End Time: %7
Data Code: %8
Operator: %2
Source Name: %3
Source ID: %4
Execution ID: %5
Start Time: %6
End Time: %7
Data Code: %8
Operator: %2
Source Name: %3
Source ID: %4
Execution ID: %5
Start Time: %6
End Time: %7
Data Code: %8
H EXA DEC IM A L C O DE DEC IM A L C O DE SY M B O L IC N A M E DESC RIP T IO N
Operator: %2
Source Name: %3
Source ID: %4
Execution ID: %5
Start Time: %6
End Time: %7
Data Code: %8
Operator: %2
Source Name: %3
Source ID: %4
Execution ID: %5
Start Time: %6
End Time: %7
Data Code: %8
Operator: %2
Source Name: %3
Source ID: %4
Execution ID: %5
Start Time: %6
End Time: %7
Data Code: %8
H EXA DEC IM A L C O DE DEC IM A L C O DE SY M B O L IC N A M E DESC RIP T IO N
Operator: %2
Source Name: %3
Source ID: %4
Execution ID: %5
Start Time: %6
End Time: %7
Data Code: %8
Operator: %2
Source Name: %3
Source ID: %4
Execution ID: %5
Start Time: %6
End Time: %7
Data Code: %8
Operator: %2
Source Name: %3
Source ID: %4
Execution ID: %5
Start Time: %6
End Time: %7
Data Code: %8
H EXA DEC IM A L C O DE DEC IM A L C O DE SY M B O L IC N A M E DESC RIP T IO N
Operator: %2
Source Name: %3
Source ID: %4
Execution ID: %5
Start Time: %6
End Time: %7
Data Code: %8
Operator: %2
Source Name: %3
Source ID: %4
Execution ID: %5
Start Time: %6
End Time: %7
Data Code: %8
Operator: %2
Source Name: %3
Source ID: %4
Execution ID: %5
Start Time: %6
End Time: %7
Data Code: %8
H EXA DEC IM A L C O DE DEC IM A L C O DE SY M B O L IC N A M E DESC RIP T IO N
Operator: %2
Source Name: %3
Source ID: %4
Execution ID: %5
Start Time: %6
End Time: %7
Data Code: %8
Operator: %2
Source Name: %3
Source ID: %4
Execution ID: %5
Start Time: %6
End Time: %7
Data Code: %8
Success Messages
The symbolic names of Integration Services success messages begin with DTS_S_ .
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SQL Server Integration Services has an architecture that separates data movement and transformation from
package control flow and management. There are two distinct engines that define this architecture and that can be
automated and extended when programming Integration Services. The run-time engine implements the control
flow and package management infrastructure that lets developers control the flow of execution and set options for
logging, event handlers, and variables. The data flow engine is a specialized, high performance engine that is
exclusively dedicated to extracting, transforming, and loading data. When programming Integration Services, you
will be programming against these two engines.
The following image depicts the architecture of Integration Services.
Supported Languages
Integration Services fully supports the Microsoft .NET Framework. This lets developers program Integration
Services in their choice of .NET-compliant languages. Although both the run-time engine and the data flow engine
are written in native code, they are both available through a fully managed object model.
You can program Integration Services packages, custom tasks, and components in Microsoft Visual Studio or in
another code or text editor. Visual Studio offers the developer many tools and features to simplify and accelerate
the iterative cycles of coding, debugging, and testing. Visual Studio also makes deployment easier. However, you do
not need Visual Studio to compile and build Integration Services code projects. The .NET Framework SDK includes
the Visual Basic and Visual C# compilers and related tools.
IMPORTANT
By default, the .NET Framework is installed with SQL Server, but the .NET Framework SDK is not. Unless the SDK is installed
on the computer and the SDK documentation is included in the Books Online collection, links to SDK content in this section
will not work. After you have installed the .NET Framework SDK, you can add the SDK documentation to the Books Online
collection and table of contents by following the instructions in Add or Remove Product Documentation for SQL Server.
The Integration Services Script task and Script component use Microsoft Visual Studio Tools for Applications (VSTA)
as an embedded scripting environment. VSTA supports Microsoft Visual Basic and Microsoft Visual C#.
NOTE
The Integration Services application programming interfaces are incompatible with COM-based scripting languages such as
VBScript.
Locating Assemblies
In SQL Server 2019 (15.x), the Integration Services assemblies were upgraded to .NET 4.0. There is a separate
global assembly cache for .NET 4, located in <drive>:\Windows\Microsoft.NET\assembly. You can find all of the
Integration Services assemblies under this path, usually in the GAC_MSIL folder.
As in previous versions of SQL Server, the core Integration Services extensibility .dll files are also located at
<drive>:\Program Files\Microsoft SQL Server\100\SDK\Assemblies.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
To understand the difference between a synchronous and an asynchronous transformation in Integration Services,
it is easiest to start with an understanding of a synchronous transformation. If a synchronous transformation does
not meet your needs, your design might require an asynchronous transformation.
Synchronous Transformations
A synchronous transformation processes incoming rows and passes them on in the data flow one row at a time.
Output is synchronous with input, meaning that it occurs at the same time. Therefore, to process a given row, the
transformation does not need information about other rows in the data set. In the actual implementation, rows are
grouped into buffers as they pass from one component to the next, but these buffers are transparent to the user,
and you can assume that each row is processed separately.
An example of a synchronous transformation is the Data Conversion transformation. For each incoming row, it
converts the value in the specified column and sends the row on its way. Each discrete conversion operation is
independent of all the other rows in the data set.
In Integration Services scripting and programming, you specify a synchronous transformation by looking up the
ID of a component's input and assigning it to the SynchronousInputID property of the component's outputs.
This tells the data flow engine to process each row from the input and send each row automatically to the
specified outputs. If you want every row to go to every output, you do not have to write any additional code to
output the data. If you use the ExclusionGroup property to specify that rows should only go to one or another of
a group of outputs, as in the Conditional Split transformation, you must call the DirectRow method to select the
appropriate destination for each row. When you have an error output, you must call DirectErrorRow to send
rows with problems to the error output instead of the default output.
Asynchronous Transformations
You might decide that your design requires an asynchronous transformation when it is not possible to process
each row independently of all other rows. In other words, you cannot pass each row along in the data flow as it is
processed, but instead must output data asynchronously, or at a different time, than the input. For example, the
following scenarios require an asynchronous transformation:
The component has to acquire multiple buffers of data before it can perform its processing. An example is
the Sort transformation, where the component has to process the complete set of rows in a single
operation.
The component has to combine rows from multiple inputs. An example is the Merge transformation, where
the component has to examine multiple rows from each input and then merge them in sorted order.
There is no one-to-one correspondence between input rows and output rows. An example is the Aggregate
transformation, where the component has to add a row to the output to hold the computed aggregate
values.
In Integration Services scripting and programming, you specify an asynchronous transformation by assigning a
value of 0 to the SynchronousInputID property of the component's outputs. . This tells the data flow engine not
to send each row automatically to the outputs. Then you must write code to send each row explicitly to the
appropriate output by adding it to the new output buffer that is created for the output of an asynchronous
transformation.
NOTE
Since a source component must also explicitly add each row that it reads from the data source to its output buffers, a
source resembles a transformation with asynchronous outputs.
It would also be possible to create an asynchronous transformation that emulates a synchronous transformation
by explicitly copying each input row to the output. By using this approach, you could rename columns or convert
data types or formats. However this approach degrades performance. You can achieve the same results with better
performance by using built-in Integration Services components, such as Copy Column or Data Conversion.
See Also
Creating a Synchronous Transformation with the Script Component
Creating an Asynchronous Transformation with the Script Component
Developing a Custom Transformation Component with Synchronous Outputs
Developing a Custom Transformation Component with Asynchronous Outputs
Working with Connection Managers Programmatically
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In Integration Services, the AcquireConnection method of the associated connection manager class is the method that you call most
often when you are working with connection managers in managed code. When you write managed code, you have to call the
AcquireConnection method to use the functionality of a connection manager. You have to call this method regardless of whether you
are writing managed code in a Script task, Script component, custom object, or custom application.
To call the AcquireConnection method successfully, you have to know the answers to the following questions:
Which connection managers return a managed object from the AcquireConnection method?
Many connection managers return unmanaged COM objects (System.__ComObject) and these objects cannot easily be used
from managed code. The list of these connection managers includes the frequently used OLE DB connection manager.
For those connection managers that return a managed object, what objects do their AcquireConnection methods
return?
To cast the return value to the appropriate type, you have to know what type of object the AcquireConnection method returns.
For example, the AcquireConnection method for the ADO.NET connection manager returns an open SqlConnection object when
you use the SqlClient provider. However, the AcquireConnection method for the File connection manager just returns a string.
This topic answers these questions for the connection managers that are included with Integration Services.
C O N N EC T IO N M A N A GER T Y P E C O N N EC T IO N M A N A GER N A M E
Typically, you can use an ADO.NET connection manager from managed code to connect to an ADO, Excel, ODBC, or OLE DB data source.
MULTIFLATFILE Multiple Flat Files Connection System.String Path to one of the files.
Manager
See Also
Connecting to Data Sources in the Script Task
Connecting to Data Sources in the Script Component
Connecting to Data Sources in a Custom Task
Extending Packages with Scripting
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
If you find that the built-in components Integration Services do not meet your requirements, you can extend the
power of Integration Services by coding your own extensions. You have two discrete options for extending your
packages: you can write code within the powerful wrappers provided by the Script task and the Script component,
or you can create custom Integration Services extensions from scratch by deriving from the base classes provided
by the Integration Services object model.
This section explores the simpler of the two options - extending packages with scripting.
The Script task and the Script component let you extend both the control flow and the data flow of an Integration
Services package with very little coding. Both objects use the Microsoft Visual Studio Tools for Applications (VSTA)
development environment and the Microsoft Visual Basic or Microsoft Visual C# programming languages, and
benefit from all the functionality offered by the Microsoft .NET Framework class library, as well as custom
assemblies. The Script task and the Script component let the developer create custom functionality without having
to write all the infrastructure code that is typically required when developing a custom task or custom data flow
component.
In This Section
Comparing the Script Task and the Script Component
Discusses the similarities and differences between the Script task and the Script component.
Comparing Scripting Solutions and Custom Objects
Discusses the criteria to use in choosing between a scripting solution and the development of a custom object.
Referencing Other Assemblies in Scripting Solutions
Discusses the steps required to reference and use external assemblies and namespaces in a scripting project.
Extending the Package with the Script Task
Discusses how to create custom tasks by using the Script task. A task is typically called one time per package
execution, or one time for each data source opened by a package.
Extending the Data Flow with the Script Component
Discusses how to create custom data flow sources, transformations, and destinations by using the Script
component. A data flow component is typically called one time for each row of data that is processed.
Reference
Integration Services Error and Message Reference
Lists the predefined Integration Services error codes with their symbolic names and descriptions.
Related Sections
Extending Packages with Custom Objects
Discusses how to create program custom tasks, data flow components, and other package objects for use in
multiple packages.
Building Packages Programmatically
Describes how to create, configure, run, load, save, and manage Integration Services packages programmatically.
See Also
SQL Server Integration Services
Comparing the Script Task and the Script Component
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Script task, available in the Control Flow window of the Integration Services designer, and the Script
component, available in the Data Flow window, have very different purposes in an Integration Services package.
The task is a general-purpose control flow tool, whereas the component serves as a source, transformation, or
destination in the data flow. Despite their different purposes, however, the Script task and the Script component
have some similarities in the coding tools that they use and the objects in the package that they make available to
the developer. Understanding their similarities and differences may help you to use both the task and the
component more effectively.
Two design-time modes In both the task and the component, you begin by specifying
properties in the editor, and then switch to the development
environment to write code.
Microsoft Visual Studio Tools for Applications (VSTA) Both the task and the component use the same VSTA IDE,
and support code written in either Microsoft Visual Basic or
Microsoft Visual C#.
Precompiled scripts Beginning in SQL Server 2008 Integration Services (SSIS), all
scripts are precompiled. In earlier versions, you could specify
whether scripts were precompiled.
Debugging Both the task and the component support breakpoints and
stepping through code while debugging in the design
environment. For more information, see Coding and
Debugging the Script Task and Coding and Debugging the
Script Component.
Control flow / Data flow The Script task is configured on the The Script component is configured on
Control Flow tab of the designer and the Data Flow page of the designer and
runs outside the data flow of the represents a source, transformation, or
package. destination in the Data Flow task.
F EAT URE SC RIP T TA SK SC RIP T C O M P O N EN T
Purpose A Script task can accomplish almost any You must specify whether you want to
general-purpose task. create a source, transformation, or
destination with the Script component.
Execution A Script task runs custom code at some A Script component also runs once, but
point in the package workflow. Unless typically it runs its main processing
you put it in a loop container or an routine once for each row of data in the
event handler, it only runs once. data flow.
Editor The Script Task Editor has three The Script Transformation Editor
pages: General, Script , and has up to four pages: Input Columns ,
Expressions . Only the Inputs and Outputs , Script , and
ReadOnlyVariables and Connection Managers . The metadata
ReadWriteVariables , and and properties that you configure on
ScriptLanguage properties directly each of these pages determines the
affect the code that you can write. members of the base classes that are
autogenerated for your use in coding.
Interaction with the package In the code written for a Script task, In Script component code, you use
you use the Dts property to access typed accessor properties to access
other features of the package. The Dts certain package features such as
property is a member of the variables and connection managers.
ScriptMain class.
The PreExecute method can access
only read-only variables. The
PostExecute method can access both
read-only and read/write variables.
Using variables The Script task uses the Variables The Script component uses typed
property of the Dts object to access accessor properties of the
variables that are available through the autogenerated based class, created
task's ReadOnlyVariables and from the component's
ReadWriteVariables properties. For ReadOnlyVariables and
example: ReadWriteVariables properties. For
example:
[Visual Basic]
[Visual Basic]
Dim myVar as String
myVar = Dim myVar as String
Dts.Variables("MyStringVariable").Value.ToString
myVar =
Me.Variables.MyStringVariable
[C#]
[C#]
string myVar;
myVar = string myVar;
Dts.Variables["MyStringVariable"].Value.ToString();
myVar =
this.Variables.MyStringVariable;
F EAT URE SC RIP T TA SK SC RIP T C O M P O N EN T
Using connections The Script task uses the Connections The Script component uses typed
property of the Dts object to access accessor properties of the
connection managers defined in the autogenerated base class, created from
package. For example: the list of connection managers entered
by the user on the Connection
[Visual Basic] Managers page of the editor. For
example:
Dim myFlatFileConnection As
String [Visual Basic]
myFlatFileConnection = _
DirectCast(Dts.Connections("Test Flat File
Dim connMgr As
Connection").AcquireConnection(Dts.Transaction),
IDTSConnectionManager100
_ String)
connMgr =
Me.Connections.MyADONETConnection
[C#]
[C#]
string myFlatFileConnection;
myFlatFileConnection = (Dts.Connections["Test
IDTSConnectionManager100 connMgr;
Flat File
Connection"].AcquireConnection(Dts.Transaction)
connMgr =
as String); this.Connections.MyADONETConnection;
Raising events The Script task uses the Events The Script component raises errors,
property of the Dts object to raise warnings, and informational messages
events. For example: by using the methods of the
IDTSComponentMetaData100 interface
[Visual Basic] returned by the ComponentMetaData
property. For example:
Dts.Events.FireError(0, "Event
Snippet", _ ex.Message & [Visual Basic]
ControlChars.CrLf &
ex.StackTrace, _ "", 0)
Dim myMetadata as
IDTSComponentMetaData100
[C#] myMetaData = Me.ComponentMetaData
myMetaData.FireError(...)
Dts.Events.FireError(0, "Event
Snippet", ex.Message + "\r" +
ex.StackTrace, "", 0);
Logging The Script task uses the Log method of The Script component uses the Log
the Dts object to log information to method of the autogenerated base
enabled log providers. For example: class to log information to enabled log
providers. For example:
[Visual Basic]
[Visual Basic]
Dim bt(0) As Byte Dts.Log("Test
Log Event", _ 0, _ bt) Dim bt(0) As Byte
[C#]
Returning results The Script task uses both the TaskResult The Script component runs as a part of
property and the optional the Data Flow task and does not report
ExecutionValue property of the Dts results using either of these properties.
object to notify the runtime of its
results.
See Also
Extending the Package with the Script Task
Extending the Data Flow with the Script Component
Comparing Scripting Solutions and Custom Objects
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
An Integration Services Script task or Script component can implement much of the same functionality that is
possible in a custom managed task or data flow component. Here are some considerations to help you choose the
appropriate type of task for your needs:
If the configuration or functionality is specific to an individual package, you should use the Script task or the
Script component instead of a developing a custom object.
If the functionality is generic, and might be used in the future for other packages and by other developers,
you should create a custom object instead of using a scripting solution. You can use a custom object in any
package, whereas a script can be used only in the package for which it was created.
If the code will be reused within the same package, you should consider creating a custom object. Copying
code from one Script task or component to another leads to reduced maintainability by making it more
difficult to maintain and update multiple copies of the code.
If the implementation will change over time, consider using a custom object. Custom objects can be
developed and deployed separately from the parent package, whereas an update made to a scripting
solution requires the redeployment of the whole package.
See Also
Extending Packages with Custom Objects
Referencing Other Assemblies in Scripting Solutions
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Microsoft .NET Framework class library provides the script developer with a powerful set of tools for
implementing custom functionality in Integration Services packages. The Script task and the Script component can
also use custom managed assemblies.
NOTE
To enable your packages to use the objects and methods from a Web service, use the Add Web Reference command
available in MicrosoftVisual Studio Tools for Applications (VSTA). In earlier versions of Integration Services, you had to
generate a proxy class to use a Web service.
NOTE
In earlier versions of Integration Services, you could only add a reference to a managed assembly that was stored in
the %windir%\Microsoft.NET\Framework\vx.x.xxxxx folder or the %ProgramFiles%\Microsoft SQL
Server\100\SDK\Assemblies folder.
See Also
Extending Packages with Scripting
Debug a Script by Setting Breakpoints in a Script Task
and Script Component
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This procedure describes how to set breakpoints in the scripts that are used in the Script task and Script
component.
After you set breakpoints in the script, the Set Breakpoints - <object name> dialog box lists the breakpoints,
along with the built-in breakpoints.
IMPORTANT
Under certain circumstances, breakpoints in the Script task and Script component are ignored. For more information, see the
Debugging the Script Task section in Coding and Debugging the Script Task and the Debugging the Script
Component section in Coding and Debugging the Script Component.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Script task extends the run-time capabilities of Microsoft Integration Services packages with custom code
written in Microsoft Visual Basic or Microsoft Visual C# that is compiled and executed at package run time. The
Script task simplifies the development of a custom run-time task when the tasks included with Integration
Services do not fully satisfy your requirements. The Script task writes all the required infrastructure code for you,
letting you focus exclusively on the code that is required for your custom processing.
A Script task interacts with the containing package through the global Dts object, an instance of the
ScriptObjectModel class that is exposed in the scripting environment. You can write code in a Script task that
modifies the values stored in Integration Services variables; later, the package can use those updated values to
determine the path of its workflow. The Script task can also use the Visual Basic namespace and the .NET
Framework class library, as well as custom assemblies, to implement custom functionality.
The Script task and the infrastructure code that it generates for you simplify significantly the process of
developing a custom task. However, to understand how the Script task works, you may find it useful to read the
section Developing a Custom Task to understand the steps that are involved in developing a custom task.
If you are creating a task that you plan to reuse in multiple packages, you should consider developing a custom
task instead of using the Script task. For more information, see Comparing Scripting Solutions and Custom
Objects.
In This Section
The following topics provide more information about the Script task.
Configuring the Script Task in the Script Task Editor
Explains how the properties that you configure in the Script Task Editor affect the capabilities and the
performance of the code in the Script task.
Coding and Debugging the Script Task
Explains how to use Microsoft Visual Studio Tools for Applications (VSTA) to develop the scripts that are contained
in the Script task.
Using Variables in the Script Task
Explains how to use variables through the Variables property.
Connecting to Data Sources in the Script Task
Explains how to use connections through the Connections property.
Raising Events in the Script Task
Explains how to raise events through the Events property.
Logging in the Script Task
Explains how to log information through the Log method.
Returning Results from the Script Task
Explains how to return results through the property TaskResult and the ExecutionValue property.
Script Task Examples
Provides simple examples that demonstrate several possible uses for a Script task.
See Also
Script Task
Comparing the Script Task and the Script Component
Configuring the Script Task in the Script Task Editor
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Before you write custom code in the Script task, you configure its principal properties in the three pages of the
Script Task Editor . You can configure additional task properties that are not unique to the Script task by using
the Properties window.
NOTE
Unlike earlier versions where you could indicate whether scripts were precompiled, all scripts are precompiled beginning in
SQL Server 2008 Integration Services (SSIS).
NOTE
Variable names are case-sensitive.
To select the variables, click the ellipsis (...) button next to the property field. For more information, see Select
Variables Page.
Edit Script Button
The Edit Script button launches the VSTA development environment in which you write your custom script. For
more information, see Coding and Debugging the Script Task.
See Also
Coding and Debugging the Script Task
Coding and Debugging the Script Task
11/2/2020 • 8 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
After configuring the Script task in the Script Task Editor , you write your custom code in the Script task
development environment.
NOTE
When you design the package and debug the script, the script code is temporarily written to a project file. Because storing
sensitive information in a file is a potential security risk, we recommend that you do not include sensitive information such
as passwords in the script code.
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime.VSTAProxy
End Sub
Enum ScriptResults
Success = DTSExecResult.Success
Failure = DTSExecResult.Failure
End Enum
' The execution engine calls this method when the task executes.
' To access the object model, use the Dts property. Connections, variables, events,
' and logging features are available as members of the Dts property as shown in the following examples.
'
' To reference a variable, call Dts.Variables("MyCaseSensitiveVariableName").Value
' To post a log entry, call Dts.Log("This is my log text", 999, Nothing)
' To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, True)
'
' To use the connections collection use something like the following:
' ConnectionManager cm = Dts.Connections.Add("OLEDB")
' cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated
Security=SSPI;Auto Translate=False;"
'
' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
'
' To open Help, press F1.
End Class
/*
Microsoft SQL Server Integration Services Script Task
Write scripts using Microsoft Visual C# 2008.
The ScriptMain is the entry point class of the script.
*/
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime.VSTAProxy;
using System.Windows.Forms;
namespace ST_1bcfdbad36d94f8ba9f23a10375abe53.csproj
{
[System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
public partial class ScriptMain
{
private void ScriptMain_Startup(object sender, EventArgs e)
{
#endregion
/*
The execution engine calls this method when the task executes.
To access the object model, use the Dts property. Connections, variables, events,
and logging features are available as members of the Dts property as shown in the following examples.
Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
NOTE
You can view project references in the VSTA IDE in Class View or in Project Explorer . You open either of these windows
from the View menu. You can add a new reference from the Project menu, from Project Explorer , or from Class View .
M EM B ER P URP O SE
Events Provides an events interface to let the Script task raise errors,
warnings, and informational messages.
M EM B ER DESC RIP T IO N
WARNING
You cannot debug the Script task when you run the package in 64-bit mode.
NOTE
You must execute the package to debug into your Script task. If you execute only the individual task, breakpoints in the
Script task code are ignored.
NOTE
You cannot debug a Script task when you run the Script task as part of a child package that is run from an Execute Package
task. Breakpoints that you set in the Script task in the child package are disregarded in these circumstances. You can debug
the child package normally by running it separately.
NOTE
When you debug a package that contains multiple Script tasks, the debugger debugs one Script task. The system can
debug another Script task if the debugger completes, as in the case of a Foreach Loop or For Loop container.
External Resources
Blog entry, VSTA setup and configuration troubles for SSIS 2008 and R2 installations, on blogs.msdn.com.
See Also
Referencing Other Assemblies in Scripting Solutions
Configuring the Script Task in the Script Task Editor
Using Variables in the Script Task
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Variables make it possible for the Script task to exchange data with other objects in the package. For more
information, see Integration Services (SSIS) Variables.
The Script task uses the Variables property of the Dts object to read from and write to Variable objects in the
package.
NOTE
The Value property of the Variable class is of type Object . Because the Script task has Option Strict enabled, you must
cast the Value property to the appropriate type before you can use it.
You add existing variables to the ReadOnlyVariables and ReadWriteVariables lists in the Script Task Editor to
make them available to the custom script. Keep in mind that variable names are case-sensitive. Within the script,
you access variables of both types through the Variables property of the Dts object. Use the Value property to
read from and write to individual variables. The Script task transparently manages locking as the script reads and
modifies the values of variables.
You can use the Contains method of the Variables collection returned by the Variables property to check for the
existence of a variable before using it in your code.
You can also use the VariableDispenser property (Dts.VariableDispenser) to work with variables in the Script task.
When using the VariableDispenser, you must handle both the locking semantics and the casting of data types for
variable values in your own code. You may need to use the VariableDispenser property instead of the Variables
property if you want to work with a variable that is not available at design time but is created programmatically at
run time.
Variables Example
The following example demonstrates how to access and use variables in a Script task to determine the path of
package workflow. The sample assumes that you have created integer variables named CustomerCount and
MaxRecordCount and added them to the ReadOnlyVariables collection in the Script Task Editor . The
CustomerCount variable contains the number of customer records to be imported. If its value is greater than the
value of MaxRecordCount , the Script task reports failure. When a failure occurs because the MaxRecordCount
threshold has been exceeded, the error path of the workflow can implement any required clean-up.
To successfully compile the sample, you need to add a reference to the Microsoft.SqlServer.ScriptTask assembly.
customerCount = _
CType(Dts.Variables("CustomerCount").Value, Integer)
maxRecordCount = _
CType(Dts.Variables("MaxRecordCount").Value, Integer)
End If
End Sub
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
if (Dts.Variables.Contains("CustomerCount")==true&&Dts.Variables.Contains("MaxRecordCount")==true)
{
customerCount = (int) Dts.Variables["CustomerCount"].Value;
maxRecordCount = (int) Dts.Variables["MaxRecordCount"].Value;
if (customerCount>maxRecordCount)
{
Dts.TaskResult = (int)ScriptResults.Failure;
}
else
{
Dts.TaskResult = (int)ScriptResults.Success;
}
See Also
Integration Services (SSIS) Variables
Use Variables in Packages
Connecting to Data Sources in the Script Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Connection managers provide access to data sources that have been configured in the package. For more
information, see Integration Services (SSIS) Connections.
The Script task can access these connection managers through the Connections property of the Dts object. Each
connection manager in the Connections collection stores information about how to connect to the underlying data
source.
When you call the AcquireConnection method of a connection manager, the connection manager connects to the
data source, if it is not already connected, and returns the appropriate connection or connection information for
you to use in your Script task code.
NOTE
You must know the type of connection returned by the connection manager before calling AcquireConnection . Because
the Script task has Option Strict enabled, you must cast the connection, which is returned as type Object , to the
appropriate connection type before you can use it.
You can use the Contains method of the Connections collection returned by the Connections property to look for
an existing connection before using the connection in your code.
IMPORTANT
You cannot call the AcquireConnection method of connection managers that return unmanaged objects, such as the OLE DB
connection manager and the Excel connection manager, in the managed code of a Script task. However, you can read the
ConnectionString property of these connection managers, and connect to the data source directly in your code by using the
connection string with an OledbConnection from the System.Data.OleDb namespace.
If you must call the AcquireConnection method of a connection manager that returns an unmanaged object, use an
ADO.NET connection manager. When you configure the ADO.NET connection manager to use an OLE DB provider, it
connects by using the .NET Framework Data Provider for OLE DB. In this case, the AcquireConnection method returns a
System.Data.OleDb.OleDbConnection instead of an unmanaged object. To configure an ADO.NET connection manager
for use with an Excel data source, select the Microsoft OLE DB Provider for Jet, specify an Excel file, and enter Excel 8.0
(for Excel 97 and later) as the value of Extended Proper ties on the All page of the Connection Manager dialog box.
Connections Example
The following example demonstrates how to access connection managers from within the Script task. The sample
assumes that you have created and configured an ADO.NET connection manager named Test ADO.NET
Connection and a Flat File connection manager named Test Flat File Connection . Note that the ADO.NET
connection manager returns a SqlConnection object that you can use immediately to connect to the data source.
The Flat File connection manager, on the other hand, returns only a string that contains the path and file name. You
must use methods from the System.IO namespace to open and work with the flat file.
Public Sub Main()
Dts.TaskResult = ScriptResults.Success
End Sub
string myFlatFileConnection =
Dts.Connections["Test Flat File Connection"].AcquireConnection(Dts.Transaction)
as string;
MessageBox.Show(myFlatFileConnection, "Flat File Connection");
Dts.TaskResult = (int)ScriptResults.Success;
}
See Also
Integration Services (SSIS) Connections
Create Connection Managers
Raising Events in the Script Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Events provide a way to report errors, warnings, and other information, such as task progress or status, to the
containing package. The package provides event handlers for managing event notifications. The Script task can
raise events by calling methods on the Events property of the Dts object. For more information about how
Integration Services packages handle events, see Integration Services (SSIS) Event Handlers.
Events can be logged to any log provider that is enabled in the package. Log providers store information about
events in a data store. The Script task can also use the Log method to log information to a log provider without
raising an event. For more information about how to use the Log method, see Logging in the Script Task.
To raise an event, the Script task calls one of the methods exposed by the Events property. The following table lists
the methods exposed by the Events property.
FireQueryCancel Returns a value that indicates whether the package needs the
task to shut down prematurely.
FireWarning Informs the package that the task is in a state that warrants
user notification, but is not an error condition.
Events Example
The following example demonstrates how to raise events from within the Script task. The example uses a native
Windows API function to determine whether an Internet connection is available. If no connection is available, it
raises an error. If a potentially volatile modem connection is in use, the example raises a warning. Otherwise, it
returns an informational message that an Internet connection has been detected.
Private Declare Function InternetGetConnectedState Lib "wininet" _
(ByRef dwFlags As Long, ByVal dwReserved As Long) As Long
connectedState = InternetGetConnectedState(dwFlags, 0)
Dts.TaskResult = ScriptResults.Success
End Sub
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
using System.Windows.Forms;
using System.Runtime.InteropServices;
[DllImport("wininet")]
private extern static long InternetGetConnectedState(ref long dwFlags, long dwReserved);
Dts.TaskResult = (int)ScriptResults.Success;
See Also
Integration Services (SSIS) Event Handlers
Add an Event Handler to a Package
Logging in the Script Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The use of logging in Integration Services packages lets you record detailed information about execution
progress, results, and problems by recording predefined events or user-defined messages for later analysis. The
Script task can use the Log method of the Dts object to log user-defined data. If logging is enabled, and the
ScriptTaskLogEntr y event is selected for logging on the Details tab of the Configure SSIS Logs dialog box, a
single call to the Log method stores the event information in all the log providers configured for the task.
NOTE
Although you can perform logging directly from your Script task, you may want to consider implementing events rather
than logging. When using events, not only can you enable the logging of event messages, but you can also respond to the
event with default or user-defined event handlers.
For more information about logging, see Integration Services (SSIS) Logging.
Logging Example
The following example demonstrates logging from the Script task by logging a value that represents the number
of rows processed.
Try
Dts.Log("Rows processed: " & rowsProcessed.ToString, _
0, _
emptyBytes)
Dts.TaskResult = ScriptResults.Success
Catch ex As Exception
'An error occurred.
Dts.Events.FireError(0, "Script Task Example", _
ex.Message & ControlChars.CrLf & ex.StackTrace, _
String.Empty, 0)
Dts.TaskResult = ScriptResults.Failure
End Try
End Sub
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
try
{
Dts.Log("Rows processed: " + rowsProcessed.ToString(), 0, emptyBytes);
Dts.TaskResult = (int)ScriptResults.Success;
}
catch (Exception ex)
{
//An error occurred.
Dts.Events.FireError(0, "Script Task Example", ex.Message + "\r" + ex.StackTrace,
String.Empty, 0);
Dts.TaskResult = (int)ScriptResults.Failure;
}
See Also
Integration Services (SSIS) Logging
Returning Results from the Script Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Script task uses the TaskResult and the optional ExecutionValue properties to return status information to the
Integration Services runtime that can be used to determine the path of the workflow after the Script task has
finished.
TaskResult
The TaskResult property reports whether the task succeeded or failed. For example:
Dts.TaskResult = ScriptResults.Success
ExecutionValue
The ExecutionValue property optionally returns a user-defined object that quantifies or provides more information
about the success or failure of the Script task. For example, the FTP task uses the ExecutionValue property to return
the number of files transferred. The Execute SQL task returns the number of rows affected by the task. The
ExecutionValue can also be used to determine the path of the workflow. For example:
Dim rowsAffected as Integer
...
rowsAffected = 1000
Dts.ExecutionValue = rowsAffected
Script Task Examples
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Script task is a multi-purpose tool that you can use in a package to fill almost any requirement that is not met
by the tasks included with Integration Services. This topic lists Script task code samples that demonstrate some of
the available functionality.
NOTE
If you want to create tasks that you can more easily reuse across multiple packages, consider using the code in these Script
task samples as the starting point for custom tasks. For more information, see Developing a Custom Task.
In This Section
Example Topics
This section contains code examples that demonstrate various uses of the .NET Framework classes that you can
incorporate into an Integration Services Script task:
Detecting an Empty Flat File with the Script Task
Checks a flat file to determine whether it contains rows of data, and saves the result to a variable for use in control
flow branching.
Gathering a List for the ForEach Loop with the Script Task
Gathers a list of files that meet user-specified criteria, and populates a variable for later use by the Foreach from
Variable Enumerator.
Querying the Active Directory with the Script Task
Retrieves user information from Active Directory based on the value of an Integration Services variable, by using
classes in the System.DirectoryServices namespace.
Monitoring Performance Counters with the Script Task
Creates a custom performance counter that can be used to track the execution progress of an Integration Services
package, by using classes in the System.Diagnostics namespace.
Working with Images with the Script Task
Compresses images into the JPEG format and creates thumbnail images from them, by using classes in the
System.Drawing namespace.
Finding Installed Printers with the Script Task
Locates installed printers that support a specific paper size, by using classes in the System.Drawing.Printing
namespace.
Sending an HTML Mail Message with the Script Task
Sends a mail message in HTML format instead of plain text format.
Working with Excel Files with the Script Task
Lists the worksheets in an Excel file and checks for the existence of a specific worksheet.
Sending to a Remote Private Message Queue with the Script Task
Sends a message to a remote private message queue.
Other Examples
The following topics also contain code examples for use with the Script task:
Using Variables in the Script Task
Asks the user for confirmation of whether the package should continue to run, based on the value of a package
variable that may exceed the limit specified in another variable.
Connecting to Data Sources in the Script Task
Retrieves a connection or connection information from connection managers defined in the package.
Raising Events in the Script Task
Raises an error, a warning, or an informational message based on the status of the Internet connection on the
server.
Logging in the Script Task
Logs the number of items processed by the task to enabled log providers.
Detecting an Empty Flat File with the Script Task
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Flat File source does not determine whether a flat file contains rows of data before attempting to process it.
You may want to improve the efficiency of a package, especially of a package that iterates over numerous flat files,
by skipping files that do not contain any rows of data. The Script task can look for an empty flat file before the
package begins to process the data flow.
NOTE
If you want to create a task that you can more easily reuse across multiple packages, consider using the code in this Script
task sample as the starting point for a custom task. For more information, see Developing a Custom Task.
Description
The following example uses methods from the System.IO namespace to test the flat file specified in a Flat File
connection manager to determine whether the file is empty, or whether it contains only expected non-data rows
such as column headers or an empty line. The script checks the size of the file first; if the size is zero bytes, the file is
empty. If the file size is greater than zero, the script reads lines from the file until there are no more lines, or until
the number of lines exceeds the expected number of non-data rows. If the number of lines in the file is less than or
equal to the expected number of non-data rows, then the file is considered empty. The result is returned as a
Boolean value in a user variable, the value of which can be used for branching in the package's control flow. The
FireInformation method also displays the result in the Output window of the Microsoft Visual Studio Tools for
Applications (VSTA).
To configure this Script Task example
1. Create and configure a flat file connection manager named EmptyFlatFileTest .
2. Create an integer variable named FFNonDataRows and set its value to the number of non-data rows expected
in the flat file.
3. Create a Boolean variable named FFIsEmpty .
4. Add the FFNonDataRows variable to the Script task's ReadOnlyVariables property.
5. Add the FFIsEmpty variable to the Script task's ReadWriteVariables property.
6. In your code, import the System.IO namespace.
If you are iterating over files with a Foreach File enumerator, instead of using a single Flat File connection manager,
you will need to modify the sample code below to obtain the file name and path from the variable in which the
enumerated value is stored instead of from the connection manager.
Code
Public Sub Main()
Dts.TaskResult = ScriptResults.Success
End Sub
public void Main()
{
int lineCount = 0;
string line;
StreamReader fsFlatFile = new StreamReader(ffConnection);
while (!(fsFlatFile.EndOfStream))
{
Console.WriteLine (fsFlatFile.ReadLine());
lineCount += 1;
// If line count > expected number of non-data rows,
// flat file contains data (default value).
if (lineCount > nonDataRows)
{
break;
}
// If line count <= expected number of non-data rows,
// flat file does not contain data.
if (lineCount <= nonDataRows)
{
Dts.Variables["FFIsEmpty"].Value = true;
}
}
}
else
{
Dts.Variables["FFIsEmpty"].Value = true;
}
Dts.TaskResult = (int)ScriptResults.Success;
See Also
Script Task Examples
Finding Installed Printers with the Script Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The data that is transformed by Integration Services packages often has a printed report as its final destination. The
System.Drawing.Printing namespace in the Microsoft .NET Framework provides classes for working with
printers.
NOTE
If you want to create a task that you can more easily reuse across multiple packages, consider using the code in this Script
task sample as the starting point for a custom task. For more information, see Developing a Custom Task.
Description
The following example locates printers installed on the server that support legal size paper (as used in the United
States). The code to check supported paper sizes is encapsulated in a private function. To enable you to track the
progress of the script as it checks the settings for each printer, the script uses the Log method to raise an
informational message for printers with legal size paper, and to raise a warning for printers without legal size
paper. These messages appear in the Output window of the Microsoft Visual Studio Tools for Applications (VSTA)
IDE when you run the package in the designer.
To configure this Script Task example
1. Create the variable named PrinterList with type Object .
2. On the Script page of the Script Task Editor , add this variable to the ReadWriteVariables property.
3. In the script project, add a reference to the System.Drawing namespace.
4. In your code, use Impor ts statements to import the System.Collections and the
System.Drawing.Printing namespaces.
Code
Public Sub Main()
Dts.Variables("PrinterList").Value = printerList
Dts.TaskResult = ScriptResults.Success
End Sub
Return hasLegal
End Function
public void Main()
{
Dts.Variables["PrinterList"].Value = printerList;
Dts.TaskResult = (int)ScriptResults.Success;
return hasLegal;
See Also
Script Task Examples
Gathering a List for the ForEach Loop with the Script
Task
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Foreach from Variable Enumerator enumerates over the items in a list that is passed to it in a variable and
performs the same tasks on each item. You can use custom code in a Script task to populate a list for this purpose.
For more information about the enumerator, see Foreach Loop Container.
NOTE
If you want to create a task that you can more easily reuse across multiple packages, consider using the code in this Script
task sample as the starting point for a custom task. For more information, see Developing a Custom Task.
Description
The following example uses methods from the System.IO namespace to gather a list of Excel workbooks on the
computer that are either newer or older than a number of days specified by the user in a variable. It searches
directories on Drive C recursively for files that have the .xls extension and examines the date on which each file was
last modified to determine whether the file belongs in the list. It adds qualifying files to an ArrayList and saves the
ArrayList to a variable for later use in a Foreach Loop container. The Foreach Loop container is configured to use
the Foreach from Variable enumerator.
NOTE
The variable that you use with the Foreach from Variable Enumerator must be of type Object . The object that you place in
the variable must implement one of the following interfaces: System.Collections.IEnumerable ,
System.Runtime.InteropSer vices.ComTypes.IEnumVARIANT , System.ComponentModel IListSource , or
Microsoft.SqlSer ver.Dts.Runtime.Wrapper.ForEachEnumeratorHost . An Array or ArrayList is commonly used. The
ArrayList requires a reference and an Impor ts statement for the System.Collections namespace.
You can experiment with this task by using different positive and negative values for the FileAge package variable.
For example, you can enter 5 to search for files created in the last five days, or enter -3 to search for files that were
created more than three days ago. This task may take a minute or two on a drive with many folders to search.
To configure this Script Task example
1. Create a package variable named FileAge of type integer and enter a positive or negative integer value.
When the value is positive, the code searches for files newer than the specified number of days; when
negative, for files older than the specified number of days.
2. Create a package variable named FileList of type Object to receive the list of files gathered by the Script
task for later use by the Foreach from Variable Enumerator.
3. Add the FileAge variable to the Script task's ReadOnlyVariables property, and add the FileList variable
to the ReadWriteVariables property.
4. In your code, import the System.Collections and the System.IO namespaces.
Code
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Imports System.Collections
Imports System.IO
GetFilesInFolder(FILE_ROOT)
Dts.TaskResult = ScriptResults.Success
End Sub
Try
localFiles = Directory.GetFiles(folderPath, FILE_FILTER)
For Each localFile In localFiles
fileChangeDate = File.GetLastWriteTime(localFile)
fileAge = DateTime.Now.Subtract(fileChangeDate)
fileAgeInDays = fileAge.Days
CheckAgeOfFile(localFile, fileAgeInDays)
Next
End Sub
If isCheckForNewer Then
If fileAgeInDays <= fileAgeLimit Then
listForEnumerator.Add(localFile)
End If
Else
If fileAgeInDays > fileAgeLimit Then
listForEnumerator.Add(localFile)
End If
End If
End Sub
End Class
using System;
using System.Data;
using System.Math;
using Microsoft.SqlServer.Dts.Runtime;
using System.Collections;
using System.IO;
fileAgeLimit = (int)(Dts.Variables["FileAge"].Value);
GetFilesInFolder(FILE_ROOT);
Dts.TaskResult = (int)ScriptResults.Success;
}
}
string[] localFiles;
DateTime fileChangeDate;
TimeSpan fileAge;
int fileAgeInDays;
try
{
localFiles = Directory.GetFiles(folderPath, FILE_FILTER);
foreach (string localFile in localFiles)
{
fileChangeDate = File.GetLastWriteTime(localFile);
fileAge = DateTime.Now.Subtract(fileChangeDate);
fileAgeInDays = fileAge.Days;
CheckAgeOfFile(localFile, fileAgeInDays);
}
if (Directory.GetDirectories(folderPath).Length > 0)
{
foreach (string childFolder in Directory.GetDirectories(folderPath))
{
GetFilesInFolder(childFolder);
}
}
}
catch
{
// Ignore exceptions on special folders, such as System Volume Information.
}
if (isCheckForNewer)
{
if (fileAgeInDays <= fileAgeLimit)
{
listForEnumerator.Add(localFile);
}
}
else
{
if (fileAgeInDays > fileAgeLimit)
{
listForEnumerator.Add(localFile);
}
}
See Also
Foreach Loop Container
Configure a Foreach Loop Container
Monitoring Performance Counters with the Script
Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Administrators may need to monitor the performance of Integration Services packages that perform complex
transformations on large amounts of data. The System.Diagnostics namespace of the Microsoft .NET Framework
provides classes for using existing performance counters and for creating your own performance counters.
Performance counters store application performance information that you can use to analyze the performance of
software over time. Performance counters can be monitored locally or remotely by using the Performance
Monitor tool. You can store the values of performance counters in variables for later control flow branching in the
package.
As an alternative to using performance counters, you can raise the FireProgress event through the Events property
of the Dts object. The FireProgress event returns both incremental progress and percentage complete information
to the Integration Services runtime.
NOTE
If you want to create a task that you can more easily reuse across multiple packages, consider using the code in this Script
task sample as the starting point for a custom task. For more information, see Developing a Custom Task.
Description
The following example creates a custom performance counter and increments the counter. First, the example
determines whether the performance counter already exists. If the performance counter has not been created, the
script calls the Create method of the PerformanceCounterCategor y object to create it. After the performance
counter has been created, the script increments the counter. Finally, the example follows the best practice of calling
the Close method on the performance counter when it is no longer needed.
NOTE
Creating a new performance counter category and performance counter requires administrative rights. Also, the new
category and counter persist on the computer after creation.
Try
'Create the performance counter if it does not already exist.
If Not _
PerformanceCounterCategory.Exists("TaskExample") Then
PerformanceCounterCategory.Create("TaskExample", _
"Task Performance Counter Example", "Iterations", _
"Number of times this task has been called.")
End If
myCounter.Close()
Dts.TaskResult = ScriptResults.Success
Catch ex As Exception
Dts.Events.FireError(0, _
"Task Performance Counter Example", _
ex.Message & ControlChars.CrLf & ex.StackTrace, _
String.Empty, 0)
Dts.TaskResult = ScriptResults.Failure
End Try
End Sub
public class ScriptMain
{
PerformanceCounter myCounter;
try
{
//Create the performance counter if it does not already exist.
if (!PerformanceCounterCategory.Exists("TaskExample"))
{
PerformanceCounterCategory.Create("TaskExample", "Task Performance Counter Example",
"Iterations", "Number of times this task has been called.");
}
myCounter.Close();
Dts.TaskResult = (int)ScriptResults.Success;
}
catch (Exception ex)
{
Dts.Events.FireError(0, "Task Performance Counter Example", ex.Message + "\r" + ex.StackTrace,
String.Empty, 0);
Dts.TaskResult = (int)ScriptResults.Failure;
}
Dts.TaskResult = (int)ScriptResults.Success;
}
Querying the Active Directory with the Script Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Enterprise data processing applications, such as Integration Services packages, often need to process data
differently based on the rank, job title, or other characteristics of employees stored in Active Directory. Active
Directory is a Microsoft Windows directory service that provides a centralized store of metadata, not only about
users, but also about other organizational assets such as computers and printers. The System.Director ySer vices
namespace in the Microsoft .NET Framework provides classes for working with Active Directory, to help you direct
data processing workflow based on the information that it stores.
NOTE
If you want to create a task that you can more easily reuse across multiple packages, consider using the code in this Script
task sample as the starting point for a custom task. For more information, see Developing a Custom Task.
Description
The following example retrieves an employee's name, title, and phone number from Active Directory based on the
value of the email variable, which contains the e-mail address of the employee. Precedence constraints in the
package can use the retrieved information to determine, for example, whether to send a low-priority e-mail
message or a high-priority page, based on the job title of the employee.
To configure this Script Task example
1. Create the three string variables email , name , and title . Enter a valid corporate email address as the
value of the email variable.
2. On the Script page of the Script Task Editor , add the email variable to the ReadOnlyVariables
property.
3. Add the name and title variables to the ReadWriteVariables property.
4. In the script project, add a reference to the System.Director ySer vices namespace.
5. . In your code, use an Impor ts statement to import the Director ySer vices namespace.
NOTE
To run this script successfully, your company must be using Active Directory on its network and storing the employee
information that this example uses.
Code
Public Sub Main()
email = Dts.Variables("email").Value.ToString
Try
directory = New _
DirectoryServices.DirectorySearcher("(mail=" & email & ")")
result = directory.FindOne
Dts.Variables("name").Value = _
result.Properties("displayname").ToString
Dts.Variables("title").Value = _
result.Properties("title").ToString
Dts.TaskResult = ScriptResults.Success
Catch ex As Exception
Dts.Events.FireError(0, _
"Script Task Example", _
ex.Message & ControlChars.CrLf & ex.StackTrace, _
String.Empty, 0)
Dts.TaskResult = ScriptResults.Failure
End Try
End Sub
email = (string)Dts.Variables["email"].Value;
try
{
directory = new DirectorySearcher("(mail=" + email + ")");
result = directory.FindOne();
Dts.Variables["name"].Value = result.Properties["displayname"].ToString();
Dts.Variables["title"].Value = result.Properties["title"].ToString();
Dts.TaskResult = (int)ScriptResults.Success;
}
catch (Exception ex)
{
Dts.Events.FireError(0, "Script Task Example", ex.Message + "\n" + ex.StackTrace, String.Empty, 0);
Dts.TaskResult = (int)ScriptResults.Failure;
}
External Resources
Technical article, Processing Active Directory Information in SSIS, on social.technet.microsoft.com
Sending an HTML Mail Message with the Script Task
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Integration Services SendMail task only supports mail messages in plain text format. However you can easily
send HTML mail messages by using the Script task and the mail capabilities of the .NET Framework.
NOTE
If you want to create a task that you can more easily reuse across multiple packages, consider using the code in this Script
task sample as the starting point for a custom task. For more information, see Developing a Custom Task.
Description
The following example uses the System.Net.Mail namespace to configure and send an HTML mail message. The
script obtains the To, From, Subject, and body of the e-mail from package variables, uses them to create a new
MailMessag e, and sets its IsBodyHtml property to True . Then it obtains the SMTP server name from another
package variable, initializes an instance of System.Net.Mail.SmtpClient , and calls its Send method to send the
HTML message. The sample encapsulates the message sending functionality in a subroutine that could be reused in
other scripts.
To configure this Script Task example without an SMTP Connection Manager
1. Create string variables named HtmlEmailTo , HtmlEmailFrom , and HtmlEmailSubject and assign appropriate
values to them for a valid test message.
2. Create a string variable named HtmlEmailBody and assign a string of HTML markup to it. For example:
3. Create a string variable named HtmlEmailServer and assign the name of an available SMTP server that
accepts anonymous outgoing messages.
4. Assign all five of these variables to the ReadOnlyVariables property of a new Script task.
5. Import the System.Net and System.Net.Mail namespaces into your code.
The sample code in this topic obtains the SMTP server name from a package variable. However, you could also take
advantage of an SMTP connection manager to encapsulate the connection information, and extract the server
name from the connection manager in your code. The AcquireConnection method of the SMTP connection
manager returns a string in the following format:
SmtpServer=smtphost;UseWindowsAuthentication=False;EnableSsl=False;
You can use the String.Split method to separate this argument list into an array of individual strings at each
semicolon (;) or equal sign (=), and then extract the second argument (subscript 1) from the array as the server
name.
To configure this Script Task example with an SMTP Connection Manager
1. Modify the Script task configured earlier by removing the HtmlEmailServer variable from the list of
ReadOnlyVariables .
2. Replace the line of code that obtains the server name:
Code
Public Sub Main()
SendMailMessage( _
htmlMessageFrom, htmlMessageTo, _
htmlMessageSubject, htmlMessageBody, _
True, smtpServer)
Dts.TaskResult = ScriptResults.Success
End Sub
End Sub
public void Main()
{
Dts.TaskResult = (int)ScriptResults.Success;
private void SendMailMessage(string From, string SendTo, string Subject, string Body, bool IsBodyHtml,
string Server)
{
MailMessage htmlMessage;
SmtpClient mySmtpClient;
See Also
Send Mail Task
Sending to a Remote Private Message Queue with
the Script Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Message Queuing (also known as MSMQ) makes it easy for developers to communicate with application programs
quickly and reliably by sending and receiving messages. A message queue may be located on the local computer
or a remote computer, and may be public or private. In Integration Services, the MSMQ connection manager and
Message Queue task do not support sending to a private queue on a remote computer. However, by using the
Script task, it is easy to send a message to a remote private queue.
NOTE
If you want to create a task that you can more easily reuse across multiple packages, consider using the code in this Script
task sample as the starting point for a custom task. For more information, see Developing a Custom Task.
Description
The following example uses an existing MSMQ connection manager, together with objects and methods from the
System.Messaging namespace, to send the text contained in a package variable to a remote private message
queue. The call to the
M:Microsoft.SqlServer.Dts.ManagedConnections.MSMQConn.AcquireConnection(System.Object) method of the
MSMQ connection manager returns a MessageQueue object whose Send method accomplishes this task.
To configure this Script Task example
1. Create an MSMQ connection manager with the default name. Set the path of a valid remote private queue,
in the following format:
FORMATNAME:DIRECT=OS:<computername>\private$\<queuename>
2. Create an Integration Services variable named MessageText of type String to pass the message text into
the script. Enter a default message as the value of the variable.
3. Add a Script Task to the design surface and edit it. On the Script tab of the Script Task Editor , add the
MessageText variable to the ReadOnlyVariables property to make the variable available inside the script.
4. Click Edit Script to open the Microsoft Visual Studio Tools for Applications (VSTA) script editor.
5. Add a reference in the script project to the System.Messaging namespace.
6. Replace the contents of the script window with the code in the following section.
Code
Imports System
Imports Microsoft.SqlServer.Dts.Runtime
Imports System.Messaging
remotePrivateQueue = _
DirectCast(Dts.Connections("Message Queue Connection Manager").AcquireConnection(Dts.Transaction),
_
MessageQueue)
messageText = DirectCast(Dts.Variables("MessageText").Value, String)
remotePrivateQueue.Send(messageText)
Dts.TaskResult = ScriptResults.Success
End Sub
End Class
using System;
using Microsoft.SqlServer.Dts.Runtime;
using System.Messaging;
Dts.TaskResult = (int)ScriptResults.Success;
See Also
Message Queue Task
Working with Excel Files with the Script Task
11/2/2020 • 11 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services provides the Excel connection manager, Excel source, and Excel destination for working with
data stored in spreadsheets in the Microsoft Excel file format. The techniques described in this topic use the Script
task to obtain information about available Excel databases (workbook files) and tables (worksheets and named
ranges).
IMPORTANT
For detailed info about connecting to Excel files, and about limitations and known issues for loading data from or to Excel
files, see Load data from or to Excel with SQL Server Integration Services (SSIS).
TIP
If you want to create a task that you can reuse across multiple packages, consider using the code in this Script task sample
as the starting point for a custom task. For more information, see Developing a Custom Task.
fileToTest = Dts.Variables("ExcelFile").Value.ToString
If File.Exists(fileToTest) Then
Dts.Variables("ExcelFileExists").Value = True
Else
Dts.Variables("ExcelFileExists").Value = False
End If
Dts.TaskResult = ScriptResults.Success
End Sub
End Class
public class ScriptMain
{
public void Main()
{
string fileToTest;
fileToTest = Dts.Variables["ExcelFile"].Value.ToString();
if (File.Exists(fileToTest))
{
Dts.Variables["ExcelFileExists"].Value = true;
}
else
{
Dts.Variables["ExcelFileExists"].Value = false;
}
Dts.TaskResult = (int)ScriptResults.Success;
}
}
fileToTest = Dts.Variables("ExcelFile").Value.ToString
tableToTest = Dts.Variables("ExcelTable").Value.ToString
Dts.Variables("ExcelTableExists").Value = False
If File.Exists(fileToTest) Then
connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=" & fileToTest & _
";Extended Properties=Excel 12.0"
excelConnection = New OleDbConnection(connectionString)
excelConnection.Open()
excelTables = excelConnection.GetSchema("Tables")
For Each excelTable In excelTables.Rows
currentTable = excelTable.Item("TABLE_NAME").ToString
If currentTable = tableToTest Then
Dts.Variables("ExcelTableExists").Value = True
End If
Next
End If
Dts.TaskResult = ScriptResults.Success
End Sub
End Class
public class ScriptMain
{
public void Main()
{
string fileToTest;
string tableToTest;
string connectionString;
OleDbConnection excelConnection;
DataTable excelTables;
string currentTable;
fileToTest = Dts.Variables["ExcelFile"].Value.ToString();
tableToTest = Dts.Variables["ExcelTable"].Value.ToString();
Dts.Variables["ExcelTableExists"].Value = false;
if (File.Exists(fileToTest))
{
connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" +
"Data Source=" + fileToTest + ";Extended Properties=Excel 12.0";
excelConnection = new OleDbConnection(connectionString);
excelConnection.Open();
excelTables = excelConnection.GetSchema("Tables");
foreach (DataRow excelTable in excelTables.Rows)
{
currentTable = excelTable["TABLE_NAME"].ToString();
if (currentTable == tableToTest)
{
Dts.Variables["ExcelTableExists"].Value = true;
}
}
}
Dts.TaskResult = (int)ScriptResults.Success;
}
}
excelFolder = Dts.Variables("ExcelFolder").Value.ToString
excelFiles = Directory.GetFiles(excelFolder, FILE_PATTERN)
Dts.Variables("ExcelFiles").Value = excelFiles
Dts.TaskResult = ScriptResults.Success
End Sub
End Class
string excelFolder;
string[] excelFiles;
excelFolder = Dts.Variables["ExcelFolder"].Value.ToString();
excelFiles = Directory.GetFiles(excelFolder, FILE_PATTERN);
Dts.Variables["ExcelFiles"].Value = excelFiles;
Dts.TaskResult = (int)ScriptResults.Success;
}
}
Alternate Solution
Instead of using a Script task to gather a list of Excel files into an array, you can also use the ForEach File
enumerator to iterate over all the Excel files in a folder. For more information, see Loop through Excel Files and
Tables by Using a Foreach Loop Container.
NOTE
The list of tables in an Excel workbook includes both worksheets (which have the $ suffix) and named ranges. If you have to
filter the list for only worksheets or only named ranges, you may have to add additional code for this purpose.
To configure this Script Task example
1. Add a new Script task to the package and change its name to GetExcelTables .
2. Open the Script Task Editor , on the Script tab, click ReadOnlyVariables and enter the property value
using one of the following methods:
Type ExcelFile .
-or-
Click the ellipsis (...) button next to the property field, and in the Select variables dialog box, select
the ExcelFile variable.
3. Click ReadWriteVariables and enter the property value using one of the following methods:
Type ExcelTables .
-or-
Click the ellipsis (...) button next to the property field, and in the Select variables dialog box, select
the ExcelTablesvariable.
4. Click Edit Script to open the script editor.
5. Add a reference to the System.Xml namespace in the script project.
6. Add an Impor ts statement for the System.Data.OleDb namespace at the top of the script file.
7. Add the following code.
Example 4 Code
Public Class ScriptMain
Public Sub Main()
Dim excelFile As String
Dim connectionString As String
Dim excelConnection As OleDbConnection
Dim tablesInFile As DataTable
Dim tableCount As Integer = 0
Dim tableInFile As DataRow
Dim currentTable As String
Dim tableIndex As Integer = 0
excelFile = Dts.Variables("ExcelFile").Value.ToString
connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=" & excelFile & _
";Extended Properties=Excel 12.0"
excelConnection = New OleDbConnection(connectionString)
excelConnection.Open()
tablesInFile = excelConnection.GetSchema("Tables")
tableCount = tablesInFile.Rows.Count
ReDim excelTables(tableCount - 1)
For Each tableInFile In tablesInFile.Rows
currentTable = tableInFile.Item("TABLE_NAME").ToString
excelTables(tableIndex) = currentTable
tableIndex += 1
Next
Dts.Variables("ExcelTables").Value = excelTables
Dts.TaskResult = ScriptResults.Success
End Sub
End Class
public class ScriptMain
{
public void Main()
{
string excelFile;
string connectionString;
OleDbConnection excelConnection;
DataTable tablesInFile;
int tableCount = 0;
string currentTable;
int tableIndex = 0;
excelFile = Dts.Variables["ExcelFile"].Value.ToString();
connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" +
"Data Source=" + excelFile + ";Extended Properties=Excel 12.0";
excelConnection = new OleDbConnection(connectionString);
excelConnection.Open();
tablesInFile = excelConnection.GetSchema("Tables");
tableCount = tablesInFile.Rows.Count;
Dts.Variables["ExcelTables"].Value = excelTables;
Dts.TaskResult = (int)ScriptResults.Success;
}
}
Alternate Solution
Instead of using a Script task to gather a list of Excel tables into an array, you can also use the ForEach ADO.NET
Schema Rowset Enumerator to iterate over all the tables (that is, worksheets and named ranges) in an Excel
workbook file. For more information, see Loop through Excel Files and Tables by Using a Foreach Loop Container.
results = _
"Final values of variables:" & EOL & _
"ExcelFile: " & Dts.Variables("ExcelFile").Value.ToString & EOL & _
"ExcelFileExists: " & Dts.Variables("ExcelFileExists").Value.ToString & EOL & _
"ExcelTable: " & Dts.Variables("ExcelTable").Value.ToString & EOL & _
"ExcelTableExists: " & Dts.Variables("ExcelTableExists").Value.ToString & EOL & _
"ExcelFolder: " & Dts.Variables("ExcelFolder").Value.ToString & EOL & _
EOL
Dts.TaskResult = ScriptResults.Success
End Sub
End Class
public class ScriptMain
{
public void Main()
{
const string EOL = "\r";
string results;
string[] filesInFolder;
//string fileInFolder;
string[] tablesInFile;
//string tableInFile;
Dts.TaskResult = (int)ScriptResults.Success;
}
}
See Also
Load data from or to Excel with SQL Server Integration Services (SSIS)
Loop through Excel Files and Tables by Using a Foreach Loop Container
Working with Images with the Script Task
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A database of products or users frequently includes images in addition to text and numeric data. The
System.Drawing namespace in the Microsoft .NET Framework provides classes for manipulating images.
Example 1: Convert Images to JPEG Format
Example 2: Create and Save Thumbnail Images
NOTE
If you want to create a task that you can more easily reuse across multiple packages, consider using the code in this Script
task sample as the starting point for a custom task. For more information, see Developing a Custom Task.
NOTE
These steps are in addition to the steps listed in the procedure for use with a single image file.
Example 1 Code
Try
'Store the variable in a string for local manipulation.
currentFile = Dts.Variables("CurrentImageFile").Value.ToString
'Check the extension of the file against a list of
'files that the Bitmap class supports.
If Array.IndexOf(supportedExtensions, _
Path.GetExtension(currentFile).ToUpper) > -1 Then
End Sub
encoders = Imaging.ImageCodecInfo.GetImageEncoders()
End Function
NOTE
These steps are in addition to the steps listed in the procedure for use with a single image file.
Example 2 Code
Public Sub Main()
currentImageFile = Dts.Variables("CurrentImageFile").Value.ToString
thumbnailFile = Path.Combine( _
Path.GetDirectoryName(currentImageFile), _
String.Concat(Path.GetFileNameWithoutExtension(currentImageFile), _
"_thumbnail.jpg"))
Try
currentImage = Image.FromFile(currentImageFile)
thumbnailImage = currentImage.GetThumbnailImage( _
thumbnailWidth, thumbnailHeight, Nothing, Nothing)
thumbnailImage.Save(thumbnailFile)
Dts.TaskResult = ScriptResults.Success
Catch ex As Exception
Dts.Events.FireError(0, "Script Task Example", _
ex.Message & ControlChars.CrLf & ex.StackTrace, _
String.Empty, 0)
Dts.TaskResult = ScriptResults.Failure
End Try
End Sub
End Sub
bool ThumbnailCallback()
{
return false;
}
public void Main()
{
string currentImageFile;
Image currentImage;
int maxThumbSize;
Image thumbnailImage;
string thumbnailFile;
int thumbnailHeight = 0;
int thumbnailWidth = 0;
currentImageFile = Dts.Variables["CurrentImageFile"].Value.ToString();
thumbnailFile = Path.Combine(Path.GetDirectoryName(currentImageFile),
String.Concat(Path.GetFileNameWithoutExtension(currentImageFile), "_thumbnail.jpg"));
try
{
currentImage = Image.FromFile(currentImageFile);
maxThumbSize = (int)Dts.Variables["MaxThumbSize"].Value;
CalculateThumbnailSize(maxThumbSize, currentImage, ref thumbnailWidth, ref thumbnailHeight);
private void CalculateThumbnailSize(int maxSize, Image sourceImage, ref int thumbWidth, ref int
thumbHeight)
{
}
Extending the Data Flow with the Script
Component
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Script component extends the data flow capabilities of Microsoft Integration Services packages with custom
code written in Microsoft Visual Basic or Microsoft Visual C# that is compiled and executed at package run time.
The Script component simplifies the development of a custom data flow source, transformation, or destination
when the sources, transformations, and destinations included with Integration Services do not fully satisfy your
requirements. After you configure the component with the expected inputs and outputs, it writes all the required
infrastructure code for you, letting you focus exclusively on the code that is required for your custom
processing.
A Script component interacts with the containing package and with the data flow through the autogenerated
classes in the ComponentWrapper and BufferWrapper project items, which are instances of the
ScriptComponent and the ScriptBuffer classes respectively. These classes make connections, variables, and other
package items available as typed objects, and manage inputs and outputs. The Script component can also use
the Visual Basic namespace and the .NET Framework class library, as well as custom assemblies, to implement
custom functionality.
The Script component and the infrastructure code that it generates for you simplify significantly the process of
developing a custom data flow component. However, to understand how the Script component works, you may
find it useful to read the section Developing a Custom Data Flow Component to understand the steps that are
involved in developing a custom data flow component.
If you are creating a source, transformation, or destination that you plan to reuse in multiple packages, you
should consider developing a custom component instead of using the Script component. For more information,
see Developing a Custom Data Flow Component.
In This Section
The following topics provide more information about the Script component.
Configuring the Script Component in the Script Component Editor
Properties that you configure in the Script Transformation Editor affect the capabilities and the performance
of Script component code.
Coding and Debugging the Script Component
You use the Microsoft Visual Studio Tools for Applications (VSTA) development environment to develop the
scripts contained in the Script component.
Understanding the Script Component Object Model
A new Script component project contains three project items with several classes and autogenerated properties
and methods.
Using Variables in the Script Component
The ComponentWrapper project item contains strongly-typed accessor properties for package variables.
Connecting to Data Sources in the Script Component
The ComponentWrapper project item also contains strongly-typed accessor properties for connections
defined in the package.
Raising Events in the Script Component
You can raise events to provide notification of problems and errors.
Logging in the Script Component
You can log information to log providers enabled on the package.
Developing Specific Types of Script Components
These simple examples explain and demonstrate how to use the Script component to develop data flow sources,
transformations, and destinations.
Additional Script Component Examples
These simple examples explain and demonstrate a few possible uses for the Script component.
See Also
Script Component
Comparing the Script Task and the Script Component
Configuring the Script Component in the Script
Component Editor
11/2/2020 • 9 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Before you write custom code in the Script component, you must select the type of data flow component that
you want to create-source, transformation, or destination-and then configure the component's metadata and
properties in the Script Transformation Editor .
For more information about how to configure input columns for a specific type of data flow component, see the
appropriate example under Developing Specific Types of Script Components.
Inputs and Outputs Page of the Script Transformation Editor
The Input and Outputs page of the Script Transformation Editor is displayed for sources, transformations,
and destinations. On this page, you add, remove, and configure inputs, outputs, and output columns that you
want to use in your custom script, within the following limitations:
When used as a source, the Script component has no input and supports multiple outputs.
When used as a transformation, the Script component supports one input and multiple outputs.
When used as a destination, the Script component supports one input and has no outputs.
In the code project that will be generated based on this metadata, the BufferWrapper project item contains a
class for each input and output. For example, if you create an output named CustomerOutput , the
BufferWrapper project item will contain a CustomerOutput class that derives from ScriptBuffer, and the
CustomerOutput class will contain typed accessor properties for each output column created.
You can configure output columns only on the Input and Outputs page. You can select input columns for
transformations and destinations on the Input Columns page. The typed accessor properties created for you in
the BufferWrapper project item will be write-only for output columns. The accessor properties for input columns
will be read-only or read/write depending on the usage type that you have selected for each column on the
Input Columns page.
For more information about configuring inputs and outputs for a specific type of data flow component see the
appropriate example under Developing Specific Types of Script Components.
NOTE
Although you cannot directly configure an output as an error output in the Script component for automatic handling of
error rows, you can reproduce the functionality of an error output by creating an additional output and using script to
direct rows to this output when appropriate. For more information, see Simulating an Error Output for the Script
Component.
NOTE
When the Script Transformation Editor creates the first output, the editor sets the SynchronousInputID property of
the output to the ID of the component's input. However, when the editor creates subsequent outputs, the editor sets the
SynchronousInputID properties of those outputs to zero.
If you are creating a component with synchronous outputs, each output must have its SynchronousInputID property
set to the ID of the component's input. Therefore, each output that the editor creates after the first output must have its
SynchronousInputID value changed from zero to the ID of the component's input.
If you are creating a component with asynchronous outputs, each output must have its SynchronousInputID property
set to zero. Therefore, the first output must have its SynchronousInputID value changed from the ID of the
component's input to zero.
For an example of directing rows to one of two synchronous outputs in the Script component, see Creating a
Synchronous Transformation with the Script Component.
Object Names in Generated Script
The Script component parses the names of inputs and outputs, and parse the names of columns in the inputs
and outputs, and based on these names generates classes and properties in the BufferWrapper project item. If
the found names include characters that do not belong to the Unicode categories UppercaseLetter ,
LowercaseLetter , TitlecaseLetter , ModifierLetter , OtherLetter , or DecimalDigitLetter , the invalid
characters are dropped in the generated names. For example, spaces are dropped, therefore two input columns
that have the names FirstName and [First Name ] are both interpreted as having the column name
FirstName , with unpredictable results. To avoid this situation, the names of inputs and outputs and of input and
output columns used by the Script component should contain only characters in the Unicode categories listed in
this section.
Script Page of the Script Transformation Editor
On the Script page of the Script Task Editor , you assign a unique name and a description for the Script task.
You can also assign values for the following properties.
NOTE
In SQL Server 2008 Integration Services (SSIS) and later versions, all scripts are precompiled. In previous versions, you
specified whether scripts were precompiled by setting a Precompile property for the task.
ValidateExternalMetadata Property
The Boolean value of the ValidateExternalMetadata property specifies whether the component should
perform validation against external data sources at design time, or whether it should postpone validation until
run time. By default, the value of this property is True ; that is, the external metadata is validated both at design
time and at run time. You may want to set the value of this property to False when an external data source is not
available at design time: for example, when the package downloads the source or creates the destination only at
run time.
ReadOnlyVariables and ReadWriteVariables Properties
You can enter comma-delimited lists of existing variables as the values of these properties to make the variables
available for read-only or read/write access within the Script component code. Variables are accessed in code
through the ReadOnlyVariables and ReadWriteVariables properties of the autogenerated base class. For more
information, see Using Variables in the Script Component.
NOTE
Variable names are case-sensitive.
ScriptLanguage
You can select either Microsoft Visual Basic or Microsoft Visual C# as the programming language for the Script
component.
Edit Script Button
The Edit Script button opens the Microsoft Visual Studio Tools for Applications (VSTA) IDE in which you write
your custom script. For more information, see Coding and Debugging the Script Component.
Connection Managers Page of the Script Transformation Editor
On the Connection Managers page of the Script Transformation Editor , you add and remove connection
managers that you want to use in your custom script. Normally you need to reference connection managers
when you create a source or destination component.
In the code project that will be generated based on this metadata, the ComponentWrapper project item
contains a Connections collection class that has a typed accessor property for each selected connection
manager. Each typed accessor property has the same name as the connection manager itself and returns a
reference to the connection manager as an instance of IDTSConnectionManager100. For example, if you have
added a connection manager named MyADONETConnection on the Connection Managers page of the editor, you
can obtain a reference to the connection manager in your script by using the following code:
For more information, see Connecting to Data Sources in the Script Component.
See Also
Coding and Debugging the Script Component
Coding and Debugging the Script Component
11/2/2020 • 8 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In SSIS Designer, the Script component has two modes: metadata design mode and code design mode. When
you open the Script Transformation Editor , the component enters metadata design mode, in which you
configure metadata and set component properties. After you have set the properties of the Script component
and configured the input and outputs in metadata design mode, you can switch to code design mode to write
your custom script. For more information about metadata design mode and code design mode, see Configuring
the Script Component in the Script Component Editor.
NOTE
While you design the package, the script code is temporarily written to a project file. Because storing sensitive information
in a file is a potential security risk, we recommended that you do not include sensitive information such as passwords in
the script code.
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
<Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute> _
<CLSCompliant(False)> _
Public Class ScriptMain
Inherits UserComponent
End Class
/* Microsoft SQL Server Integration Services user script component
* Write scripts using Microsoft Visual C# 2008.
* ScriptMain is the entry point class of the script.*/
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
[Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
public class ScriptMain : UserComponent
{
NOTE
You can view project references in the VSTA IDE in Class View or in Project Explorer . You open either of these windows
from the View menu. You can add a new reference from the Project menu, from Project Explorer , or from Class View .
NOTE
You cannot debug a Script component when you run the Script component as part of a child package that is run from an
Execute Package task. Breakpoints that you set in the Script component in the child package are disregarded in these
circumstances. You can debug the child package normally by running it separately.
NOTE
When you debug a package that contains multiple Script components, the debugger debugs one Script component. The
system can debug another Script component if the debugger completes, as in the case of a Foreach Loop or For Loop
container.
You can also monitor the execution of the Script component by using the following methods:
Interrupt execution and display a modal message by using the MessageBox.Show method in the
System.Windows.Forms namespace. (Remove this code after you complete the debugging process.)
Raise events for informational messages, warnings, and errors. The FireInformation, FireWarning, and
FireError methods display the event description in the Visual Studio Output window. However, the
FireProgress method, the Console.Write method, and Console.WriteLine method do not display any
information in the Output window. Messages from the FireProgress event appear on the Progress tab
of SSIS Designer. For more information, see Raising Events in the Script Component.
Log events or user-defined messages to enabled logging providers. For more information, see Logging in
the Script Component.
If you just want to examine the output of a Script component configured as a source or as a transformation,
without saving the data to a destination, you can stop the data flow with a Row Count Transformation and attach
a data viewer to the output of the Script component. For information about data viewers, see Debugging Data
Flow.
In This Section
For more information about coding the Script component, see the following topics in this section.
Understanding the Script Component Object Model
Explains how to use the objects, methods, and properties available in the Script component.
Referencing Other Assemblies in Scripting Solutions
Explains how to reference objects from the .NET Framework class library in the Script component.
Simulating an Error Output for the Script Component
Explains how to simulate an error output for rows that raise errors during processing by the Script component.
External Resources
Blog entry, VSTA setup and configuration troubles for SSIS 2008 and R2 installations, on blogs.msdn.com.
See Also
Configuring the Script Component in the Script Component Editor
Understanding the Script Component Object Model
11/2/2020 • 7 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
As discussed in Coding and Debugging the Script Component, the Script component project contains three project
items:
1. The ScriptMain item, which contains the ScriptMain class in which you write your code. The ScriptMain
class inherits from the UserComponent class.
2. The ComponentWrapper item, which contains the UserComponent class, an instance of
ScriptComponent that contains the methods and properties that you will use to process data and to interact
with the package. The ComponentWrapper item also contains Connections and Variables collection
classes.
3. The BufferWrapper item, which contains classes that inherits from ScriptBuffer for each input and output,
and typed properties for each column.
As you write your code in the ScriptMain item, you will use the objects, methods, and properties discussed in this
topic. Each component will not use all the methods listed here; however, when used, they are used in the sequence
shown.
The ScriptComponent base class does not contain any implementation code for the methods discussed in this
topic. Therefore it is unnecessary, but harmless, to add a call to the base class implementation to your own
implementation of the method.
For information about how to use the methods and properties of these classes in a particular type of Script
component, see the section Additional Script Component Examples. The example topics also contain complete
code samples.
AcquireConnections Method
Sources and destinations generally must connect to an external data source. Override the AcquireConnections
method of the ScriptComponent base class to retrieve the connection or the connection information from the
appropriate connection manager.
The following example returns a System.Data.SqlClient.SqlConnection from an ADO.NET connection manager.
connMgr = Me.Connections.MyADONETConnection
sqlConn = CType(connMgr.AcquireConnection(Nothing), SqlConnection)
End Sub
The following example returns a complete path and file name from a Flat File Connection Manager, and then opens
the file by using a System.IO.StreamReader .
Private textReader As StreamReader
Public Overrides Sub AcquireConnections(ByVal Transaction As Object)
End Sub
PreExecute Method
Override the PreExecute method of the ScriptComponent base class whenever you have processing that you must
perform one time only before you start processing rows of data. For example, in a destination, you may want to
configure the parameterized command that the destination will use to insert each row of data into the data source.
End Sub
SqlConnection sqlConn;
SqlCommand sqlCmd;
SqlParameter sqlParam;
PostExecute Method
Override the PostExecute method of the ScriptComponent base class whenever you have processing that you must
perform one time only after you have processed the rows of data. For example, in a source, you may want to close
the System.Data.SqlClient.SqlDataReader that you have used to load data into the data flow.
IMPORTANT
The collection of ReadWriteVariables is available only in the PostExecute method. Therefore you cannot directly
increment the value of a package variable as you process each row of data. Instead, increment the value of a local variable,
and set the value of the package variable to the value of the local variable in the PostExecute method after all data has
been processed.
ReleaseConnections Method
Sources and destinations typically must connect to an external data source. Override the ReleaseConnections
method of the ScriptComponent base class to close and release the connection that you have opened previously in
the AcquireConnections method.
Dim connMgr As IDTSConnectionManager100
...
Public Overrides Sub ReleaseConnections()
connMgr.ReleaseConnection(sqlConn)
End Sub
IDTSConnectionManager100 connMgr;
connMgr.ReleaseConnection(sqlConn);
See Also
Configuring the Script Component in the Script Component Editor
Coding and Debugging the Script Component
Using Variables in the Script Component
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Variables store values that a package and its containers, tasks, and event handlers can use at run time. For more
information, see Integration Services (SSIS) Variables.
You can make existing variables available for read-only or read/write access by your custom script by entering
comma-delimited lists of variables in the ReadOnlyVariables and ReadWriteVariables fields on the Script
page of the Script Transformation Editor . Keep in mind that variable names are case-sensitive. Use the Value
property to read from and write to individual variables. The Script component handles any required locking
behind the scenes as your script manipulates the variables at run time.
IMPORTANT
The collection of ReadWriteVariables is only available in the PostExecute method to maximize performance and minimize
the risk of locking conflicts. Therefore you cannot directly increment the value of a package variable as you process each row
of data. Increment the value of a local variable instead, and set the value of the package variable to the value of the local
variable in the PostExecute method after all data has been processed. You can also use the VariableDispenser property to
work around this limitation, as described later in this topic. However, writing directly to a package variable as each row is
processed will negatively impact performance and increase the risk of locking conflicts.
For more information about the Script page of the Script Transformation Editor , see Configuring the Script
Component in the Script Component Editor and Script Transformation Editor (Script Page).
The Script component creates a Variables collection class in the ComponentWrapper project item with a
strongly-typed accessor property for the value of each preconfigured variable where the property has the same
name as the variable itself. This collection is exposed through the Variables property of the ScriptMain class. The
accessor property provides read-only or read/write permission to the value of the variable as appropriate. For
example, if you have added an integer variable named MyIntegerVariable to the ReadOnlyVariables list, you can
retrieve its value in your script by using the following code:
Dim myIntegerVariableValue As Integer = Me.Variables.MyIntegerVariable
You can also use the VariableDispenser property, accessed by calling Me.VariableDispenser , to work with variables
in the Script component. In this case you are not using the typed and named accessor properties for variables, but
accessing the variables directly. When using the VariableDispenser, you must handle both the locking semantics
and the casting of data types for variable values in your own code. You have to use the VariableDispenser property
instead of the named and typed accessor properties if you want to work with a variable that is not available at
design time but is created programmatically at run time.
See Also
Integration Services (SSIS) Variables
Use Variables in Packages
Connecting to Data Sources in the Script
Component
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A connection manager is a convenient unit that encapsulates and stores the information that is required to
connect to a data source of a particular type. For more information, see Integration Services (SSIS) Connections.
You can make existing connection managers available for access by the custom script in the source or destination
component by clicking the Add and Remove buttons on the Connection Managers page of the Script
Transformation Editor . However, you must write your own custom code to load or save your data, and possibly
to open and close the connection to the data source. For more information about the Connection Managers
page of the Script Transformation Editor , see Configuring the Script Component in the Script Component
Editor and Script Transformation Editor (Connection Managers Page).
The Script component creates a Connections collection class in the ComponentWrapper project item that
contains a strongly-typed accessor for each connection manager that has the same name as the connection
manager itself. This collection is exposed through the Connections property of the ScriptMain class. The
accessor property returns a reference to the connection manager as an instance of IDTSConnectionManager100.
For example, if you have added a connection manager named MyADONETConnection on the Connection Managers
page of the dialog box, you can obtain a reference to it in your script by adding the following code:
Dim myADONETConnectionManager As IDTSConnectionManager100 = _
Me.Connections.MyADONETConnection
NOTE
You must know the type of connection that is returned by the connection manager before you call AcquireConnection .
Because the Script task has Option Strict enabled, you must cast the connection, which is returned as type Object , to the
appropriate connection type before you can use it.
Next, you call the AcquireConnection method of the specific connection manager to obtain either the
underlying connection or the information that is required to connect to the data source. For example, you obtain a
reference to the System.Data.SqlConnection wrapped by an ADO.NET connection manager by using the
following code:
Dim myADOConnection As SqlConnection = _
CType(MyADONETConnectionManager.AcquireConnection(Nothing), SqlConnection)
In contrast, the same call to a flat file connection manager returns only the path and file name of the file data
source.
Dim myFlatFile As String = _
CType(MyFlatFileConnectionManager.AcquireConnection(Nothing), String)
You then must provide this path and file name to a System.IO.StreamReader or Streamwriter to read or write
the data in the flat file.
IMPORTANT
When you write managed code in a Script component, you cannot call the AcquireConnection method of connection
managers that return unmanaged objects, such as the OLE DB connection manager and the Excel connection manager.
However, you can read the ConnectionString property of these connection managers, and connect to the data source
directly in your code by using the connection string of an OLEDB connection from the System.Data.OleDb namespace.
If you need to call the AcquireConnection method of a connection manager that returns an unmanaged object, use an
ADO.NET connection manager. When you configure the ADO.NET connection manager to use an OLE DB provider, it
connects by using the .NET Framework Data Provider for OLE DB. In this case, the AcquireConnection method returns a
System.Data.OleDb.OleDbConnection instead of an unmanaged object. To configure an ADO.NET connection manager
for use with an Excel data source, select the Microsoft OLE DB Provider for Jet, specify an Excel workbook, and then enter
Excel 8.0 (for Excel 97 and later) as the value of Extended Proper ties on the All page of the Connection Manager
dialog box.
For more information about how to use connection managers with the script component, see Creating a Source
with the Script Component and Creating a Destination with the Script Component.
See Also
Integration Services (SSIS) Connections
Create Connection Managers
Raising Events in the Script Component
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Events provide a way to report errors, warnings, and other information, such as task progress or status, to the
containing package. The package provides event handlers for managing event notifications. The Script component
can raise events by calling methods on the ComponentMetaData property of the ScriptMain class. For more
information about how Integration Services packages handle events, see Integration Services (SSIS) Event
Handlers.
Events can be logged to any log provider that is enabled in the package. Log providers store information about
events in a data store. The Script component can also use the Log method to log information to a log provider
without raising an event. For more information about how to use the Log method, see the following section.
To raise an event, the Script task calls one of the following methods of the IDTSComponentMetaData100 interface
exposed by the ComponentMetaData property:
myMetaData = Me.ComponentMetaData
myMetaData.FireError(...)
See Also
Integration Services (SSIS) Event Handlers
Add an Event Handler to a Package
Logging in the Script Component
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Logging in Integration Services packages lets you save detailed information about execution progress, results, and
problems by recording predefined events or user-defined messages for later analysis. The Script component can
use the Log method of the ScriptMain class to log user-defined data. If logging is enabled, and the
ScriptComponentLogEntr y event is selected for logging on the Details tab of the Configure SSIS Logs dialog
box, a single call to the Log method stores the event information in all the log providers that have been configured
for the data flow task.
Here is a simple example of logging:
Dim bt(0) As Byte
0, _
bt)
NOTE
Although you can perform logging directly from your Script component, you may want to consider implementing events
rather than logging. When using events, not only can you enable the logging of event messages, but you can respond to the
event with default or user-defined event handlers.
For more information about logging, see Integration Services (SSIS) Logging.
See Also
Integration Services (SSIS) Logging
Developing Specific Types of Script Components
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Script component is a configurable tool that you can use in the data flow of a package to fill almost any
requirement that is not met by the sources, transformations, and destinations that are included with Integration
Services. This section contains Script component code samples that demonstrate the four options for configuring
the Script component:
As a source.
As a transformation with synchronous outputs.
As a transformation with asynchronous outputs.
As a destination.
For additional examples of the Script component, see Additional Script Component Examples.
In This Section
Creating a Source with the Script Component
Explains and demonstrates how to create a data flow source by using the Script component.
Creating a Synchronous Transformation with the Script Component
Explains and demonstrates how to create a data flow transformation with synchronous outputs by using the
Script component. This kind of transformation modifies rows of data in place as they pass through the
component.
Creating an Asynchronous Transformation with the Script Component
Explains and demonstrates how to create a data flow transformation with asynchronous outputs by using the
Script component. This kind of transformation has to read all rows of data before it can add more information,
such as calculated aggregates, to the data that passes through the component.
Creating a Destination with the Script Component
Explains and demonstrates how to create a data flow destination by using the Script component.
See Also
Comparing Scripting Solutions and Custom Objects
Developing Specific Types of Data Flow Components
Creating a Source with the Script Component
11/2/2020 • 12 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You use a source component in the data flow of an Integration Services package to load data from a data source to
pass on to downstream transformations and destinations. Ordinarily you connect to the data source through an
existing connection manager.
For an overview of the Script component, see Extending the Data Flow with the Script Component.
The Script component and the infrastructure code that it generates for you simplify significantly the process of
developing a custom data flow component. However, to understand how the Script component works, you may
find it useful to read through the steps that are involved in developing a custom data flow component. See the
section Developing a Custom Data Flow Component, especially the topic Developing a Custom Source
Component.
NOTE
To set the default script language for Script components and Script Tasks, use the Scripting language option on the
General page of the Options dialog box. For more information, see General Page.
NOTE
You can also use a non-zero ExclusionGroup property value with a single output when you do not want to output
all rows. In this case, however, you must explicitly call the DirectRowTo<outputbuffer> method for each row that
you want to send to the output.
You may want to assign a friendly name to the outputs. Later, you will refer to the outputs by their names in
your script, by using the typed accessor properties created for you in the auto-generated code.
Ordinarily multiple outputs in the same ExclusionGroup have the same output columns. However, if you
are creating a simulated error output, you may want to add more columns to store error information. For
information about how the data flow engine processes error rows, see Using Error Outputs in a Data Flow
Component. In the Script component, however, you must write your own code to fill the additional columns
with appropriate error information. For more information, see Simulating an Error Output for the Script
Component.
For more information about the Inputs and Outputs page of the Script Transformation Editor , see Script
Transformation Editor (Inputs and Outputs Page).
Adding Variables
If there are any existing variables whose values you want to use in your script, you can add them in the
ReadOnlyVariables and ReadWriteVariables property fields on the Script page of the Script
Transformation Editor .
When you enter multiple variables in the property fields, separate the variable names by commas. You can also
enter multiple variables by clicking the ellipsis (...) button next to the ReadOnlyVariables and
ReadWriteVariables property fields and selecting variables in the Select variables dialog box.
For general information about how to use variables with the Script component, see Using Variables in the Script
Component.
For more information about the Script page of the Script Transformation Editor , see Script Transformation
Editor (Script Page).
Scripting a Source Component in Code-Design Mode
After you have configured the metadata for your component, open the Microsoft Visual Studio Tools for
Applications (VSTA) IDE to code your custom script. To open VSTA, click Edit Script on the Script page of the
Script Transformation Editor . You can write your script by using either Microsoft Visual Basic or Microsoft
Visual C#, depending on the script language selected for the ScriptLanguage property.
For important information that applies to all kinds of components created by using the Script component, see
Coding and Debugging the Script Component.
Understanding the Auto -generated Code
When you open the VSTA IDE after creating and configuring a source component, the editable ScriptMain class
appears in the code editor. You write your custom code in the ScriptMain class.
The ScriptMain class includes a stub for the CreateNewOutputRows method. The CreateNewOutputRows is
the most important method in a source component.
If you open the Project Explorer window in VSTA, you can see that the Script component has also generated
read-only BufferWrapper and ComponentWrapper project items. The ScriptMain class inherits from
UserComponent class in the ComponentWrapper project item.
At run time, the data flow engine invokes the PrimeOutput method in the UserComponent class, which
overrides the PrimeOutput method of the ScriptComponent parent class. The PrimeOutput method in turn calls
the following methods:
1. The CreateNewOutputRows method, which you override in ScriptMain to add rows from the data
source to the output buffers, which are empty at first.
2. The FinishOutputs method, which is empty by default. Override this method in ScriptMain to perform
any processing that is required to complete the output.
3. The private MarkOutputsAsFinished method, which calls the SetEndOfRowset method of the ScriptBuffer
parent class to indicate to the data flow engine that the output is finished. You do not have to call
SetEndOfRowset explicitly in your own code.
Writing Your Custom Code
To finish creating a custom source component, you may want to write script in the following methods available in
the ScriptMain class.
1. Override the AcquireConnections method to connect to the external data source. Extract the connection
object, or the required connection information, from the connection manager.
2. Override the PreExecute method to load data, if you can load all the source data at the same time. For
example, you can execute a SqlCommand against an ADO.NET connection to a SQL Server database and
load all the source data at the same time into a SqlDataReader . If you must load the source data one row
at a time (for example, when reading a text file), you can load the data as you loop through rows in
CreateNewOutputRows .
3. Use the overridden CreateNewOutputRows method to add new rows to the empty output buffers and to
fill in the values of each column in the new output rows. Use the AddRow method of each output buffer to
add an empty new row, and then set the values of each column. Typically you copy values from the columns
loaded from the external source.
4. Override the PostExecute method to finish processing the data. For example, you can close the
SqlDataReader that you used to load data.
5. Override the ReleaseConnections method to disconnect from the external data source, if required.
Examples
The following examples demonstrate the custom code that is required in the ScriptMain class to create a source
component.
NOTE
These examples use the Person.Address table in the AdventureWorks sample database and pass its first and fourth
columns, the intAddressID and nvarchar(30)City columns, through the data flow. The same data is used in the source,
transformation, and destination samples in this section. Additional prerequisites and assumptions are documented for each
example.
NOTE
Be sure to change the data type of the City output column to DT_WSTR.
4. On the Connection Managers page, add or create the ADO.NET connection manager and give it a name
such as MyADONETConnection .
5. On the Script page, click Edit Script and enter the script that follows. Then close the script development
environment and the Script Transformation Editor .
6. Create and configure a destination component, such as a SQL Server destination, or the sample destination
component demonstrated in Creating a Destination with the Script Component, that expects the AddressID
and City columns. Then connect the source component to the destination. (You can connect a source
directly to a destination without any transformations.) You can create a destination table by running the
following Transact-SQL command in the AdventureWorks database:
connMgr = Me.Connections.MyADONETConnection
sqlConn = CType(connMgr.AcquireConnection(Nothing), SqlConnection)
End Sub
End Sub
Do While sqlReader.Read
With MyAddressOutputBuffer
.AddRow()
.AddressID = sqlReader.GetInt32(0)
.City = sqlReader.GetString(1)
End With
Loop
End Sub
sqlReader.Close()
End Sub
connMgr.ReleaseConnection(sqlConn)
End Sub
End Class
using System.Data.SqlClient;
public class ScriptMain:
UserComponent
{
IDTSConnectionManager100 connMgr;
SqlConnection sqlConn;
SqlDataReader sqlReader;
while (sqlReader.Read())
{
{
MyAddressOutputBuffer.AddRow();
MyAddressOutputBuffer.AddressID = sqlReader.GetInt32(0);
MyAddressOutputBuffer.City = sqlReader.GetString(1);
}
}
sqlReader.Close();
connMgr.ReleaseConnection(sqlConn);
End Sub
nextLine = textReader.ReadLine
Do While nextLine IsNot Nothing
columns = nextLine.Split(delimiters)
With MyAddressOutputBuffer
.AddRow()
.AddressID = columns(0)
.City = columns(3)
End With
nextLine = textReader.ReadLine
Loop
End Sub
End Sub
End Class
using System.IO;
public class ScriptMain:
UserComponent
{
private StreamReader textReader;
private string exportedAddressFile;
string nextLine;
string[] columns;
char[] delimiters;
delimiters = ",".ToCharArray();
nextLine = textReader.ReadLine();
while (nextLine != null)
{
columns = nextLine.Split(delimiters);
{
MyAddressOutputBuffer.AddRow();
MyAddressOutputBuffer.AddressID = columns[0];
MyAddressOutputBuffer.City = columns[3];
}
nextLine = textReader.ReadLine();
}
base.PostExecute();
textReader.Close();
See Also
Creating a Destination with the Script Component
Developing a Custom Source Component
Creating a Synchronous Transformation with the
Script Component
11/2/2020 • 11 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You use a transformation component in the data flow of an Integration Services package to modify and analyze
data as it passes from source to destination. A transformation with synchronous outputs processes each input
row as it passes through the component. A transformation with asynchronous outputs waits until it has received
all input rows to complete its processing. This topic discusses a synchronous transformation. For information
about asynchronous transformations, see Creating an Asynchronous Transformation with the Script Component.
For more information about the difference between synchronous and asynchronous components, see
Understanding Synchronous and Asynchronous Transformations.
For an overview of the Script component, see Extending the Data Flow with the Script Component.
The Script component and the infrastructure code that it generates for you simplify significantly the process of
developing a custom data flow component. However, to understand how the Script component works, you may
find it useful to read the steps that you must follow in developing a custom data flow component in the section
on Developing a Custom Data Flow Component, and especially Developing a Custom Transformation Component
with Synchronous Outputs.
NOTE
To set the default scripting language for the Script component, use the Scripting language option on the General page
of the Options dialog box. For more information, see eneral Page.
A data flow transformation component has one input, and supports one or more outputs. Configuring the input
and outputs for the component is one of the steps that you must complete in metadata design mode, by using
the Script Transformation Editor , before you write your custom script.
Configuring Input Columns
A transformation component has one input.
On the Input Columns page of the Script Transformation Editor, the column list shows the available
columns from the output of the upstream component in the data flow. Select the columns that you want to
transform or pass through. Mark any columns that you want to transform in place as Read/Write.
For more information about the Input Columns page of the Script Transformation Editor , see Script
Transformation Editor (Input Columns Page).
Configuring Inputs, Outputs, and Output Columns
A transformation component supports one or more outputs.
On the Inputs and Outputs page of the Script Transformation Editor , you can see that a single output has
been created, but the output has no columns. On this page of the editor, you may need or want to configure the
following items.
Create one or more additional outputs, such as a simulated error output for rows that contain unexpected
values. Use the Add Output and Remove Output buttons to manage the outputs of your synchronous
transformation component. All input rows are directed to all available outputs unless you indicate that you
intend to redirect each row to one output or the other. You indicate that you intend to redirect rows by
specifying a non-zero integer value for the ExclusionGroup property on the outputs. The specific integer
value entered in ExclusionGroup to identify the outputs is not significant, but you must use the same
integer consistently for the specified group of outputs.
NOTE
You can also use a non-zero ExclusionGroup property value with a single output when you do not want to
output all rows. However, in this case, you must explicitly call the DirectRowTo<outputbuffer> method for each
row that you want to send to the output.
Assign a more descriptive name to the input and outputs. The Script component uses these names to
generate the typed accessor properties that you will use to refer to the input and outputs in your script.
Leave columns as is for synchronous transformations. Typically a synchronous transformation does not
add columns to the data flow. Data is modified in place in the buffer, and the buffer is passed on to the next
component in the data flow. If this is the case, you do not have to add and configure output columns
explicitly on the transformation's outputs. The outputs appear in the editor without any explicitly defined
columns.
Add new columns to simulated error outputs for row-level errors. Ordinarily multiple outputs in the same
ExclusionGroup have the same set of output columns. However, if you are creating a simulated error
output, you may want to add more columns to contain error information. For information about how the
data flow engine processes error rows, see Using Error Outputs in a Data Flow Component. Note that in
the Script component you must write your own code to fill the additional columns with appropriate error
information. For more information, see Simulating an Error Output for the Script Component.
For more information about the Inputs and Outputs page of the Script Transformation Editor , see Script
Transformation Editor (Inputs and Outputs Page).
Adding Variables
If you want to use existing variables in your script, you can add them in the ReadOnlyVariables and
ReadWriteVariables property fields on the Script page of the Script Transformation Editor .
When you add multiple variables in the property fields, separate the variable names by commas. You can also
select multiple variables by clicking the ellipsis (...) button next to the ReadOnlyVariables and
ReadWriteVariables property fields, and then selecting the variables in the Select variables dialog box.
For general information about how to use variables with the Script component, see Using Variables in the Script
Component.
For more information about the Script page of the Script Transformation Editor , see Script Transformation
Editor (Script Page).
Row.City = UCase(Row.City)
Row.City = (Row.City).ToUpper();
To finish creating a custom synchronous transformation component, you use the overridden ProcessInputRow
method to transform the data in each row of the input buffer. The data flow engine passes this buffer, when full, to
the next component in the data flow.
Depending on your requirements, you may also want to write script in the PreExecute and PostExecute
methods, available in the ScriptMain class, to perform preliminary or final processing.
Working with Multiple Outputs
Directing input rows to one of two or more possible outputs does not require much more custom code than the
single-output scenario discussed earlier. For example, the two-output example shown later in this topic consists of
the following custom code:
Row.City = UCase(Row.City)
If Row.City = "REDMOND" Then
Row.DirectRowToMyRedmondAddresses()
Else
Row.DirectRowToMyOtherAddresses()
End If
Row.City = (Row.City).ToUpper();
if (Row.City=="REDMOND")
{
Row.DirectRowToMyRedmondAddresses();
}
else
{
Row.DirectRowToMyOtherAddresses();
}
In this example, the Script component generates the DirectRowTo<OutputBufferX> methods for you, based
on the names of the outputs that you configured. You can use similar code to direct error rows to a simulated
error output.
Examples
The examples here demonstrate the custom code that is required in the ScriptMain class to create a
synchronous transformation component.
NOTE
These examples use the Person.Address table in the AdventureWorks sample database and pass its first and fourth
columns, the intAddressID and nvarchar(30)City columns, through the data flow. The same data is used in the source,
transformation, and destination samples in this section. Additional prerequisites and assumptions are documented for each
example.
Row.City = UCase(Row.City)
End Sub
End Class
{
public override void MyAddressInput_ProcessInputRow(MyAddressInputBuffer Row)
{
Row.City = (Row.City).ToUpper();
Row.City = UCase(Row.City)
End Sub
End Class
Row.City = (Row.City).ToUpper();
if (Row.City == "REDMOND")
{
Row.DirectRowToMyRedmondAddresses();
}
else
{
Row.DirectRowToMyOtherAddresses();
}
}
}
See Also
Understanding Synchronous and Asynchronous Transformations
Creating an Asynchronous Transformation with the Script Component
Developing a Custom Transformation Component with Synchronous Outputs
Creating an Asynchronous Transformation with the
Script Component
11/2/2020 • 11 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You use a transformation component in the data flow of an Integration Services package to modify and analyze
data as it passes from source to destination. A transformation with synchronous outputs processes each input
row as it passes through the component. A transformation with asynchronous outputs may wait to complete its
processing until the transformation has received all input rows, or the transformation may output certain rows
before it has received all input rows. This topic discusses an asynchronous transformation. If your processing
requires a synchronous transformation, see Creating a Synchronous Transformation with the Script Component.
For more information about the differences between synchronous and asynchronous components, see
Understanding Synchronous and Asynchronous Transformations.
For an overview of the Script component, see Extending the Data Flow with the Script Component.
The Script component and the infrastructure code that it generates for you simplify the process of developing a
custom data flow component. However, to understand how the Script component works, you may find it useful to
read through the steps that you must follow in developing a custom data flow component in the Developing a
Custom Data Flow Component section, and especially Developing a Custom Transformation Component with
Synchronous Outputs.
NOTE
To set the default scripting language for the Script component, use the Scripting language option on the General page
of the Options dialog box. For more information, see General Page.
A data flow transformation component has one input and supports one or more outputs. Configuring the input
and outputs of your component is one of the steps that you must complete in metadata design mode, by using
the Script Transformation Editor , before you write your custom script.
Configuring Input Columns
A transformation component created by using the Script component has a single input.
On the Input Columns page of the Script Transformation Editor , the columns list shows the available
columns from the output of the upstream component in the data flow. Select the columns that you want to
transform or pass through. Mark any columns that you want to transform in place as Read/Write.
For more information about the Input Columns page of the Script Transformation Editor , see Script
Transformation Editor (Input Columns Page).
Configuring Inputs, Outputs, and Output Columns
A transformation component supports one or more outputs.
Frequently a transformation with asynchronous outputs has two outputs. For example, when you count the
number of addresses located in a specific city, you may want to pass the address data through to one output,
while sending the result of the aggregation to another output. The aggregation output also requires a new output
column.
On the Inputs and Outputs page of the Script Transformation Editor , you see that a single output has been
created by default, but no output columns have been created. On this page of the editor, you can configure the
following items:
You may want to create one or more additional outputs, such as an output for the result of an aggregation.
Use the Add Output and Remove Output buttons to manage the outputs of your asynchronous
transformation component. Set the SynchronousInputID property of each output to zero to indicate that
the output does not simply pass through data from an upstream component or transform it in place in the
existing rows and columns. It is this setting that makes the outputs asynchronous to the input.
You may want to assign a friendly name to the input and outputs. The Script component uses these names
to generate the typed accessor properties that you will use to refer to the input and outputs in your script.
Frequently an asynchronous transformation adds columns to the data flow. When the
SynchronousInputID property of an output is zero, indicating that the output does not simply pass
through data from an upstream component or transform it in place in the existing rows and columns, you
must add and configure output columns explicitly on the output. Output columns do not have to have the
same names as the input columns to which they are mapped.
You may want to add more columns to contain additional information. You must write your own code to fill
the additional columns with data. For information about reproducing the behavior of a standard error
output, see Simulating an Error Output for the Script Component.
For more information about the Inputs and Outputs page of the Script Transformation Editor , see Script
Transformation Editor (Inputs and Outputs Page).
Adding Variables
If there are any existing variables whose values you want to use in your script, you can add them in the
ReadOnlyVariables and ReadWriteVariables property fields on the Script page of the Script Transformation
Editor .
When you add multiple variables in the property fields, separate the variable names by commas. You can also
select multiple variables by clicking the ellipsis (...) button next to the ReadOnlyVariables and
ReadWriteVariables property fields, and then selecting the variables in the Select variables dialog box.
For general information about how to use variables with the Script component, see Using Variables in the Script
Component.
For more information about the Script page of the Script Transformation Editor , see Script Transformation
Editor (Script Page).
Example
This example demonstrates the custom code that is required in the ScriptMain class to create an asynchronous
transformation component.
NOTE
These examples use the Person.Address table in the AdventureWorks sample database and pass its first and fourth
columns, the intAddressID and nvarchar(30)City columns, through the data flow. The same data is used in the source,
transformation, and destination samples in this section. Additional prerequisites and assumptions are documented for each
example.
This example demonstrates an asynchronous transformation component with two outputs. This transformation
passes through the AddressID and City columns to one output, while it counts the number of addresses located
in a specific city (Redmond, Washington, U.S.A.), and then outputs the resulting value to a second output.
If you want to run this sample code, you must configure the package and the component as follows:
1. Add a new Script component to the Data Flow designer surface and configure it as a transformation.
2. Connect the output of a source or of another transformation to the new transformation component in the
designer. This output should provide data from the Person.Address table of the AdventureWorks
sample database that contains at least the AddressID and City columns.
3. Open the Script Transformation Editor . On the Input Columns page, select the AddressID and City
columns.
4. On the Inputs and Outputs page, add and configure the AddressID and City output columns on the
first output. Add a second output, and add an output column for the summary value on the second output.
Set the SynchronousInputID property of the first output to 0, because this example copies each input row
explicitly to the first output. The SynchronousInputID property of the newly-created output is already set to
0.
5. Rename the input, the outputs, and the new output column to give them more descriptive names. The
example uses MyAddressInput as the name of the input, MyAddressOutput and MySummar yOutput
for the outputs, and MyRedmondCount for the output column on the second output.
6. On the Script page, click Edit Script and enter the script that follows. Then close the script development
environment and the Script Transformation Editor .
7. Create and configure a destination component for the first output that expects the AddressID and City
columns, such as a SQL Server destination, or the sample destination component demonstrated in
Creating a Destination with the Script Component, . Then connect the first output of the transformation,
MyAddressOutput , to the destination component. You can create a destination table by running the
following Transact-SQL command in the AdventureWorks database:
CREATE TABLE [Person].[Address2]([AddressID] [int] NOT NULL,
[City] [nvarchar](30) NOT NULL)
8. Create and configure another destination component for the second output. Then connect the second
output of the transformation, MySummar yOutput , to the destination component. Because the second
output writes a single row with a single value, you can easily configure a destination with a Flat File
connection manager that connects to a new file that has a single column. In the example, this destination
column is named MyRedmondCount .
9. Run the sample.
MySummaryOutputBuffer.AddRow()
End Sub
While Buffer.NextRow()
MyAddressInput_ProcessInputRow(Buffer)
End While
If Buffer.EndOfRowset Then
MyAddressOutputBuffer.SetEndOfRowset()
MySummaryOutputBuffer.MyRedmondCount = myRedmondAddressCount
MySummaryOutputBuffer.SetEndOfRowset()
End If
End Sub
With MyAddressOutputBuffer
.AddRow()
.AddressID = Row.AddressID
.City = Row.City
End With
End Sub
End Class
public class ScriptMain:
UserComponent
{
private int myRedmondAddressCount;
MySummaryOutputBuffer.AddRow();
while (Buffer.NextRow())
{
MyAddressInput_ProcessInputRow(Buffer);
}
if (Buffer.EndOfRowset())
{
MyAddressOutputBuffer.SetEndOfRowset();
MySummaryOutputBuffer.MyRedmondCount = myRedmondAddressCount;
MySummaryOutputBuffer.SetEndOfRowset();
}
{
MyAddressOutputBuffer.AddRow();
MyAddressOutputBuffer.AddressID = Row.AddressID;
MyAddressOutputBuffer.City = Row.City;
}
if (Row.City.ToUpper() == "REDMOND")
{
myRedmondAddressCount += 1;
}
See Also
Understanding Synchronous and Asynchronous Transformations
Creating a Synchronous Transformation with the Script Component
Developing a Custom Transformation Component with Asynchronous Outputs
Creating a Destination with the Script Component
11/2/2020 • 10 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You use a destination component in the data flow of an Integration Services package to save data received from
upstream sources and transformations to a data source. Ordinarily the destination component connects to the
data source through an existing connection manager.
For an overview of the Script component, see Extending the Data Flow with the Script Component.
The Script component and the infrastructure code that it generates for you simplify significantly the process of
developing a custom data flow component. However, to understand how the Script component works, you may
find it useful to read through the steps for developing a custom data flow components in the Developing a
Custom Data Flow Component section, and especially Developing a Custom Destination Component.
NOTE
To set the default scripting language for the Script component, use the Scripting language option on the General page
of the Options dialog box. For more information, see General Page.
A data flow destination component has one input and no outputs. Configuring the input for the component is
one of the steps that you must complete in metadata design mode, by using the Script Transformation Editor ,
before you write your custom script.
Adding Connection Managers
Ordinarily a destination component uses an existing connection manager to connect to the data source to which
it saves data from the data flow. On the Connection Managers page of the Script Transformation Editor ,
click Add to add the appropriate connection manager.
However, a connection manager is just a convenient unit that encapsulates and stores the information that is
required to connect to a data source of a particular type. You must write your own custom code to load or save
your data, and possibly to open and close the connection to the data source.
For general information about how to use connection managers with the Script component, see Connecting to
Data Sources in the Script Component.
For more information about the Connection Managers page of the Script Transformation Editor , see Script
Transformation Editor (Connection Managers Page).
Configuring Inputs and Input Columns
A destination component has one input and no outputs.
On the Input Columns page of the Script Transformation Editor , the column list shows the available
columns from the output of the upstream component in the data flow. Select the columns that you want to save.
For more information about the Input Columns page of the Script Transformation Editor , see Script
Transformation Editor (Input Columns Page).
The Inputs and Outputs page of the Script Transformation Editor shows a single input, which you can
rename. You will refer to the input by its name in your script by using the accessor property created in the auto-
generated code.
For more information about the Inputs and Outputs page of the Script Transformation Editor , see Script
Transformation Editor (Inputs and Outputs Page).
Adding Variables
If you want to use existing variables in your script, you can add them in the ReadOnlyVariables and
ReadWriteVariables property fields on the Script page of the Script Transformation Editor .
When you add multiple variables in the property fields, separate the variable names by commas. You can also
select multiple variables by clicking the ellipsis (...) button next to the ReadOnlyVariables and
ReadWriteVariables property fields, and then selecting the variables in the Select variables dialog box.
For general information about how to use variables with the Script component, see Using Variables in the Script
Component.
For more information about the Script page of the Script Transformation Editor , see Script Transformation
Editor (Script Page).
Examples
The examples that follow demonstrate code that is required in the ScriptMain class to create a destination
component.
NOTE
These examples use the Person.Address table in the AdventureWorks sample database and pass its first and fourth
columns, the int AddressID and nvarchar(30)City columns, through the data flow. The same data is used in the source,
transformation, and destination samples in this section. Additional prerequisites and assumptions are documented for each
example.
3. Add a new Script component to the Data Flow designer surface and configure it as a destination.
4. Connect the output of an upstream source or transformation to the destination component in SSIS
Designer. (You can connect a source directly to a destination without any transformations.) This output
should provide data from the Person.Address table of the AdventureWorks sample database that
contains at least the AddressID and City columns.
5. Open the Script Transformation Editor . On the Input Columns page, select the AddressID and City
input columns.
6. On the Inputs and Outputs page, rename the input with a more descriptive name such as
MyAddressInput .
7. On the Connection Managers page, add or create the ADO.NET connection manager with a name such
as MyADONETConnectionManager .
8. On the Script page, click Edit Script and enter the script that follows. Then close the script development
environment.
9. Close the Script Transformation Editor and run the sample.
Imports System.Data.SqlClient
...
Public Class ScriptMain
Inherits UserComponent
connMgr = Me.Connections.MyADONETConnectionManager
sqlConn = CType(connMgr.AcquireConnection(Nothing), SqlConnection)
End Sub
End Sub
connMgr.ReleaseConnection(sqlConn)
End Sub
End Class
using System.Data.SqlClient;
public class ScriptMain:
UserComponent
{
IDTSConnectionManager100 connMgr;
SqlConnection sqlConn;
SqlCommand sqlCmd;
SqlParameter sqlParam;
connMgr = this.Connections.MyADONETConnectionManager;
sqlConn = (SqlConnection)connMgr.AcquireConnection(null);
connMgr.ReleaseConnection(sqlConn);
Imports System.IO
...
Public Class ScriptMain
Inherits UserComponent
End Sub
End Sub
With textWriter
If Not Row.AddressID_IsNull Then
.Write(Row.AddressID)
End If
.Write(columnDelimiter)
If Not Row.City_IsNull Then
.Write(Row.City)
End If
.WriteLine()
End With
End Sub
textWriter.Close()
End Sub
End Class
using System.IO;
public class ScriptMain:
UserComponent
{
string copiedAddressFile;
private StreamWriter textWriter;
private string columnDelimiter = ",";
{
if (!Row.AddressID_IsNull)
{
textWriter.Write(Row.AddressID);
}
textWriter.Write(columnDelimiter);
if (!Row.City_IsNull)
{
textWriter.Write(Row.City);
}
textWriter.WriteLine();
}
textWriter.Close();
See Also
Creating a Source with the Script Component
Developing a Custom Destination Component
Additional Script Component Examples
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Script component is a configurable tool that you can use in the data flow of a package to fill almost any
requirement that is not met by the sources, transformations, and destinations that are included with Integration
Services. This section contains Script component code samples that demonstrate the various types of functionality
that are available.
For samples that demonstrate how to configure the Script component as a basic source, transformation, or
destination, see Developing Specific Types of Script Components.
NOTE
If you want to create components that you can more easily reuse across multiple Data Flow tasks and multiple packages,
consider using the code in these Script component samples as the starting point for custom data flow components. For
more information, see Developing a Custom Data Flow Component.
In This Section
Simulating an Error Output for the Script Component
The Script component does not support a standard error output, but you can simulate a standard error output
with very little additional configuration and coding.
Enhancing an Error Output with the Script Component
Explains and demonstrates how to add additional information to a standard error output by using the Script
component.
Creating an ODBC Destination with the Script Component
Explains and demonstrates how to create an ODBC data flow destination by using the Script component.
Parsing Non-Standard Text File Formats with the Script Component
Explains and demonstrates how to parse two different non-standard text file formats into destination tables.
Creating an ODBC Destination with the Script
Component
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In SQL Server Integration Services, you typically save data to an ODBC destination by using an ADO.NET
destination and the .NET Framework Data Provider for ODBC. However, you can also create an ad hoc ODBC
destination for use in a single package. To create this ad hoc ODBC destination, you use the Script component as
shown in the following example.
NOTE
If you want to create a component that you can more easily reuse across multiple Data Flow tasks and multiple packages,
consider using the code in this Script component sample as the starting point for a custom data flow component. For more
information, see Developing a Custom Data Flow Component.
Example
The following example demonstrates how to create a destination component that uses an existing ODBC
connection manager to save data from the data flow into a Microsoft SQL Server table.
This example is a modified version of the custom ADO.NET destination that was demonstrated in the topic, Creating
a Destination with the Script Component. However, in this example, the custom ADO.NET destination has been
modified to work with an ODBC connection manager and save data to an ODBC destination. These modifications
also include the following changes:
You cannot call the AcquireConnection method of the ODBC connection manager from managed code,
because it returns a native object. Therefore, this sample uses the connection string of the connection
manager to connect to the data source directly by using the managed ODBC .NET Framework Data Provider.
The OdbcCommand expects positional parameters. The positions of the parameters are indicated by the
question marks (?) in the text of the command. (In contrast, a SqlCommand expects named parameters.)
This example uses the Person.Address table in the AdventureWorks sample database. The example passes the
first and fourth columns, the int AddressID and nvarchar(30) City columns, of this table through the data flow.
This same data is used in the source, transformation, and destination samples in the topic, Developing Specific
Types of Script Components.
To configure this Script Component example
1. Create an ODBC connection manager that connects to the AdventureWorks database.
2. Create a destination table by running the following Transact-SQL command in the AdventureWorks
database:
3. Add a new Script component to the Data Flow designer surface and configure it as a destination.
4. Connect the output of an upstream source or transformation to the destination component in SSIS Designer.
(You can connect a source directly to a destination without any transformations.) To ensure that this sample
works, the output of the upstream component must include at least the AddressID and City columns from
the Person.Address table of the AdventureWorks sample database.
5. Open the Script Transformation Editor . On the Input Columns page, select the AddressID and City
columns.
6. On the Inputs and Outputs page, rename the input with a more descriptive name such as
MyAddressInput .
7. On the Connection Managers page, add or create the ODBC connection manager with a descriptive name
such as MyODBCConnectionManager .
8. On the Script page, click Edit Script , and then enter the script shown below in the ScriptMain class.
9. Close the script development environment, close the Script Transformation Editor , and then run the
sample.
Imports System.Data.Odbc
...
Public Class ScriptMain
Inherits UserComponent
End Sub
End Sub
With odbcCmd
.Parameters("@addressid").Value = Row.AddressID
.Parameters("@city").Value = Row.City
.ExecuteNonQuery()
End With
End Sub
odbcConn.Close()
End Sub
End Class
using System.Data.Odbc;
...
public class ScriptMain :
UserComponent
{
OdbcConnection odbcConn;
OdbcCommand odbcCmd;
OdbcParameter odbcParam;
string connectionString;
connectionString = this.Connections.MyODBCConnectionManager.ConnectionString;
odbcConn = new OdbcConnection(connectionString);
odbcConn.Open();
{
odbcCmd.Parameters["@addressid"].Value = Row.AddressID;
odbcCmd.Parameters["@city"].Value = Row.City;
odbcCmd.ExecuteNonQuery();
}
odbcConn.Close();
}
}
See Also
Creating a Destination with the Script Component
Enhancing an Error Output with the Script
Component
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
By default, the two extra columns in an Integration Services error output, ErrorCode and ErrorColumn, contain
only numeric codes that represent an error number and the ID of the column in which the error occurred. These
numeric values may be of limited use without the corresponding error description and column name.
This topic describes how to add the error description and the column name to existing error output data in the
data flow by using the Script component. The example adds the error description that corresponds to a specific
predefined Integration Services error code by using the GetErrorDescription method of the
IDTSComponentMetaData100 interface, available through the ComponentMetaData property of the Script
component. Then the example adds the column name that corresponds to the captured lineage ID by using the
GetIdentificationStringByID method of the same interface.
NOTE
If you want to create a component that you can more easily reuse across multiple Data Flow tasks and multiple packages,
consider using the code in this Script component sample as the starting point for a custom data flow component. For more
information, see Developing a Custom Data Flow Component.
Example
The example shown here uses a Script component configured as a transformation to add the error description and
the column name to existing error output data in the data flow.
For more information about how to configure the Script component for use as a transformation in the data flow,
see Creating a Synchronous Transformation with the Script Component and Creating an Asynchronous
Transformation with the Script Component.
To configure this Script Component example
1. Before creating the new Script component, configure an upstream component in the data flow to redirect
rows to its error output when an error or truncation occurs. For testing purposes, you may want to
configure a component in a manner that ensures that errors will occur-for example, by configuring a
Lookup transformation between two tables where the lookup will fail.
2. Add a new Script component to the Data Flow designer surface and configure it as a transformation.
3. Connect the error output from the upstream component to the new Script component.
4. Open the Script Transformation Editor , and on the Script page, for the ScriptLanguage property,
select the script language.
5. Click Edit Script to open the Microsoft Visual Studio Tools for Applications (VSTA) IDE and add the sample
code shown below.
6. Close VSTA.
7. In the Script Transformation Editor, on the Input Columns page, select the ErrorCode and ErrorColumn
columns.
8. On the Inputs and Outputs page, add two new columns.
Add a new output column of type String named ErrorDescription . Increase the default length of
the new column to 255 to support long messages.
Add another new output column of type String named ColumnName . Increase the default length
of the new column to 255 to support long values.
9. Close the Script Transformation Editor.
10. Attach the output of the Script component to a suitable destination. A Flat File destination is the easiest to
configure for ad hoc testing.
11. Run the package.
Row.ErrorDescription = _
Me.ComponentMetaData.GetErrorDescription(Row.ErrorCode)
If Row.ErrorColumn = 0 Then
' 0 means no specific column is identified by ErrorColumn, this time.
Row.ColumnName = "Check the row for a violation of a foreign key constraint."
ELSE If Row.ErrorColumn = -1 Then
' -1 means you are using Table Lock for a Memory Optimised destination table which is not
supported.
Row.ColumnName = "Table lock is not compatible with Memory Optimised tables."
Else
Row.ColumnName = componentMetaData130.GetIdentificationStringByID(Row.ErrorColumn)
End If
End If
End Sub
End Class
public class ScriptMain: // C#
UserComponent
{
public override void Input0_ProcessInputRow(Input0Buffer Row)
{
Row.ErrorDescription = this.ComponentMetaData.GetErrorDescription(Row.ErrorCode);
See Also
Error Handling in Data
Using Error Outputs in a Data Flow Component
Creating a Synchronous Transformation with the Script Component
Parsing Non-Standard Text File Formats with the
Script Component
11/2/2020 • 8 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
When your source data is arranged in a non-standard format, you may find it more convenient to consolidate all
your parsing logic in a single script than to chain together multiple Integration Services transformations to achieve
the same result.
Example 1: Parsing Row-Delimited Records
Example 2: Splitting Parent and Child Records
NOTE
If you want to create a component that you can more easily reuse across multiple Data Flow tasks and multiple packages,
consider using the code in this Script component sample as the starting point for a custom data flow component. For more
information, see Developing a Custom Data Flow Component.
FirstName: Nancy
LastName: Davolio
Title: Sales Representative
City: Seattle
StateProvince: WA
FirstName: Andrew
LastName: Fuller
Title: Vice President, Sales
City: Tacoma
StateProvince: WA
FirstName: Steven
LastName: Buchanan
Title: Sales Manager
City: London
StateProvince:
4. Open SQL Server Data Tools and create a new Integration Services package named ParseRowDelim.dtsx.
5. Add a Flat File connection manager to the package, name it RowDelimitedData, and configure it to connect
to the rowdelimiteddata.txt file that you created in a previous step.
6. Add an OLE DB connection manager to the package and configure it to connect to the instance of SQL
Server and the database in which you created the destination table.
7. Add a Data Flow task to the package and click the Data Flow tab of SSIS Designer.
8. Add a Flat File Source to the data flow and configure it to use the RowDelimitedData connection manager.
On the Columns page of the Flat File Source Editor , select the single available external column.
9. Add a Script Component to the data flow and configure it as a transformation. Connect the output of the Flat
File Source to the Script Component.
10. Double-click the Script component to display the Script Transformation Editor .
11. On the Input Columns page of the Script Transformation Editor , select the single available input
column.
12. On the Inputs and Outputs page of the Script Transformation Editor , select Output 0 and set its
SynchronousInputID to None. Create 5 output columns, all of type string [DT_STR] with a length of 32:
FirstName
LastName
Title
City
StateProvince
13. On the Script page of the Script Transformation Editor , click Edit Script and enter the code shown in
the ScriptMain class of the example. Close the script development environment and the Script
Transformation Editor .
14. Add a SQL Server Destination to the data flow. Configure it to use the OLE DB connection manager and the
RowDelimitedData table. Connect the output of the Script Component to this destination.
15. Run the package. After the package has finished, examine the records in the SQL Server destination table.
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
End Sub
public override void Input0_ProcessInputRow(Input0Buffer Row)
{
string columnName;
string columnValue;
This sample is intended for demonstration purposes only. If you run the sample more than once, it inserts duplicate
key values into the destination table.
For more information about how to configure the Script component for use as a transformation in the data flow,
see Creating a Synchronous Transformation with the Script Component and Creating an Asynchronous
Transformation with the Script Component.
To configure this Script Component example
1. Create and save a text file named parentchilddata.txt that contains the following source data:
**********
PARENT 1 DATA
child 1 data
child 2 data
child 3 data
child 4 data
**********
PARENT 2 DATA
child 5 data
child 6 data
child 7 data
child 8 data
**********
2. Open SQL Server Management Studio and connect to an instance of SQL Server.
3. Select a destination database, and open a new query window. In the query window, execute the following
script to create the destination tables:
4. Open SQL Server Data Tools (SSDT) and create a new Integration Services package named
SplitParentChild.dtsx.
5. Add a Flat File connection manager to the package, name it ParentChildData, and configure it to connect to
the parentchilddata.txt file that you created in a previous step.
6. Add an OLE DB connection manager to the package and configure it to connect to the instance of SQL
Server and the database in which you created the destination tables.
7. Add a Data Flow task to the package and click the Data Flow tab of SSIS Designer.
8. Add a Flat File Source to the data flow and configure it to use the ParentChildData connection manager. On
the Columns page of the Flat File Source Editor , select the single available external column.
9. Add a Script Component to the data flow and configure it as a transformation. Connect the output of the Flat
File Source to the Script Component.
10. Double-click the Script component to display the Script Transformation Editor .
11. On the Input Columns page of the Script Transformation Editor , select the single available input
column.
12. On the Inputs and Outputs page of the Script Transformation Editor , select Output 0, rename it to
ParentRecords, and set its SynchronousInputID to None. Create 2 output columns:
ParentID (the primary key), of type four-byte signed integer [DT_I4]
ParentRecord, of type string [DT_STR] with a length of 32.
13. Create a second output and name it ChildRecords. The SynchronousInputID of the new output is already
set to None. Create 3 output columns:
ChildID (the primary key), of type four-byte signed integer [DT_I4]
ParentID (the foreign key), also of type four-byte signed integer [DT_I4]
ChildRecord, of type string [DT_STR] with a length of 50
14. On the Script page of the Script Transformation Editor , click Edit Script . In the ScriptMain class, enter
the code shown in the example. Close the script development environment and the Script Transformation
Editor .
15. Add a SQL Server Destination to the data flow. Connect the ParentRecords output of the Script Component
to this destination.Configure it to use the OLE DB connection manager and the Parents table.
16. Add another SQL Server Destination to the data flow. Connect the ChildRecords output of the Script
Component to this destination. Configure it to use the OLE DB connection manager and the Children table.
17. Run the package. After the package has finished, examine the parent and child records in the two SQL
Server destination tables.
End Sub
public override void Input0_ProcessInputRow(Input0Buffer Row)
{
int static_Input0_ProcessInputRow_childCounter = 0;
int static_Input0_ProcessInputRow_parentCounter = 0;
bool static_Input0_ProcessInputRow_nextRowIsParent = false;
See Also
Creating a Synchronous Transformation with the Script Component
Creating an Asynchronous Transformation with the Script Component
Simulating an Error Output for the Script
Component
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Although you cannot directly configure an output as an error output in the Script component for automatic
handling of error rows, you can reproduce the functionality of a built-in error output by creating an additional
output and using conditional logic in your script to direct rows to this output when appropriate. You may want to
imitate the behavior of a built-in error output by adding two additional output columns to receive the error
number and the ID of the column in which an error occurred.
If you want to add the error description that corresponds to a specific predefined Integration Services error code,
you can use the GetErrorDescription method of the IDTSComponentMetaData100 interface, available through the
Script component's ComponentMetaData property.
Example
The example shown here uses a Script component configured as a transformation that has two synchronous
outputs. The purpose of the Script component is to filter error rows from address data in the AdventureWorks
sample database. This fictitious example assumes that we are preparing a promotion for North American
customers and need to filter out addresses that are not located in North America.
To configure the example
1. Before creating the new Script component, create a connection manager and configure a data flow source
that selects address data from the AdventureWorks sample database. For this example, which only looks at
the CountryRegionName column, you can simply use the Person.vStateCountryProvinceRegion view, or
you can select data by joining the Person.Address, Person.StateProvince, and Person.CountryRegion tables.
2. Add a new Script component to the Data Flow designer surface and configure it as a transformation. Open
the Script Transformation Editor .
3. On the Script page, set the ScriptLanguage property to the script language that you want to use to code
the script.
4. Click Edit Script to open Microsoft Visual Studio Tools for Applications (VSTA).
5. In the Input0_ProcessInputRow method, type or paste the sample code shown below.
6. Close VSTA.
7. On the Input Columns page, select the columns that you want to process in the Script transformation.
This example uses only the CountryRegionName column. Available input columns that you leave
unselected will simply be passed through unchanged in the data flow.
8. On the Inputs and Outputs page, add a new, second output, and set its SynchronousInputID value to
the ID of the input, which is also the value of the SynchronousInputID property of the default output. Set
the ExclusionGroup property of both outputs to the same non-zero value (for example, 1) to indicate that
each row will be directed to only one of the two outputs. Give the new error output a distinctive name, such
as "MyErrorOutput."
9. Add additional output columns to the new error output to capture the desired error information, which
may include the error code, the ID of the column in which the error occurred, and possibly the error
description. This example creates the new columns, ErrorColumn and ErrorMessage. If you are catching
predefined Integration Services errors in your own implementation, make sure to add an ErrorCode
column for the error number.
10. Note the ID value of the input column or columns that the Script component will check for error conditions.
This example uses this column identifier to populate the ErrorColumn value.
11. Close the Script Transformation Editor.
12. Attach the outputs of the Script component to suitable destinations. Flat file destinations are the easiest to
configure for ad hoc testing.
13. Run the package.
Else
Row.DirectRowToOutput0()
End If
End Sub
if (Row.CountryRegionName!="Canada"&&Row.CountryRegionName!="United States")
{
Row.ErrorColumn = 68; // ID of CountryRegionName column
Row.ErrorMessage = "Address is not in North America.";
Row.DirectRowToMyErrorOutput();
}
else
{
Row.DirectRowToOutput0();
See Also
Error Handling in Data
Using Error Outputs in a Data Flow Component
Creating a Synchronous Transformation with the Script Component
Extending Packages with Custom Objects
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
If you find that the components provided in Integration Services do not meet your requirements, you can extend
the power of Integration Services by coding your own extensions. You have two discrete options for extending
your packages: you can write code within the powerful wrappers provided by the Script task and the Script
component, or you can create custom Integration Services extensions from scratch by deriving from the base
classes provided by the Integration Services object model.
This section explores the more advanced of the two options - extending packages with custom objects.
When your custom Integration Services solution requires more flexibility than the Script task and the Script
component provide, or when you need a component that you can reuse in multiple packages, the Integration
Services object model lets you build custom tasks, data flow components, and other package objects in managed
code from the ground up.
In This Section
Developing Custom Objects for Integration Services
Discusses the custom objects that can be created for Integration Services, and summarizes the essential steps and
settings.
Persisting Custom Objects
Discusses the default persistence of custom objects, and the process of implementing custom persistence.
Building, Deploying, and Debugging Custom Objects
Discusses the common approaches to building, deploying and testing the various types of custom objects.
Developing a Custom Task
Describes the process of coding a custom task.
Developing a Custom Connection Manager
Describes the process of coding a custom connection manager.
Developing a Custom Log Provider
Describes the process of coding a custom log provider.
Developing a Custom ForEach Enumerator
Describes the process of coding a custom enumerator.
Developing a Custom Data Flow Component
Discusses how to program custom data flow sources, transformations, and destinations.
Reference
Integration Services Error and Message Reference
Lists the predefined Integration Services error codes with their symbolic names and descriptions.
Related Sections
Extending Packages with Scripting
Discusses how to extend the control flow by using the Script task, or extend the data flow by using the Script
component.
Building Packages Programmatically
Describes how to create, configure, run, load, save, and manage Integration Services packages programmatically.
See Also
Comparing Scripting Solutions and Custom Objects
SQL Server Integration Services
Developing Custom Objects for Integration Services
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
When the control flow and data flow objects that are included with SQL Server Integration Services do not
completely meet your requirements, you can develop many types of custom objects on your own including:
Custom tasks .
Custom connection managers. Connect to external data sources that are not currently supported.
Custom log providers. Log package events in formats that are not currently supported.
Custom enumerators. Support iteration over a set of objects or values formats that are not currently
supported.
Custom data flow components. Can be configured as sources, transformations, or destinations.
The Integration Services object model facilitates this custom development with base classes that provide a
consistent and reliable framework for your custom implementation.
If you do not have to reuse custom functionality across multiple packages, the Script task and the Script
component give you the full power of a managed programming language with significantly less infrastructure
code to write. For more information, see Comparing Scripting Solutions and Custom Objects.
The following table provides an easy reference to the interfaces that you must implement when you develop a
custom user interface for each type of custom object. It also explains what the user sees if you choose not to
develop a custom user interface for your object, or if you fail to link your object to its user interface by using the
UITypeName property in the object's attribute. Although the powerful Advanced Editor may be satisfactory for a
data flow component, the Properties window is a less user-friendly solution for tasks and connection managers,
and a custom ForEach enumerator cannot be configured at all without a custom form.
External Resources
Blog entry, Visual Studio solution build process give a warning about indirect dependency on the .NET
Framework assembly due to SSIS references, on blogs.msdn.com.
See Also
Persisting Custom Objects
Building, Deploying, and Debugging Custom Objects
Persisting Custom Objects
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You do not need to implement custom persistence for the custom objects that you create as long as their
properties use only simple data types such as integer and string . The default implementation of persistence
saves the metadata for your object along with the values of all its properties.
However, if your object has properties that use complex data types, or if you want to perform custom processing
on property values as they are loaded and saved, you can implement the IDTSComponentPersist interface and its
LoadFromXML and SaveToXML methods. In these methods you load from (or save to) the XML definition of the
package an XML fragment that contains the properties of your object and their current values. The format of this
XML fragment is not defined; it must only be well-formed XML.
IMPORTANT
When you implement custom persistence, you must persist all the properties of the object, including both inherited
properties and custom properties that you have added.
Example
Although the Sql Server Custom Connection Manager Sample does not require custom persistence for its three
properties of type string , the following code shows an example of the custom code that would be required to
persist the connection manager and its properties. The class that contains this code must implement the
IDTSComponentPersist interface.
Private Const PERSIST_ELEMENT As String = "SqlConnectionManager"
Private Const PERSIST_SERVER As String = "Server"
Private Const PERSIST_DATABASE As String = "Database"
Private Const PERSIST_CONNECTIONSTRING As String = "ConnectionString"
' Load the three properties of the object from XML into variables.
For Each propertyNode In node.ChildNodes
Select Case propertyNode.Name
Case PERSIST_SERVER
_serverName = propertyNode.InnerText
Case PERSIST_DATABASE
_databaseName = propertyNode.InnerText
Case PERSIST_CONNECTIONSTRING
_connectionString = propertyNode.InnerText
End Select
Next
End Sub
' Create a new node to persist the object and its properties.
elementRoot = doc.CreateElement(String.Empty, PERSIST_ELEMENT, String.Empty)
' Save the three properties of the object from variables into XML.
propertyNode = doc.CreateNode(XmlNodeType.Element, PERSIST_SERVER, String.Empty)
propertyNode.InnerText = _serverName
elementRoot.AppendChild(propertyNode)
doc.AppendChild(elementRoot)
End Sub
private const string PERSIST_ELEMENT = "SqlConnectionManager";
private const string PERSIST_SERVER = "Server";
private const string PERSIST_DATABASE = "Database";
private const string PERSIST_CONNECTIONSTRING = "ConnectionString";
// Save the three properties of the object from variables into XML.
foreach (XmlNode propertyNode in node.ChildNodes)
{
switch (propertyNode.Name)
{
case PERSIST_SERVER:
_serverName = propertyNode.InnerText;
break;
case PERSIST_DATABASE:
_databaseName = propertyNode.InnerText;
break;
case PERSIST_CONNECTIONSTRING:
_connectionString = propertyNode.InnerText;
break;
}
}
XmlElement elementRoot;
XmlNode propertyNode;
// Save the three properties of the object from variables into XML.
propertyNode = doc.CreateNode(XmlNodeType.Element, PERSIST_SERVER, String.Empty);
propertyNode.InnerText = _serverName;
elementRoot.AppendChild(propertyNode);
doc.AppendChild(elementRoot);
See Also
Developing Custom Objects for Integration Services
Building, Deploying, and Debugging Custom Objects
Building, Deploying, and Debugging Custom
Objects
11/2/2020 • 8 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
After you have written the code for a custom object for Integration Services, you must build the assembly,
deploy it, and integrate it into SSIS Designer to make it available for use in packages, and test and debug it.
NOTE
For info about how to deploy custom components to work well with the multi-version support in SQL Server Data Tools,
see Getting your SSIS custom extensions to be supported by the multi-version support of SSDT 2015 for SQL Server
2016.
Task Tasks
NOTE
Assemblies are copied to these folders to support the enumeration of available tasks, connection managers, and so on.
Therefore you do not have to deploy assemblies that contain only the custom user interface for custom objects to these
folders.
You must close and reopen SSIS Designer after you install a new version of your custom object. If you have
installed earlier versions of your custom object in the global assembly cache, you must remove them before
installing the new version. To uninstall an assembly, run gacutil.exe and specify the assembly name with the
/u option.
For more information about the global assembly cache, see Global Assembly Cache Tool (Gactutil.exe) in the
.NET Framework Tools.
See Also
Developing Custom Objects for Integration Services
Persisting Custom Objects
Troubleshooting Tools for Package Development
Support multi-targeting in your custom components
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You can now use SSIS Designer in SQL Server Data Tools (SSDT) to create, maintain, and run packages that target
SQL Server 2016, SQL Server 2014, or SQL Server 2012. To get SSDT for Visual Studio 2015, see Download Latest
SQL Server Data Tools.
In Solution Explorer, right-click on an Integration Services project and select Proper ties to open the property
pages for the project. On the General tab of Configuration Proper ties , select the TargetSer verVersion
property, and then choose SQL Server 2016, SQL Server 2014, or SQL Server 2012.
if (TargetServerVersion == DTSTargetServerVersion.SQLServer2012)
{
// Add logic to downgrade from SQL Server 2016 to SQL Server 2012.
}
}
if (targetServerVersion == DTSTargetServerVersion.DTSTSV_SQLSERVER2012)
{
// Add logic to downgrade from SQL Server 2016 to SQL Server 2012.
ComponentMetaData.Version = 6;
}
}
Common errors
InvalidCastException
Error message. Unable to cast COM object of type 'System.__ComObject' to interface type
'Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSComponentMetaData100'. This operation failed because the
QueryInterface call on the COM component for the interface with IID '{BE8C48A3-155B-4810-BA5C-
BDF68A659E9E}' failed due to the following error: No such interface supported (Exception from HRESULT:
0x80004002 (E_NOINTERFACE)). (Microsoft.SqlServer.DTSPipelineWrap).
Solution. If your custom extension references SSIS interop assemblies such as
Microsoft.SqlServer.DTSPipelineWrap or Microsoft.SqlServer.DTSRuntimeWrap, set the value of the Embed
Interop Types property to False .
Unable to load some types when target version is SQL Server 2012
This issue affects certain types such as IErrorReportingService or IUserPromptService.
Error message (example). Could not load type 'Microsoft.DataWarehouse.Design.IErrorReportingService' from
assembly 'Microsoft.DataWarehouse, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'.
Workaround. Use a MessageBox instead of these interfaces when the target version is SQL Server 2012.
Developing a Custom Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services uses tasks to perform units of work in support of the extraction, transformation, and
loading of data. Integration Services includes a variety of tasks that perform the most frequently used actions,
from executing an SQL statement to downloading a file from an FTP site. If the included tasks and supported
actions do not completely meet your requirements, you can create a custom task.
To create a custom task, you have to create a class that inherits from the Microsoft.SqlServer.Dts.Runtime.Task
base class, apply the DtsTaskAttribute attribute to your new class, and override the important methods and
properties of the base class, including the Execute method.
In This Section
This section describes how to create, configure, and code a custom task and its optional custom user interface.
Creating a Custom Task
Describes the first step, which is creating the custom task.
Coding a Custom Task
Describes how to code the principal methods of a custom task.
Connecting to Data Sources in a Custom Task
Describes how to connect a custom task to a data source.
Raising and Defining Events in a Custom Task
Describes how to raise events and define custom events from the custom task.
Adding Support for Debugging in a Custom Task
Describes how to create breakpoint targets in the custom task.
Developing a User Interface for a Custom Task
Describes how to create a user interface that shows in SSIS Designer to configure properties on the custom
task.
Related Sections
Information Common to all Custom Objects
For information that is common to all the type of custom objects that you can create in Integration Services,
see the following topics:
Developing Custom Objects for Integration Services
Describes the basic steps in implementing all kinds of custom objects for Integration Services.
Persisting Custom Objects
Describes custom persistence and explains when it is necessary.
Building, Deploying, and Debugging Custom Objects
Describes the techniques for building, signing, deploying, and debugging custom objects.
Information about Other Custom Objects
For information about the other types of custom objects that you can create in Integration Services, see the
following topics:
Developing a Custom Connection Manager
Discusses how to program custom connection managers.
Developing a Custom Log Provider
Discusses how to program custom log providers.
Developing a Custom ForEach Enumerator
Discusses how to program custom enumerators.
Developing a Custom Data Flow Component
Discusses how to program custom data flow sources, transformations, and destinations.
See Also
Extending the Package with the Script Task
Comparing Scripting Solutions and Custom Objects
Creating a Custom Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The steps involved in creating a custom task are similar to the steps for creating any other custom object for
Integration Services:
Create a new class that inherits from the base class. For a task, the base class is
Microsoft.SqlServer.Dts.Runtime.Task.
Apply the attribute that identifies the type of object to the class. For a task, the attribute is DtsTaskAttribute.
Override the implementation of the base class's methods and properties. For a task, these include the
Validate and Execute methods.
Optionally, develop a custom user interface. For a task, this requires a class that implements the IDtsTaskUI
interface.
Imports System
Imports Microsoft.SqlServer.Dts.Runtime
<DtsTask(DisplayName:="MyTask", _
IconResource:="MyTask.MyTaskIcon.ico", _
UITypeName:="My Custom Task," & _
"Version=1.0.0.0,Culture=Neutral," & _
"PublicKeyToken=12345abc6789de01", _
TaskType:="PackageMaintenance", _
TaskContact:="MyTask; company name; any other information", _
RequiredProductLevel:=DTSProductLevel.None)> _
Public Class MyTask
Inherits Task
See Also
Creating a Custom Task
Coding a Custom Task
Developing a User Interface for a Custom Task
Coding a Custom Task
11/2/2020 • 9 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
After you have created a class that inherits from the Microsoft.SqlServer.Dts.Runtime.Task base class, and applied
the DtsTaskAttribute attribute to the class, you must override the implementation of the properties and methods of
the base class to provide your custom functionality.
using System;
using Microsoft.SqlServer.Dts.Runtime;
Try
If Me._userName = "" Then
' Raise an OnError event.
events.FireError(0, "SampleTask", "The UserName property must be configured.", "", 0)
' Fail validation.
Return DTSExecResult.Failure
End If
' Return success.
Return DTSExecResult.Success
Catch exception As System.Exception
' Capture exceptions, post an error, and fail validation.
events.FireError(0, "Sampletask", exception.Message, "", 0)
Return DTSExecResult.Failure
End Try
End Function
End Class
PA RA M ET ER DESC RIP T IO N
VariableDispenser Contains the variables available to the task. The tasks use
variables through the VariableDispenser; the tasks do not use
variables directly. The variable dispenser locks and unlocks
variables, and prevents deadlocks or overwrites.
IDTSComponentEvents Contains the methods called by the task to raise events to the
run-time engine.
Object Contains the transaction object that the container is a part of,
if any. This value is passed as a parameter to the
AcquireConnection method of a ConnectionManager object.
Try
If Me._fileName = "" Then
events.FireWarning(0, "SampleTask", "No file specified.", "", 0)
Me._fileDeleted = False
Else
If System.IO.File.Exists(Me._fileName) Then
System.IO.File.Delete(Me._fileName)
Me._fileDeleted = True
Else
Me._fileDeleted = False
End If
End If
Return DTSExecResult.Success
Catch exception As System.Exception
' Capture the exception and post an error.
events.FireError(0, "Sampletask", exception.Message, "", 0)
Return DTSExecResult.Failure
End Try
End Function
End Class
See Also
Creating a Custom Task
Coding a Custom Task
Developing a User Interface for a Custom Task
Connecting to Data Sources in a Custom Task
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Tasks connect to external data sources to retrieve or save data by using a connection manager. At design time, a
connection manager represents a logical connection, and describes key information such as the server name and
any authentication properties. At run time, tasks call the AcquireConnection method of the connection manager to
establish the physical connection to the data source.
Because a package can contain many tasks, each of which may have connections to different data sources, the
package tracks all the connection managers in a collection, the Connections collection. Tasks use the collection in
their package to find the connection manager that they will use during validation and execution. The Connections
collection is the first parameter to the Validate and Execute methods.
You can prevent the task from using the wrong connection manager by displaying the ConnectionManager objects
from the collection to the user, by using a dialog box or drop-down list in the graphical user interface. This gives
the user a way to select from among only those ConnectionManager objects of the appropriate type that are
contained in the package.
Tasks call the AcquireConnection method to establish the physical connection to the data source. The method
returns the underlying connection object that can then be used by the task. Because the connection manager
isolates the implementation details of the underlying connection object from the task, the task only has to call the
AcquireConnection method to establish the connection, and does not have to be concerned with other aspects of
the connection.
Example
The following sample code demonstrates validation of the ConnectionManager name in the Validate and Execute
methods, and shows how to use the AcquireConnection method to establish the physical connection in the Execute
method.
private string connectionManagerName = "";
End Function
Try
Dim cm As ConnectionManager = connections(Me._connectionManagerName)
Dim connection As Object = cm.AcquireConnection(transaction)
Return DTSExecResult.Success
Catch exception As System.Exception
componentEvents.FireError(0, "SampleTask", exception.Message, "", 0)
Return DTSExecResult.Failure
End Try
End Function
See Also
Integration Services (SSIS) Connections
Create Connection Managers
Raising and Defining Events in a Custom Task
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Integration Services run-time engine provides a collection of events that provide status on the progress of a
task as the task is validated and executed. The IDTSComponentEvents interface defines these events, and is
provided to tasks as a parameter to the Validate and Execute methods.
There is another set of events, which are defined in the IDTSEvents interface, that are raised on behalf of the task by
the TaskHost. The TaskHost raises events that occur before and after validation and execution, whereas the task
raises the events that occur during execution and validation.
The following code sample shows the InitializeTask method of a custom task, where two custom events are
created and their properties are set. The new events are then added to the EventInfos collection.
The first custom event has an eventName of "OnBeforeIncrement " and description of "Fires after the initial
value is updated." The next parameter, the true value, indicates that this event should allow an event handler
container to be created to handle the event. The event handler is a container that provides structure in a package
and services to tasks, like other containers such as the package, Sequence, ForLoop, and ForEachLoop. When the
allowEventHandlers parameter is true , DtsEventHandler objects are created for the event. Any parameters that
were defined for the event are now available to the DtsEventHandler in the variables collection of the
DtsEventHandler.
public override void InitializeTask(Connections connections,
VariableDispenser variables, IDTSInfoEvents events,
IDTSLogging log, EventInfos eventInfos,
LogEntryInfos logEntryInfos, ObjectReferenceTracker refTracker)
{
this.eventInfos = eventInfos;
string[] paramNames = new string[1];
TypeCode[] paramTypes = new TypeCode[1]{TypeCode.Int32};
string[] paramDescriptions = new string[1];
paramNames[0] = "InitialValue";
paramDescriptions[0] = "The value before it is incremented.";
this.eventInfos.Add("OnBeforeIncrement",
"Fires before the task increments the value.",
true,paramNames,paramTypes,paramDescriptions);
this.onBeforeIncrement = this.eventInfos["OnBeforeIncrement"];
Me.eventInfos = eventInfos
paramNames(0) = "InitialValue"
paramDescriptions(0) = "The value before it is incremented."
Me.eventInfos.Add("OnBeforeIncrement", _
"Fires before the task increments the value.", _
True, paramNames, paramTypes, paramDescriptions)
Me.onBeforeIncrement = Me.eventInfos("OnBeforeIncrement")
End Sub
componentEvents.FireCustomEvent(this.onBeforeIncrement.Name,
this.onBeforeIncrement.Description, ref arguments,
null, ref bFireOnBeforeIncrement);
componentEvents.FireCustomEvent(Me.onBeforeIncrement.Name, _
Me.onBeforeIncrement.Description, arguments, _
Nothing, bFireOnBeforeIncrement)
Sample
The following example shows a task that defines a custom event in the InitializeTask method, adds the custom
event to the EventInfos collection, and then raises the custom event during its Execute method by calling the
FireCustomEvent method.
[DtsTask(DisplayName = "CustomEventTask")]
public class CustomEventTask : Task
{
public override DTSExecResult Execute(Connections connections,
VariableDispenser variableDispenser, IDTSComponentEvents componentEvents,
IDTSLogging log, object transaction)
{
bool fireAgain;
object[] args = new object[1] { "The value of the parameter." };
componentEvents.FireCustomEvent( "MyCustomEvent",
"Firing the custom event.", ref args,
"CustomEventTask" , ref fireAgain );
return DTSExecResult.Success;
}
eventInfos.Add("MyCustomEvent",
"Fires when my interesting event happens.",
true, names, types, descriptions);
}
}
<DtsTask(DisplayName = "CustomEventTask")> _
Public Class CustomEventTask
Inherits Task
Public Overrides Function Execute(ByVal connections As Connections, _
ByVal variableDispenser As VariableDispenser, _
ByVal componentEvents As IDTSComponentEvents, _
ByVal log As IDTSLogging, ByVal transaction As Object) _
As DTSExecResult
componentEvents.FireCustomEvent("MyCustomEvent", _
"Firing the custom event.", args, _
"CustomEventTask" , fireAgain)
Return DTSExecResult.Success
End Function
eventInfos.Add("MyCustomEvent", _
"Fires when my interesting event happens.", _
True, names, types, descriptions)
End Sub
End Class
See Also
Integration Services (SSIS) Event Handlers
Add an Event Handler to a Package
Adding Support for Debugging in a Custom Task
11/2/2020 • 9 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Integration Services run-time engine enables packages, tasks, and other types of containers to be suspended
during execution by using breakpoints. The use of breakpoints lets you review and correct errors that prevent your
application or tasks from running correctly. The breakpoint architecture enables the client to evaluate the run-time
value of objects in the package at defined points of execution while task processing is suspended.
Custom task developers can use this architecture to create custom breakpoint targets by using the
IDTSBreakpointSite interface, and its parent interface, IDTSSuspend. The IDTSBreakpointSite interface defines the
interaction between the run-time engine and the task for creating and managing custom breakpoint sites or
targets. The IDTSSuspend interface provides methods and properties that are called by the run-time engine to
notify the task to suspend or resume its execution.
A breakpoint site or target is a point in the execution of the task where processing can be suspended. Users select
from available breakpoint sites in the Set Breakpoints dialog box. For example, in addition to the default
breakpoint options, the Foreach Loop Container offers the "Break at the beginning of every iteration of the loop"
option.
When a task reaches a breakpoint target during execution, it evaluates the breakpoint target to determine whether
a breakpoint is enabled. This indicates that the user wants execution to stop at that breakpoint. If the breakpoint is
enabled, the task raises the OnBreakpointHit event to the run-time engine. The run-time engine responds to the
event by calling the Suspend method of each task that is currently running in the package. Execution of the task
resumes when the runtime calls the ResumeExecution method of the suspended task.
Tasks that do not use breakpoints should still implement the IDTSBreakpointSite and IDTSSuspend interfaces. This
ensures that the task is suspended correctly when other objects in the package raise OnBreakpointHit events.
End Sub
End Function
IDTSSuspend Interface
The IDTSSuspend interface defines the methods that are called by the run-time engine when it pauses or resumes
execution of a task. The IDTSSuspend interface is implemented by the IDTSBreakpointSite interface, and its
Suspend and ResumeExecution methods are usually overridden by the custom task. When the run-time engine
receives an OnBreakpointHit event from a task, it calls the Suspend method of each running task, notifying the
tasks to pause. When the client resumes execution, the run-time engine calls the ResumeExecution method of the
tasks that are suspended.
Suspending and resuming task execution involves pausing and resuming the task's execution thread. In managed
code, you do this using the ManualResetEvent class in System.Threading namespace of the .NET Framework.
The following code sample demonstrates suspension and resumption of task execution. Notice that the Execute
method has changed from the previous code sample, and the execution thread is paused when firing the
breakpoint.
if (!succeeded)
throw new Exception("Synchronization object failed.");
}
public bool SuspendRequired
{
get {return m_suspendRequired != 0;}
set
{
// This lock is also taken by Suspend().
// This lock is also taken by Suspend().
// Because it is possible for the package to be
// suspended and resumed in quick succession,
// this property might be set before
// the actual Suspend() call.
// Without the lock, the Suspend() might reset the canExecute
// event after we set it to abort the suspension.
lock (this)
{
Interlocked.Exchange(ref m_suspendRequired, value ? 1 : 0);
if (!value)
ResumeExecution();
}
}
}
public void ResumeExecution()
{
ChangeEvent( m_canExecute,true );
}
public void Suspend()
{
// This lock is also taken by the set SuspendRequired method.
// It prevents this call from overriding an
// aborted suspension. See comments in set SuspendRequired.
lock (this)
{
// If a Suspend is required, do it.
if (m_suspendRequired != 0)
ChangeEvent(m_canExecute, false);
}
// We can't return from Suspend until the task is "suspended".
// This can happen one of two ways:
// the m_suspended event occurs, indicating that the execute thread
// has suspended, or the canExecute flag is set,
// indicating that a suspend is no longer required.
WaitHandle [] suspendOperationComplete = {m_suspended, m_canExecute};
WaitHandle.WaitAny(suspendOperationComplete);
}
End Function
End Sub
End Sub
End Sub
End Sub
See Also
Debugging Control Flow
Developing a User Interface for a Custom Task
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Integration Services object model provides custom task developers the ability to easily create a custom user
interface for a task that can then be integrated and displayed in SQL Server Data Tools (SSDT). The user interface
can provide helpful information to the user in SSIS Designer, and guide users to correctly configure the properties
and settings of the custom task.
Developing a custom user interface for a task involves using two important classes. The following table describes
those classes.
C L A SS DESC RIP T IO N
IDtsTaskUI An interface used by the task to associate the task with its
custom user interface.
This section describes the role of the DtsTaskAttribute attribute and the IDtsTaskUI interface when you are
developing a user interface for a custom task, and provides details about how to create, integrate, deploy, and
debug the task within SSIS Designer.
The SSIS Designer provides multiple entry points to the user interface for the task: the user can select Edit on the
shortcut menu, double-click the task, or click the Show Editor link at the bottom of the property sheet. When the
user accesses one of these entry points, SSIS Designer locates and loads the assembly that contains the user
interface for the task. The user interface for the task is responsible for creating the properties dialog box that is
displayed to the user in SQL Server Data Tools (SSDT).
A task and its user interface are separate entities. They should be implemented in separate assemblies to reduce
localization, deployment, and maintenance work. The task DLL does not load, call, or generally contain any
knowledge of its user interface, except for the information that is contained in the DtsTaskAttribute attribute values
coded in the task. This is the only way that a task and its user interface are associated.
UITypeName The type name of the assembly that is used by SSIS Designer
to load the assembly. This property is used to find the user
interface assembly for the task.
The following code example shows the DtsTaskAttribute as it would look, coded above the class definition.
using System;
using Microsoft.SqlServer.Dts.Runtime;
namespace Microsoft.SSIS.Samples
{
[DtsTask
(
DisplayName = "MyTask",
IconResource = "MyTask.MyTaskIcon.ico",
UITypeName = "My Custom Task," +
"Version=1.0.0.0," +
"Culture = Neutral," +
"PublicKeyToken = 12345abc6789de01",
TaskType = "PackageMaintenance",
TaskContact = "MyTask; company name; any other information",
RequiredProductLevel = DTSProductLevel.None
)]
public class MyTask : Task
{
// Your code here.
}
}
Imports System
Imports Microsoft.SqlServer.Dts.Runtime
<DtsTask(DisplayName:="MyTask", _
IconResource:="MyTask.MyTaskIcon.ico", _
UITypeName:="My Custom Task," & _
"Version=1.0.0.0,Culture=Neutral," & _
"PublicKeyToken=12345abc6789de01", _
TaskType:="PackageMaintenance", _
TaskContact:="MyTask; company name; any other information", _
RequiredProductLevel:=DTSProductLevel.None)> _
Public Class MyTask
Inherits Task
The SSIS Designer uses the UITypeName property of the attribute that includes the assembly name, type name,
version, culture, and public key token, to locate the assembly in the Global Assembly Cache (GAC) and load it for
use by the designer.
After the assembly has been located, SSIS Designer uses the other properties in the attribute to display additional
information about the task in SSIS Designer, such as the name, icon, and description of the task.
The DisplayName, Description, and IconResource properties specify how the task is presented to the user. The
IconResource property contains the resource ID of the icon embedded in the user interface assembly. The designer
loads the icon resource by ID from the assembly, and displays it next to the task name in the toolbox and on the
designer surface when the task is added to a package. If a task does not provide an icon resource, the designer
uses a default icon for the task.
namespace Sample
{
public class HelloWorldTaskUI : IDtsTaskUI
{
TaskHost taskHost;
Connections connections;
public void Initialize(TaskHost taskHost, IServiceProvider serviceProvider)
{
this.taskHost = taskHost;
IDtsConnectionService cs = serviceProvider.GetService
( typeof( IDtsConnectionService ) ) as IDtsConnectionService;
this.connections = cs.GetConnections();
}
public ContainerControl GetView()
{
return new HelloWorldTaskForm(this.taskHost, this.connections);
}
public void Delete(IWin32Window parentWindow)
{
}
public void New(IWin32Window parentWindow)
{
}
}
}
Imports System
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.SqlServer.Dts.Runtime.Design
Imports System.Windows.Forms
Dim cs As IDtsConnectionService
Me.taskHost = taskHost
cs = DirectCast(serviceProvider.GetService(GetType(IDtsConnectionService)), IDtsConnectionService)
Me.connections = cs.GetConnections()
End Sub
End Function
End Sub
End Sub
End Class
See Also
Creating a Custom Task
Coding a Custom Task
Developing a User Interface for a Custom Task
Developing a Custom Connection Manager
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services uses connection managers to encapsulate the information needed to connect to an external
data source. Integration Services includes a variety of connection managers that support connections to the most
commonly used data sources, from enterprise databases to text files and Excel worksheets. If the connection
managers and external data sources supported by Integration Services do not entirely meet your requirements,
you can create a custom connection manager.
To create a custom connection manager, you have to create a class that inherits from the ConnectionManagerBase
base class, apply the DtsConnectionAttribute attribute to your new class, and override the important methods and
properties of the base class, including the ConnectionString property and the AcquireConnection method.
IMPORTANT
Most of the tasks, sources, and destinations that have been built into Integration Services work only with specific types of
built-in connection managers. Before developing a custom connection manager for use with built-in tasks and components,
check whether those components restrict the list of available connection managers to those of a specific type. If your
solution requires a custom connection manager, you might also have to develop a custom task, or a custom source or
destination, for use with the connection manager.
In This Section
This section describes how to create, configure, and code a custom connection manager and its optional custom
user interface. The code snippets shown in this section are drawn from the Sql Server Custom Connection
Manager Sample.
Creating a Custom Connection Manager
Describes how to create the classes for a custom connection manager project.
Coding a Custom Connection Manager
Describes how to implement a custom connection manager by overriding the methods and properties of the base
class.
Developing a User Interface for a Custom Connection Manager
Describes how to implement the user interface class and the form that is used to configure the custom connection
manager.
Related Sections
Information Common to all Custom Objects
For information that is common to all the type of custom objects that you can create in Integration Services, see
the following topics:
Developing Custom Objects for Integration Services
Describes the basic steps in implementing all types of custom objects for Integration Services.
Persisting Custom Objects
Describes custom persistence and explains when it is necessary.
Building, Deploying, and Debugging Custom Objects
Describes the techniques for building, signing, deploying, and debugging custom objects.
Information about Other Custom Objects
For information on the other types of custom objects that you can create in Integration Services, see the following
topics:
Developing a Custom Task
Discusses how to program custom tasks.
Developing a Custom Log Provider
Discusses how to program custom log providers.
Developing a Custom ForEach Enumerator
Discusses how to program custom enumerators.
Developing a Custom Data Flow Component
Discusses how to program custom data flow sources, transformations, and destinations.
Creating a Custom Connection Manager
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The steps that you must follow to create a custom connection manager are similar to the steps for creating any
other custom object for Integration Services:
Create a new class that inherits from the base class. For a connection manager, the base class is
ConnectionManagerBase.
Apply the attribute that identifies the type of object to the class. For a connection manager, the attribute is
DtsConnectionAttribute.
Override the implementation of the methods and properties of the base class. For a connection manager,
these include the ConnectionString property and the AcquireConnection and ReleaseConnection methods.
Optionally, develop a custom user interface. For a connection manager, this requires a class that implements
the IDtsConnectionManagerUI interface.
NOTE
Most of the tasks, sources, and destinations that have been built into Integration Services work only with specific types of
built-in connection managers. Therefore, these samples cannot be tested with the built-in tasks and components.
[DtsConnection(ConnectionType = "SQLCS",
DisplayName = "SqlConnectionManager (CS)",
Description = "Connection manager for Sql Server",
UITypeName = "SqlConnMgrUICS.SqlConnMgrUICS,SqlConnMgrUICS,Version=1.0.0.0,Culture=neutral,PublicKeyToken=
<insert public key token here>")]
public class SqlConnMgrCS :
ConnectionManagerBase
{
. . .
}
See Also
Coding a Custom Connection Manager
Developing a User Interface for a Custom Connection Manager
Coding a Custom Connection Manager
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
After you have created a class that inherits from the ConnectionManagerBase base class, and applied the
DtsConnectionAttribute attribute to the class, you must override the implementation of the properties and
methods of the base class to provide your custom functionality.
For samples of custom connection managers, see Developing a User Interface for a Custom Connection Manager.
The code examples shown in this topic are drawn from the SQL Server Custom Connection Manager sample.
NOTE
Most of the tasks, sources, and destinations that have been built into Integration Services work only with specific types of
built-in connection managers. Therefore, these samples cannot be tested with the built-in tasks and components.
_connectionString = temporaryString
End Sub
// Default values.
private string _serverName = "(local)";
private string _databaseName = "AdventureWorks";
private string _connectionString = String.Empty;
if (!String.IsNullOrEmpty(_serverName))
{
temporaryString = temporaryString.Replace("<servername>", _serverName);
}
if (!String.IsNullOrEmpty(_databaseName))
{
temporaryString = temporaryString.Replace("<databasename>", _databaseName);
}
_connectionString = temporaryString;
If String.IsNullOrEmpty(_serverName) Then
infoEvents.FireError(0, "SqlConnectionManager", "No server name specified", String.Empty, 0)
Return DTSExecResult.Failure
Else
Return DTSExecResult.Success
End If
End Function
if (String.IsNullOrEmpty(_serverName))
{
infoEvents.FireError(0, "SqlConnectionManager", "No server name specified", String.Empty, 0);
return DTSExecResult.Failure;
}
else
{
return DTSExecResult.Success;
}
UpdateConnectionString()
With sqlConnection
.ConnectionString = _connectionString
.Open()
End With
Return sqlConnection
End Function
UpdateConnectionString();
{
sqlConnection.ConnectionString = _connectionString;
sqlConnection.Open();
}
return sqlConnection;
End Sub
See Also
Creating a Custom Connection Manager
Developing a User Interface for a Custom Connection Manager
Developing a User Interface for a Custom
Connection Manager
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
After you have overridden the implementation of the properties and methods of the base class to provide your
custom functionality, you may want to create a custom user interface for your connection manager. If you do not
create a custom user interface, users can configure your connection manager only by using the Properties
window.
In a custom user interface project or assembly, you normally have two classes-a class that implements
IDtsConnectionManagerUI, and the Windows form that it displays to gather information from the user.
IMPORTANT
After signing and building your custom user interface and installing it in the global assembly cache as described in Coding a
Custom Connection Manager, remember to provide the fully qualified name of this class in the UITypeName property of the
DtsConnectionAttribute.
NOTE
Most of the tasks, sources, and destinations that have been built into Integration Services work only with specific types of
built-in connection managers. Therefore, these samples cannot be tested with the built-in tasks and components.
NOTE
You may not need to write any code for the Delete method if no cleanup is required when the user deletes an instance of
the connection manager.
_connectionManager = connectionManager
_serviceProvider = serviceProvider
End Sub
public void Initialize(Microsoft.SqlServer.Dts.Runtime.ConnectionManager connectionManager,
System.IServiceProvider serviceProvider)
{
_connectionManager = connectionManager;
_serviceProvider = serviceProvider;
clipboardService = _
DirectCast(_serviceProvider.GetService(GetType(IDtsClipboardService)), IDtsClipboardService)
If Not clipboardService Is Nothing Then
' If the connection manager has been copied and pasted, take no action.
If clipboardService.IsPasteActive Then
Return True
End If
End If
Return EditSqlConnection(parentWindow)
End Function
clipboardService = (IDtsClipboardService)_serviceProvider.GetService(typeof(IDtsClipboardService));
if (clipboardService != null)
// If connection manager has been copied and pasted, take no action.
{
if (clipboardService.IsPasteActive)
{
return true;
}
}
return EditSqlConnection(parentWindow);
}
sqlCMUIForm.Initialize(_connectionManager, _serviceProvider)
If sqlCMUIForm.ShowDialog(parentWindow) = DialogResult.OK Then
Return True
Else
Return False
End If
End Function
sqlCMUIForm.Initialize(_connectionManager, _serviceProvider);
if (sqlCMUIForm.ShowDialog(parentWindow) == DialogResult.OK)
{
return true;
}
else
{
return false;
}
In the Edit method, you simply have to display the form for editing. The following code shows an implementation
of the Edit method that uses a helper function to encapsulate the code for the form.
Return EditSqlConnection(parentWindow)
End Function
return EditSqlConnection(parentWindow);
_connectionManager = connectionManager
_serviceProvider = serviceProvider
ConfigureControlsFromConnectionManager()
EnableControls()
End Sub
_connectionManager = connectionManager;
_serviceProvider = serviceProvider;
ConfigureControlsFromConnectionManager();
EnableControls();
With _connectionManager
tempName = .Properties("Name").GetValue(_connectionManager).ToString
If Not String.IsNullOrEmpty(tempName) Then
_connectionName = tempName
Else
_connectionName = CONNECTIONNAME_BASE
End If
tempServerName = .Properties("ServerName").GetValue(_connectionManager).ToString
If Not String.IsNullOrEmpty(tempServerName) Then
_serverName = tempServerName
txtServerName.Text = _serverName
End If
tempDatabaseName = .Properties("DatabaseName").GetValue(_connectionManager).ToString
If Not String.IsNullOrEmpty(tempDatabaseName) Then
_databaseName = tempDatabaseName
txtDatabaseName.Text = _databaseName
End If
End With
End Sub
With _connectionManager
.Properties("Name").SetValue(_connectionManager, _connectionName)
.Properties("ServerName").SetValue(_connectionManager, _serverName)
.Properties("DatabaseName").SetValue(_connectionManager, _databaseName)
End With
End Sub
private const string CONNECTIONNAME_BASE = "SqlConnectionManager";
string tempName;
string tempServerName;
string tempDatabaseName;
{
tempName = _connectionManager.Properties["Name"].GetValue(_connectionManager).ToString();
if (!String.IsNullOrEmpty(tempName))
{
_connectionName = tempName;
}
else
{
_connectionName = CONNECTIONNAME_BASE;
}
tempServerName = _connectionManager.Properties["ServerName"].GetValue(_connectionManager).ToString();
if (!String.IsNullOrEmpty(tempServerName))
{
_serverName = tempServerName;
txtServerName.Text = _serverName;
}
tempDatabaseName = _connectionManager.Properties["DatabaseName"].GetValue(_connectionManager).ToString();
if (!String.IsNullOrEmpty(tempDatabaseName))
{
_databaseName = tempDatabaseName;
txtDatabaseName.Text = _databaseName;
}
{
_connectionManager.Properties["Name"].SetValue(_connectionManager, _connectionName);
_connectionManager.Properties["ServerName"].SetValue(_connectionManager, _serverName);
_connectionManager.Properties["DatabaseName"].SetValue(_connectionManager, _databaseName);
}
See Also
Creating a Custom Connection Manager
Coding a Custom Connection Manager
Developing a Custom Log Provider
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services has extensive logging capabilities that make it possible to capture events that occur during
package execution. Integration Services includes a variety of log providers that enable logs to be created and
stored in formats such as XML, text, database, or in the Windows event log. If the log providers and the output
formats that are provided do not entirely meet your requirements, you can create a custom log provider.
To create a custom log provider, you have to create a class that inherits from the LogProviderBase base class, apply
the DtsLogProviderAttribute attribute to your new class, and override the important methods and properties of
the base class, including the ConfigString property and the Log method.
In This Section
This section describes how to create, configure, and code a custom log provider.
Creating a Custom Log Provider
Describes how to create the classes for a custom log provider project.
Coding a Custom Log Provider
Describes how to implement a custom log provider by overriding the methods and properties of the base class.
Developing a User Interface for a Custom Log Provider
Custom user interfaces for custom log providers are not supported in SQL Server Integration Services.
Related Topics
Information Common to all Custom Objects
For information that is common to all the type of custom objects that you can create in Integration Services, see
the following topics:
Developing Custom Objects for Integration Services
Describes the basic steps in implementing all types of custom objects for Integration Services.
Persisting Custom Objects
Describes custom persistence and explains when it is necessary.
Building, Deploying, and Debugging Custom Objects
Describes the techniques for building, signing, deploying, and debugging custom objects.
Information about Other Custom Objects
For information on the other types of custom objects that you can create in Integration Services, see the following
topics:
Developing a Custom Task
Discusses how to program custom tasks.
Developing a Custom Connection Manager
Discusses how to program custom connection managers.
Developing a Custom ForEach Enumerator
Discusses how to program custom enumerators.
Developing a Custom Data Flow Component
Discusses how to program custom data flow sources, transformations, and destinations.
Creating a Custom Log Provider
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Integration Services run-time environment has extensive logging capabilities. A log lets you capture events
that occur during package execution. Integration Services includes a variety of log providers that enable logs to be
created and stored in multiple formats, such as XML, text, database, or in the Windows event log. If one of these
providers or output formats does not fit your needs, you can create a custom log provider.
The steps involved in creating a custom log provider are similar to the steps for creating any other custom object
for Integration Services:
Create a new class that inherits from the base class. For a log provider, the base class is LogProviderBase.
Apply the attribute that identifies the type of object to the class. For a log provider, the attribute is
DtsLogProviderAttribute.
Override the implementation of the base class's methods and properties. For a log provider, these include
the ConfigString property and the OpenLog, Log, and CloseLog methods.
Custom user interfaces for custom log providers are not implemented in SQL Server Integration Services.
NOTE
Many Integration Services log providers have a custom user interface that implements IDtsLogProviderUI and replaces the
Configuration text box in the Configure SSIS Logs dialog box with a filtered dropdown list of available connection
managers. However custom user interfaces for custom log providers are not implemented in Integration Services.
IMPORTANT
The LogProviderType property of the attribute is not used. However, you must enter a value for it, or the custom log
provider will not appear in the list of available log providers.
NOTE
Since custom user interfaces for custom log providers are not implemented in Integration Services, specifying a value for the
UITypeName property of the DtsLogProviderAttribute has no effect.
See Also
Coding a Custom Log Provider
Developing a User Interface for a Custom Log Provider
Coding a Custom Log Provider
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
After you have created a class that inherits from the LogProviderBase base class, and applied the
DtsLogProviderAttribute attribute to the class, you must override the implementation of the properties and
methods of the base class to provide your custom functionality.
For working samples of custom log providers, see Developing a User Interface for a Custom Log Provider.
IMPORTANT
During the validation and execution of a single package, the OpenLog and CloseLog methods are called more than one time.
Make sure that your custom code does not cause earlier log entries to be overwritten by the next opening and closing of
the log. If you have selected to log validation events in your test package, the first logged event that you should see is
OnPreValidate; if instead the first logged event that you see is PackageStart, the initial validation events have been
overwritten.
this.connectionManager = connections[ConfigString];
string filePath = this.connectionManager.AcquireConnection(null) as string;
Me.connectionManager = connections(ConfigString)
Dim filePath As String = Me.connectionManager.AcquireConnectionCType(as string, Nothing)
Public Overrides Sub Log(ByVal logEnTryName As String, ByVal computerName As String, ByVal operatorName As
String, ByVal sourceName As String, ByVal sourceID As String, ByVal executionID As String, ByVal messageText
As String, ByVal startTime As DateTime, ByVal endTime As DateTime, ByVal dataCode As Integer, ByVal
dataBytes() As Byte)
sw.Write(logEnTryName + ",")
sw.Write(computerName + ",")
sw.Write(operatorName + ",")
sw.Write(sourceName + ",")
sw.Write(sourceID + ",")
sw.Write(messageText + ",")
sw.Write(dataBytes + ",")
sw.WriteLine("")
End Sub
See Also
Creating a Custom Log Provider
Developing a User Interface for a Custom Log Provider
Developing a User Interface for a Custom Log
Provider
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Many Integration Services log providers have a custom user interface that implements IDtsLogProviderUI and
replaces the Configuration text box in the Configure SSIS Logs dialog box with a filtered dropdown list of
available connection managers. However, custom user interfaces for custom log providers are not implemented in
SQL Server Integration Services.
See Also
Creating a Custom Log Provider
Coding a Custom Log Provider
Developing a Custom ForEach Enumerator
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Integration Services uses foreach enumerators to iterate over the items in a collection and perform the same tasks
for each element. Integration Services includes a variety of foreach enumerators that support the most commonly
used collections, such as all the files in a folder, all the tables in a database, or all the elements of a list stored in a
package variable. If the foreach enumerators and collections that are provided do not entirely meet your
requirements, you can create a custom foreach enumerator.
To create a custom foreach enumerator, you have to create a class that inherits from the ForEachEnumerator base
class, apply the DtsForEachEnumeratorAttribute attribute to your new class, and override the important methods
and properties of the base class, including the GetEnumerator method.
In This Section
This section describes how to create, configure, and code a custom foreach enumerator and its custom user
interface.
Creating a Custom Foreach Enumerator
Describes how to create the classes for a custom foreach enumerator project.
Coding a Custom Foreach Enumerator
Describes how to implement a custom foreach enumerator by overriding the methods and properties of the base
class.
Developing a User Interface for a Custom ForEach Enumerator
Describes how to implement the user interface class and the form that is used to configure the custom foreach
enumerator.
Related Topics
Information Common to all Custom Objects
For information that is common to all the type of custom objects that you can create in Integration Services, see
the following topics:
Developing Custom Objects for Integration Services
Describes the basic steps in implementing all types of custom objects for Integration Services.
Persisting Custom Objects
Describes custom persistence and explains when it is necessary.
Building, Deploying, and Debugging Custom Objects
Describes the techniques for building, signing, deploying, and debugging custom objects.
Information about Other Custom Objects
For information on the other types of custom objects that you can create in Integration Services, see the following
topics:
Developing a Custom Task
Discusses how to program custom tasks.
Developing a Custom Connection Manager
Discusses how to program custom connection managers.
Developing a Custom Log Provider
Discusses how to program custom log providers.
Developing a Custom Data Flow Component
Discusses how to program custom data flow sources, transformations, and destinations.
Creating a Custom Foreach Enumerator
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The steps involved in creating a custom foreach enumerator are similar to the steps for creating any other custom
object for Integration Services:
Create a new class that inherits from the base class. For a foreach enumerator, the base class is
ForEachEnumerator.
Apply the attribute that identifies the type of object to the class. For a foreach enumerator, the attribute is
DtsForEachEnumeratorAttribute.
Override the implementation of the base class's methods and properties. For a foreach enumerator, the
most important is the GetEnumerator method.
Optionally, develop a custom user interface. For a foreach enumerator, this requires a class that implements
the IDTSForEachEnumeratorUI interface.
A custom enumerator is hosted by the ForEachLoop container. At run time, the ForEachLoop container calls the
GetEnumerator method of the custom enumerator. The custom enumerator returns an object that implements the
IEnumerable interface, such as an ArrayList . The ForEachLoop then iterates over each element in the collection,
provides the value of the current element to the control flow through a user-defined variable, and executes the
control flow in the container.
using System;
using Microsoft.SqlServer.Dts.Runtime;
namespace Microsoft.Samples.SqlServer.Dts
{
[DtsForEachEnumerator( DisplayName = "MyEnumerator", Description="A sample custom enumerator",
UITypeName="FullyQualifiedTypeName,AssemblyName,Version=1.00.000.00,Culture=Neutral,PublicKeyToken=
<publickeytoken>")]
public class MyEnumerator : ForEachEnumerator
{
//Insert code here.
}
}
See Also
Coding a Custom Foreach Enumerator
Developing a User Interface for a Custom ForEach Enumerator
Coding a Custom Foreach Enumerator
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
After you have created a class that inherits from the ForEachEnumerator base class, and applied the
DtsForEachEnumeratorAttribute attribute to the class, you must override the implementation of the properties and
methods of the base class to provide your custom functionality.
For a working sample of a custom enumerator, see Developing a User Interface for a Custom ForEach Enumerator.
return numbers;
}
Dim x As Integer
For x = 0 To 100- 1 Step x + 1
numbers.Add(randomNumber.Next())
Next
Return numbers
End Function
See Also
Creating a Custom Foreach Enumerator
Developing a User Interface for a Custom ForEach Enumerator
Developing a User Interface for a Custom ForEach
Enumerator
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
After you have overridden the implementation of the properties and methods of the base class to provide your
custom functionality, you may want to create a custom user interface for your Foreach enumerator. If you do not
create a custom user interface, users can only configure the new custom Foreach enumerator by using the
Properties window.
In a custom user interface project or assembly, you create a class that implements ForEachEnumeratorUI. This class
derives from System.Windows.Forms.UserControl, which is typically used to create a composite control to host
other Windows Forms controls. The control that you create is displayed in the Enumerator configuration area
of the Collection tab of the Foreach Loop Editor .
IMPORTANT
After signing and building your custom user interface and installing it in the global assembly cache as described in Building,
Deploying, and Debugging Custom Objects, remember to provide the fully qualified name of this class in the UITypeName
property of the DtsForEachEnumeratorAttribute.
See Also
Creating a Custom Foreach Enumerator
Coding a Custom Foreach Enumerator
Developing a Custom Data Flow Component
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The data flow task consists of components that connect to a variety of data sources and then transform and
route that data at high speed. Microsoft SQL Server Integration Services provides an extensible object model
that lets developers create custom sources, transformations, and destinations that you can use in SQL Server
Data Tools (SSDT) and in deployed packages. This section contains topics that will guide you in developing
custom data flow components.
In This Section
Creating a Custom Data Flow Component
Describes the initial steps in creating a custom data flow component.
Design-time Methods of a Data Flow Component
Describes the design-time methods to implement in a custom data flow component.
Run-time Methods of a Data Flow Component
Describes the run-time methods to implement in a custom data flow component.
Execution Plan and Buffer Allocation
Describes the data flow execution plan and the allocation of data buffers.
Working with Data Types in the Data Flow
Explains how the data flow maps Integration Services data types to .NET Framework managed data types.
Validating a Data Flow Component
Explains the methods used to validate component configuration and to reconfigure component metadata.
Implementing External Metadata
Explains how to use external metadata columns for data validation.
Raising and Defining Events in a Data Flow Component
Explains how to raise predefined and custom events.
Logging and Defining Log Entries in a Data Flow Component
Explains how to create and write to custom log entries.
Using Error Outputs in a Data Flow Component
Explains how to redirect error rows to an alternative output.
Upgrading the Version of a Data Flow Component
Explains how to update saved component metadata when a new version of your component is first used.
Developing a User Interface for a Data Flow Component
Explains how to implement a custom editor for a component.
Developing Specific Types of Data Flow Components
Contains information about developing the three types of data flow components: sources, transformations,
and destinations.
Reference
Microsoft.SqlServer.Dts.Pipeline
Contains the classes and interfaces used to create custom data flow components.
Microsoft.SqlServer.Dts.Pipeline.Wrapper
Contains the classes and interfaces that make up the data flow task object model, and is used to create
custom data flow components or build a data flow task.
Microsoft.SqlServer.Dts.Pipeline.Design
Contains the classes and interfaces used to create the user interface for data flow components.
Integration Services Error and Message Reference
Lists the predefined Integration Services error codes with their symbolic names and descriptions.
Related Sections
Information Common to All Custom Objects
For information that is common to all the type of custom objects that you can create in Integration Services,
see the following topics:
Developing Custom Objects for Integration Services
Describes the basic steps in implementing all types of custom objects for Integration Services.
Persisting Custom Objects
Describes custom persistence and explains when it is necessary.
Building, Deploying, and Debugging Custom Objects
Describes the techniques for building, signing, deploying, and debugging custom objects.
Information about Other Custom Objects
For information on the other types of custom objects that you can create in Integration Services, see the
following topics:
Developing a Custom Task
Discusses how to program custom tasks.
Developing a Custom Connection Manager
Discusses how to program custom connection managers.
Developing a Custom Log Provider
Discusses how to program custom log providers.
Developing a Custom ForEach Enumerator
Discusses how to program custom enumerators.
See Also
Extending the Data Flow with the Script Component
Comparing Scripting Solutions and Custom Objects
Creating a Custom Data Flow Component
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
In Microsoft SQL Server Integration Services, the data flow task exposes an object model that lets developers
create custom data flow components-sources, transformations, and destinations-by using the Microsoft .NET
Framework and managed code.
A data flow task consists of components that contain an IDTSComponentMetaData100 interface and a collection of
IDTSPath100 objects that define the movement of data between components.
NOTE
When you create a custom provider, you need to update the ProviderDescriptors.xml file with the metadata column values.
Creating a Component
To create a data flow component, you derive a class from the PipelineComponent base class, apply the
DtsPipelineComponentAttribute class, and then override the appropriate methods of the base class. The
PipelineComponent implements the IDTSDesigntimeComponent100 and IDTSRuntimeComponent100 interfaces,
and exposes their methods for you to override in your component.
Depending on the objects used by your component, your project will require references to some or all of the
following assemblies:
The following code example shows a simple component that derives from the base class, and applies the
DtsPipelineComponentAttribute. You need to add a reference to the Microsoft.SqlServer.DTSPipelineWrap
assembly.
using System;
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
namespace Microsoft.Samples.SqlServer.Dts
{
[DtsPipelineComponent(DisplayName = "SampleComponent", ComponentType = ComponentType.Transform )]
public class BasicComponent: PipelineComponent
{
// TODO: Override the base class methods.
}
}
Imports Microsoft.SqlServer.Dts.Pipeline
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
<DtsPipelineComponent(DisplayName:="SampleComponent", ComponentType:=ComponentType.Transform)> _
Public Class BasicComponent
Inherits PipelineComponent
End Class
See Also
Developing a User Interface for a Data Flow Component
Design-time Methods of a Data Flow Component
11/2/2020 • 4 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Before execution, the data flow task is said to be in a design-time state, as it undergoes incremental changes.
Changes may include the addition or removal of components, the addition or removal of the path objects that
connect components, and changes to the metadata of the components. When metadata changes occur, the
component can monitor and react to the changes. For example, a component can disallow certain changes or
make additional changes in response to a change. At design time, the designer interacts with a component through
the design-time IDTSDesigntimeComponent100 interface.
Design-Time Implementation
The design-time interface of a component is described by the IDTSDesigntimeComponent100 interface. Although
you do not explicitly implement this interface, a familiarity with the methods defined in this interface will help you
understand which methods of the PipelineComponent base class correspond to the design-time instance of a
component.
When a component is loaded in the SQL Server Data Tools (SSDT), the design-time instance of the component is
instantiated and the methods of the IDTSDesigntimeComponent100 interface are called as the component is
edited. The implementation of the base class lets you override only those methods that your component requires.
In many cases, you may override these methods to prevent inappropriate edits to a component. For example, to
prevent users from adding an output to a component, override the InsertOutput method. Otherwise, when the
implementation of this method by the base class is called, it adds an output to the component.
Regardless of the purpose or functionality of your component, you should override the
ProvideComponentProperties, Validate, and ReinitializeMetaData methods. For more information about Validate
and ReinitializeMetaData, see Validating a Data Flow Component.
ProvideComponentProperties Method
The initialization of a component occurs in the ProvideComponentProperties method. This method is called by
SSIS Designer when a component is added to the data flow task, and is similar to a class constructor. Component
developers should create and initialize their inputs, outputs, and custom properties during this method call. The
ProvideComponentProperties method differs from a constructor because it is not called every time that the
design-time instance or run-time instance of the component is instantiated.
The base class implementation of the method adds an input and an output to the component and assigns the ID of
the input to the SynchronousInputID property. However, in SQL Server, the input and output objects added by the
base class are not named. Packages that contain a component with input or output objects whose Name property
is not set will not successfully load. Therefore, when you use the base implementation, you must assign values
explicitly to the Name property of the default input and output.
NOTE
The IDTSCustomProperty100 interface has limited support for property values of type Object . The only object that you can
store as the value of a custom property is an array of simple types such as strings or integers.
You can indicate that your custom property supports property expressions by setting the value of its
ExpressionType property to CPET_NOTIFY from the DTSCustomPropertyExpressionType enumeration, as shown
in the following example. You do not have to add any code to handle or to validate the property expression entered
by the user. You can set a default value for the property, validate its value, and read and use its value normally.
IDTSCustomProperty100 myCustomProperty;
...
myCustomProperty.ExpressionType = DTSCustomPropertyExpressionType.CPET_NOTIFY;
You can limit users to selecting a custom property value from an enumeration by using the TypeConverter
property, as shown in the following example, which assumes that you have defined a public enumeration named
MyValidValues .
For more information, see "Generalized Type Conversion" and "Implementing a Type Converter" in the MSDN
Library.
You can specify a custom editor dialog box for the value of your custom property by using the UITypeEditor
property, as shown in the following example. First, you must create a custom type editor that inherits from
System.Drawing.Design.UITypeEditor , if you cannot locate an existing UI type editor class that fits your needs.
Next, specify this class as the value of the UITypeEditor property of your custom property.
For more information, see "Implementing a UI Type Editor" in the MSDN Library.
See Also
Run-time Methods of a Data Flow Component
Run-time Methods of a Data Flow Component
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
At run time, the data flow task examines the sequence of components, prepares an execution plan, and manages a
pool of worker threads that execute the work plan. The task loads rows of data from sources, processes them
through transformations, then saves them to destinations.
ReDim bufferColumnIndex(input.InputColumnCollection.Count)
Next
End Sub
Adding Rows
Components supply rows to downstream components by adding rows to PipelineBuffer objects. The data flow task
provides an array of output buffers - one for each IDTSOutput100 object that is connected to a downstream
component - as a parameter to the PrimeOutput method. Source components and transformation components
with asynchronous outputs add rows to the buffers and call the SetEndOfRowset method when they are finished
adding rows. The data flow task manages the output buffers that it supplies to components and, as a buffer
becomes full, automatically moves the rows in the buffer to the next component. The PrimeOutput method is
called one time per component, unlike the ProcessInput method, which is called repeatedly.
The following code example demonstrates how a component adds rows to its output buffers during the
PrimeOutput method, then calls the SetEndOfRowset method.
Next
' Notify the data flow task that no more rows are coming.
buffer.SetEndOfRowset()
Next
End Sub
For more information about developing components that add rows to output buffers, see Developing a Custom
Source Component and Developing a Custom Transformation Component with Asynchronous Outputs.
Receiving Rows
Components receive rows from upstream components in PipelineBuffer objects. The data flow task provides a
PipelineBuffer object that contains the rows added to the data flow by upstream components as a parameter to the
ProcessInput method. This input buffer can be used to examine and modify the rows and columns in the buffer, but
cannot be used to add or remove rows. The ProcessInput method is called repeatedly until there are no more
available buffers. The last time it is called, the EndOfRowset property is true . You can iterate over the collection of
rows in the buffer by using the NextRow method, which advances the buffer to the next row. This method returns
false when the buffer is on the last row in the collection. You do not have to check the EndOfRowset property
unless you have to perform an additional action after the last rows of data have been processed.
The following text shows the correct pattern for using the NextRow method and the EndOfRowset property:
while (buffer.NextRow())
if (buffer.EndOfRowset)
The following code example demonstrates how a component processes the rows in input buffers during the
ProcessInput method.
public override void ProcessInput( int inputID, PipelineBuffer buffer )
{
{
IDTSInput100 input = ComponentMetaData.InputCollection.GetObjectByID(inputID);
while( buffer.NextRow())
{
// TODO: Examine the columns in the current row.
}
}
End Sub
For more information about developing components that receive rows in input buffers, see Developing a Custom
Destination Component and Developing a Custom Transformation Component with Synchronous Outputs.
See Also
Design-time Methods of a Data Flow Component
Execution Plan and Buffer Allocation
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Before execution, the data flow task examines its components and generates an execution plan for each sequence
of components. This section provides details about the execution plan, how to view the plan, and how input and
output buffers are allocated based on the execution plan.
NOTE
The execution plan is generated every time a package is executed, and can be captured by adding a log provider to the
package, enabling logging, and selecting the PipelineExecutionPlan event.
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
When developing a custom data flow component in Integration Services, you work constantly with data types,
copying data into and out of data flow buffers and transforming values. The information in this topic helps you to
choose the correct Integration Services data types, and to use the correct methods when working with them.
SetBoolean DT_BOOL
SetByte DT_UI1
SetBytes DT_BYTES
SetDate DT_DBDATE
SetDateTimeOffset DT_DBTIMESTAMPOFFSET
SetDouble DT_R8
SetGuid DT_GUID
SetInt16 DT_I2
SetInt32 DT_I4
SetInt64 DT_I8
SetNull DT_NULL
SetSByte DT_I1
SetSingle DT_R4
SetUInt16 DT_UI2
SetUInt32 DT_UI4
SetUInt64 DT_UI8
NOTE
The mapping files in XML format that are installed by default to C:\Program Files\Microsoft SQL
Server\130\DTS\MappingFiles are not related to the data type mapping discussed in this topic. These files map data types
from one database version or system to another (for example, from SQL Server to Oracle), and are used only by the SQL
Server Import and Export Wizard. For more information on these mapping files, see SQL Server Import and Export Wizard.
Developers should use these methods of the PipelineComponent class with caution, and may want to code data
type mapping methods of their own that are more suited to the unique needs of their custom components. The
existing methods do not consider numeric precision or scale, or other properties closely related to the data type
itself. Microsoft may modify or remove these methods, or modify the mappings that they perform, in a future
version of Integration Services.
The following table lists how the BufferTypeToDataRecordType and the DataRecordTypeToBufferType methods map
various Integration Services data types to managed data types.
DT_WSTR System.String
DT_DBTIMESTAMP System.DateTime
DT_DBTIMESTAMP2 System.DateTime
DT_DBTIMESTAMPOFFSET System.DateTimeOffset
DT_DBDATE System.DateTime
DT_DBTIME System.TimeSpan
DT_DBTIME2 System.TimeSpan
DT_DATE System.DateTime
DT_FILETIME System.DateTime
DT_NUMERIC System.Decimal
DT_GUID System.Guid
DT_I1 System.SByte
DT_I2 System.Int16
DT_I4 System.Int32
DT_I8 System.Int64
DT_BOOL System.Boolean
DT_R4 System.Single
DT_R8 System.Double
DT_UI1 System.Byte
DT_UI2 System.UInt16
DT_UI4 System.UInt32
DT_UI8 System.UInt64
Developers should use these methods of the PipelineComponent class with caution, and may want to code data
type mapping methods of their own that are more suited to the unique needs of their custom components. The
existing methods do not consider numeric precision or scale, or other properties closely related to the data type
itself. Microsoft may modify or remove these methods, or modify the mappings that they perform, in a future
version of Integration Services.
The following table lists how the ConvertBufferDataTypeToFitManaged method maps Integration Services data
types to other Integration Services data types.
DT_DECIMAL DT_NUMERIC
DT_CY DT_NUMERIC
DT_DATE DT_DBTIMESTAMP
DT_DBDATE DT_DBTIMESTAMP
DT_FILETIME DT_DBTIMESTAMP
DT_DBTIMESTAMP2 DT_DBTIMESTAMP
DT_DBTIME DT_DBTIME2
DT_BOOL DT_I4
DT_TEXT DT_WSTR
DT_NTEXT DT_WSTR
DT_STR DT_WSTR
DT_IMAGE DT_BYTES
NOTE
The ConvertBufferDataTypeToFitManaged method does not return a value for the DT_DBTIMESTAMPOFFSET data type, and
a UnsupportedBufferDataTypeException occurs. You must convert the DT_DBTIMESTAMPOFFSET data type to one of the
Integration Services date/time data types that can be mapped to a managed data type. For a list of Integration Services
date/time data types that can be mapped to a managed data types, see the table in the previous section, "Mapping
between Integration Services and Managed Data Types." For information about converting data types, see Integration
Services Data Types.
See Also
BufferTypeToDataRecordType
DataRecordTypeToBufferType
ConvertBufferDataTypeToFitManaged
Integration Services Data Types
Validating a Data Flow Component
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Validate method of the PipelineComponent base class is provided to prevent execution of a component that is
not configured correctly. Use this method to verify that a component has the expected number of input and output
objects, that the custom properties of the component have acceptable values, and that any connections, if required,
are specified. Use this method also to verify that the columns in the input and output collections have the correct
data types and that the DTSUsageType of each column is set appropriately for the component. The base class
implementation assists in the validation process by checking the input column collection of the component and
ensuring that each column in the collection refers to a column in the IDTSOutputCollection100 of the upstream
component.
Validate Method
The Validate method is called repeatedly when a component is edited in SSIS Designer. You can provide feedback
to the designer and to users of the component through the DTSValidationStatus enumeration return value, and by
posting warnings and errors. The DTSValidationStatus enumeration contains three values that indicate various
stages of failure, and a fourth, VS_ISVALID, that indicates whether the component is correctly configured and ready
to execute.
The VS_NEEDSNEWMETADATA value indicates that an error exists in the ComponentMetaData, and that the
component can repair the errors. If a component encounters a metadata error that it can repair, it should not fix the
error in the Validate method, and ComponentMetaData should not be modified during validation. Instead, the
Validate method should return only VS_NEEDSNEWMETADATA, and the component should repair the error in a call
to the ReinitializeMetaData method, as described later in this section.
The VS_ISBROKEN value indicates that the component has an error that can be rectified by editing the component
in the designer. The error is typically caused by a custom property or a required connection that is not specified or
is set incorrectly.
The final error value is VS_ISCORRUPT, which indicates that the component has discovered errors that should only
occur if the ComponentMetaData property has been modified directly, either by editing the package XML or by
using the object model. For example, this kind of error occurs when a component has added only a single input,
but validation discovers that more than one input exists in the ComponentMetaData. Errors that generate this
return value can only be repaired by resetting the component by using the Reset button in the Advanced Editor
dialog box.
Besides returning error values, components provide feedback by posting warnings or errors during validation. The
FireWarning and FireError methods provide this mechanism. When these methods are called, these events are
posted in the Error List window of SQL Server Data Tools (SSDT). Component developers can then provide direct
feedback to users on the errors that have occurred, and if appropriate, how to correct them.
The following code example shows an overridden implementation of Validate.
public override DTSValidationStatus Validate()
{
bool pbCancel = false;
// Let the base class verify that the input column reflects the output
// of the upstream component.
return base.Validate();
}
' Let the base class verify that the input column reflects the output
' of the upstream component.
Return MyBase.Validate
End Function
ReinitializeMetaData Method
The ReinitializeMetaData method is called by SSIS Designer whenever you edit a component that returns
VS_NEEDSNEWMETADATA from its Validate method. Components should contain code that detects and corrects
the problems identified by the component during validation.
The following example shows a component that detects problems during validation and fixes these errors in the
ReinitializeMetaData method.
return DTSValidationStatus.VS_ISVALID;
}
public override void ReinitializeMetaData()
{
if (!areInputColumnsValid)
{
IDTSInput100 input = ComponentMetaData.InputCollection[0];
IDTSVirtualInput100 vInput = input.GetVirtualInput();
if (vColumn == null)
input.InputColumnCollection.RemoveObjectByID(column.ID);
}
areInputColumnsValid = true;
}
}
Private areInputColumnsValid As Boolean = True
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
When a component is disconnected from its data source, you can validate the columns in the input and output
column collections against the columns at its external data source by using the
IDTSExternalMetadataColumnCollection100 interface. This interface lets you maintain a snapshot of the columns at
the external data source and map these columns to the columns in the input and output column collection of the
component.
Implementing external metadata columns adds a layer of overhead and complexity to component development,
because you must maintain and validate against an additional column collection, but the ability to avoid expensive
round trips to the server for validation may make this development work worthwhile.
eColumn.DataType = oColumn.DataType;
eColumn.Precision = oColumn.Precision;
eColumn.Scale = oColumn.Scale;
eColumn.Length = oColumn.Length;
eColumn.CodePage = oColumn.CodePage;
oColumn.ExternalMetadataColumnID = eColumn.ID;
}
See Also
Data Flow
Raising and Defining Events in a Data Flow
Component
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Component developers can raise a subset of the events defined in the IDTSComponentEvents interface by calling
the methods exposed on the ComponentMetaData property. You can also define custom events by using the
EventInfos collection, and raise them during execution by using the FireCustomEvent method. This section
describes how to create and raise an event, and provides guidelines on when you should raise events at design
time.
Raising Events
Components raise events by using the Fire<X> methods of the IDTSComponentMetaData100 interface. You can
raise events during component design and execution. Typically, during component design, the FireError and
FireWarning methods are called during validation. These events display messages in the Error List pane of SQL
Server Data Tools (SSDT) and provide feedback to users of the component when a component is incorrectly
configured.
Components can also raise events at any point during execution. Events allow component developers to provide
feedback to users of the component as it executes. Calling the FireError method during execution is likely to fail the
package.
See Also
Integration Services (SSIS) Event Handlers
Add an Event Handler to a Package
Logging and Defining Log Entries in a Data Flow
Component
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Custom data flow components can post messages to an existing log entry by using the PostLogMessage method of
the IDTSComponentMetaData100 interface. They can also present information to the user by using the
FireInformation method or similar methods of the IDTSComponentMetaData100 interface. However, this approach
incurs the overhead of raising and handling additional events, and forces the user to sift through verbose
informational messages for the messages that may be of interest to them. You can use a custom log entry as
described below to provide distinctly labeled custom log information to users of your component.
using Microsoft.SqlServer.Dts.Runtime;
...
private const string MyLogEntryName = "My Custom Component Log Entry";
private const string MyLogEntryDescription = "Log entry from My Custom Component ";
...
public override void RegisterLogEntries()
{
this.LogEntryInfos.Add(MyLogEntryName,
MyLogEntryDescription,
Microsoft.SqlServer.Dts.Runtime.Wrapper.DTSLogEntryFrequency.DTSLEF_CONSISTENT);
}
Imports Microsoft.SqlServer.Dts.Runtime
...
Private Const MyLogEntryName As String = "My Custom Component Log Entry"
Private Const MyLogEntryDescription As String = "Log entry from My Custom Component "
...
Public Overrides Sub RegisterLogEntries()
Me.LogEntryInfos.Add(MyLogEntryName, _
MyLogEntryDescription, _
Microsoft.SqlServer.Dts.Runtime.Wrapper.DTSLogEntryFrequency.DTSLEF_CONSISTENT)
End Sub
The DTSLogEntryFrequency enumeration provides a hint to the runtime about how frequently the event will be
logged:
DTSLEF_OCCASIONAL: Event is logged only sometimes, not during every execution.
DTSLEF_CONSISTENT: Event is logged a constant number of times during every execution.
DTSLEF_PROPORTIONAL: Event is logged a number of times proportional to the amount of work completed.
The example above uses DTSLEF_CONSISTENT because the component expects to log an entry once per execution.
After registering the custom log entry and adding an instance of your custom component to the data flow designer
surface, the Logging dialog box in the designer displays a new log entry with the name "My Custom Component
Log Entry" in the list of available log entries.
Logging to a Custom Log Entry
After registering the custom log entry, the component can now log custom messages. The example below writes a
custom log entry during the PreExecute method that contains the text of a SQL statement used by the component.
Now when the user executes the package, after selecting the "My Custom Component Log Entry" in the Logging
dialog box, the log will contain an entry clearly labeled as "User::My Custom Component Log Entry." This new log
entry contains the text of the SQL statement, the timestamp, and any additional data logged by the developer.
See Also
Integration Services (SSIS) Logging
Using Error Outputs in a Data Flow Component
11/2/2020 • 12 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Special IDTSOutput100 objects called error outputs can be added to components to let the component redirect
rows that it cannot process during execution. The problems a component may encounter are generally
categorized as errors or truncations, and are specific to each component. Components that provide error outputs
give users of the component the flexibility to handle error conditions by filtering error rows out of the result set,
by failing the component when a problem occurs, or by ignoring errors and continuing.
To implement and support error outputs in a component, you must first set the UsesDispositions property of the
component to true . Then you must add an output to the component that has its IsErrorOut property set to true .
Finally, the component must contain code that redirects rows to the error output when errors or truncations occur.
This topic covers these three steps and explains the differences between synchronous and asynchronous error
outputs.
End Sub
End Sub
// This code sample assumes the component has two outputs, one the default,
// the other the error output. If the errorOutputIndex returned from GetErrorOutputInfo
// is 0, then the default output is the second output in the collection.
int defaultOutputID = -1;
int errorOutputID = -1;
int errorOutputIndex = -1;
if (errorOutputIndex == 0)
defaultOutputID = ComponentMetaData.OutputCollection[1].ID;
else
defaultOutputID = ComponentMetaData.OutputCollection[0].ID;
while (buffer.NextRow())
{
try
{
// TODO: Implement code to process the columns in the buffer row.
// Ideally, your code should detect potential exceptions before they occur, rather
// than having a generic try/catch block such as this.
// However, because the error or truncation implementation is specific to each component,
// this sample focuses on actually directing the row, and not a single error or truncation.
}
}
}
Public Overrides Sub ProcessInput(ByVal inputID As Integer, ByVal buffer As PipelineBuffer)
Dim input As IDTSInput100 = ComponentMetaData.InputCollection.GetObjectByID(inputID)
' This code sample assumes the component has two outputs, one the default,
' the other the error output. If the errorOutputIndex returned from GetErrorOutputInfo
' is 0, then the default output is the second output in the collection.
Dim defaultOutputID As Integer = -1
Dim errorOutputID As Integer = -1
Dim errorOutputIndex As Integer = -1
GetErrorOutputInfo(errorOutputID, errorOutputIndex)
If errorOutputIndex = 0 Then
defaultOutputID = ComponentMetaData.OutputCollection(1).ID
Else
defaultOutputID = ComponentMetaData.OutputCollection(0).ID
End If
While buffer.NextRow
Try
' TODO: Implement code to process the columns in the buffer row.
' Ideally, your code should detect potential exceptions before they occur, rather
' than having a generic try/catch block such as this.
' However, because the error or truncation implementation is specific to each component,
' this sample focuses on actually directing the row, and not a single error or truncation.
int []columnIndex;
int errorOutputID = -1;
int errorOutputIndex = -1;
// Simulate an error.
if ((row % 2) == 0)
throw new Exception("A simulated error.");
}
catch
{
// Add a row to the error buffer.
errorBuffer.AddRow();
if (defaultBuffer != null)
defaultBuffer.SetEndOfRowset();
if (errorBuffer != null)
errorBuffer.SetEndOfRowset();
}
Public Overrides Sub PrimeOutput(ByVal outputs As Integer, ByVal outputIDs As Integer(), ByVal buffers As
PipelineBuffer())
Dim x As Integer = 0
While x < outputs
If outputIDs(x) = errorOutputID Then
Me.errorBuffer = buffers(x)
Else
Me.defaultBuffer = buffers(x)
End If
System.Math.Min(System.Threading.Interlocked.Increment(x),x-1)
End While
Dim rows As Integer = 100
Dim random As Random = New Random(System.DateTime.Now.Millisecond)
Dim row As Integer = 0
While row < rows
Try
defaultBuffer.AddRow
Dim x As Integer = 0
While x < columnIndex.Length
defaultBuffer(columnIndex(x)) = random.Next
System.Math.Min(System.Threading.Interlocked.Increment(x),x-1)
End While
' Simulate an error.
If (row Mod 2) = 0 Then
Throw New Exception("A simulated error.")
End If
Catch
' Add a row to the error buffer.
' Add a row to the error buffer.
errorBuffer.AddRow
' Get the values from the default buffer
' and copy them to the error buffer.
Dim x As Integer = 0
While x < columnIndex.Length
errorBuffer(columnIndex(x)) = defaultBuffer(columnIndex(x))
System.Math.Min(System.Threading.Interlocked.Increment(x),x-1)
End While
' Set the error information.
errorBuffer.SetErrorInfo(errorOutputID, 1, 0)
' Remove the row that was added to the default buffer.
defaultBuffer.RemoveRow
End Try
System.Math.Min(System.Threading.Interlocked.Increment(row),row-1)
End While
If Not (defaultBuffer Is Nothing) Then
defaultBuffer.SetEndOfRowset
End If
If Not (errorBuffer Is Nothing) Then
errorBuffer.SetEndOfRowset
End If
End Sub
See Also
Error Handling in Data
Using Error Outputs
Developing a User Interface for a Data Flow
Component
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Component developers can provide a custom user interface for a component, which is displayed in SQL Server
Data Tools (SSDT) when the component is edited. Implementing a custom user interface provides you with
notification when the component is added to or deleted from a data flow task, and when help is requested for the
component.
If you do not provide a custom user interface for your component, users can still configure the component and its
custom properties by using the Advanced Editor. You can ensure that the Advanced Editor allows users to edit
custom property values appropriately by using the TypeConverter and UITypeEditor properties of the
IDTSCustomProperty100 when appropriate. For more information, see "Creating Custom Properties" in Design-
time Methods of a Data Flow Component.
[DtsPipelineComponent(
DisplayName="SampleComponent",
UITypeName="MyNamespace.MyComponentUIClassName,MyAssemblyName,Version=1.0.0.0,Culture=neutral,PublicKeyToken=a
bcd...",
ComponentType = ComponentType.Transform)]
public class SampleComponent : PipelineComponent
{
//TODO: Implement the component here.
}
<DtsPipelineComponent(DisplayName="SampleComponent", _
UITypeName="MyNamespace.MyComponentUIClassName,MyAssemblyName,Version=1.0.0.0,Culture=neutral,PublicKeyToken=a
bcd...", ComponentType=ComponentType.Transform)> _
Public Class SampleComponent
Inherits PipelineComponent
End Class
IErrorCollectionService Used to capture events from data flow components when you
need to capture all the errors and warnings raised by the
component instead of receiving only the last error or warning.
These services provide component developers the ability to access and create objects in the package in which the
component is loaded.
Sample
The following code example shows the integration of a custom user interface class that implements the
IDtsComponentUI interface, and a Windows form that serves as the editor for a component.
Custom User Interface Class
The following code shows the class that implements the IDtsComponentUI interface. The Edit method creates the
component editor and then displays the form. The return value of the form determines whether changes to the
component are persisted.
using System;
using System.Windows.Forms;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Pipeline.Design;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
namespace Microsoft.Samples.SqlServer.Dts
{
public class SampleComponentUI : IDtsComponentUI
{
IDTSComponentMetaData100 md;
IServiceProvider sp;
if (result == DialogResult.OK)
return true;
return false;
}
public void Initialize(IDTSComponentMetaData100 dtsComponentMetadata, IServiceProvider
serviceProvider)
{
// Store the component metadata.
this.md = dtsComponentMetadata;
}
}
}
Imports System
Imports System.Windows.Forms
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.SqlServer.Dts.Pipeline.Design
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Namespace Microsoft.Samples.SqlServer.Dts
End Namespace
Custom Editor
The following code shows the implementation of the Windows form that is shown during the call to the Edit
method.
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime;
namespace Microsoft.Samples.SqlServer.Dts
{
public partial class SampleComponentUIForm : System.Windows.Forms.Form
{
private Connections connections;
private Variables variables;
private IDTSComponentMetaData100 metaData;
private CManagedComponentWrapper designTimeInstance;
private System.ComponentModel.IContainer components = null;
this.Close();
}
Namespace Microsoft.Samples.SqlServer.Dts
Public Sub New(ByVal cons As Connections, ByVal vars As Variables, ByVal md As IDTSComponentMetaData100)
variables = vars
connections = cons
metaData = md
End Sub
End Namespace
See Also
Creating a Custom Data Flow Component
Upgrading the Version of a Data Flow Component
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Packages that were created with an older version of your component may contain metadata that is no longer valid,
such as custom properties whose usage has been modified in newer versions of the component. You can override
the PerformUpgrade method of the PipelineComponent base class to update the metadata previously saved in
older packages to reflect the current properties of your component.
NOTE
When you recompile a custom component for a new version of Integration Services, you do not have to change the value of
the CurrentVersion property if the component's properties have not changed.
Example
The following sample contains code from version 2.0 of a fictitious data flow component. The new version number
is defined in the CurrentVersion property of the DtsPipelineComponentAttribute. The component has a property
that defines how numeric values that exceed a threshold are to be handled. In version 1.0 of the fictitious
component, this property was named RaiseErrorOnInvalidValue and accepted a Boolean value of true or false. In
version 2.0 of the fictitious component, the property has been renamed to InvalidValueHandling and accepts one
of four possible values from a custom enumeration.
The overridden PerformUpgrade method in the following sample performs the following actions:
Gets the current version of the component.
Gets the value of the old custom property.
Removes the old property from the custom property collection.
Sets the value of the new custom property based on the value of the old property, if possible.
Sets the version metadata to the current version of the component.
NOTE
The data flow engine passes its own version number into the PerformUpgrade method in the pipelineVersion parameter. This
parameter is not useful in version 1.0 of Integration Services, but may become useful in subsequent versions.
The sample code uses only the two enumeration values that map directly to the prior Boolean values for the
custom property. Users can select the other available enumeration values through the component's custom user
interface, in the Advanced Editor, or programmatically. For information on displaying enumeration values for a
custom property in the Advanced Editor, see "Creating Custom Properties" in Design-time Methods of a Data Flow
Component.
Imports Microsoft.SqlServer.Dts.Pipeline
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
<DtsPipelineComponent(ComponentType:=ComponentType.Transform, CurrentVersion:=2)> _
Public Class PerformUpgrade
Inherits PipelineComponent
' Define the set of possible values for the new custom property.
Private Enum InvalidValueHandling
Ignore
FireInformation
FireWarning
FireError
End Enum
' Get the current value of the old custom property, RaiseErrorOnInvalidValue,
' and then remove the property from the custom property collection.
Dim oldValue As Boolean = False
Try
Dim oldProperty As IDTSCustomProperty100 = _
ComponentMetaData.CustomPropertyCollection("RaiseErrorOnInvalidValue")
oldValue = CType(oldProperty.Value, Boolean)
ComponentMetaData.CustomPropertyCollection.RemoveObjectByIndex("RaiseErrorOnInvalidValue")
Catch ex As Exception
' If the old custom property is not available, ignore the error.
End Try
End If
' Update the saved component version metadata to the current version.
ComponentMetaData.Version = currentVersion
End Sub
End Class
using System;
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
}
Developing a Custom Destination Component
11/2/2020 • 11 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Microsoft SQL Server Integration Services gives developers the ability to write custom destination components
that can connect to and store data in any custom data source. Custom destination components are useful when
you need to connect to data sources that cannot be accessed by using one of the existing source components
included with Integration Services.
Destination components have one or more inputs and zero outputs. At design time, they create and configure
connections and read column metadata from the external data source. During execution, they connect to their
external data source and add rows that are received from the components upstream in the data flow to the
external data source. If the external data source exists prior to execution of the component, the destination
component must also ensure that the data types of the columns that the component receives match the data types
of the columns at the external data source.
This section discusses the details of how to develop destination components, and provides code examples to
clarify important concepts. For a general overview of data flow component development, see Developing a
Custom Data Flow Component.
Design Time
Implementing the design-time functionality of a destination component involves specifying a connection to an
external data source and validating that the component has been correctly configured. By definition, a destination
component has one input and possibly one error output.
Creating the Component
Destination components connect to external data sources by using ConnectionManager objects defined in a
package. The destination component indicates its requirement for a connection manager to the SSIS Designer, and
to users of the component, by adding an element to the RuntimeConnectionCollection collection of the
ComponentMetaData. This collection serves two purposes: first, it advertises the need for a connection manager to
SSIS Designer; then, after the user has selected or created a connection manager, it holds a reference to the
connection manager in the package that is being used by the component. When an IDTSRuntimeConnection100 is
added to the collection, the Advanced Editor displays the Connection Proper ties tab, to prompt the user to
select or create a connection in the package for use by the component.
The following code sample shows an implementation of ProvideComponentProperties that adds an input, and
then adds a IDTSRuntimeConnection100 object to the RuntimeConnectionCollection.
using System;
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime;
namespace Microsoft.Samples.SqlServer.Dts
{
[DtsPipelineComponent(DisplayName = "Destination Component",ComponentType
=ComponentType.DestinationAdapter)]
public class DestinationComponent : PipelineComponent
{
public override void ProvideComponentProperties()
{
// Reset the component.
base.RemoveAllInputsOutputsAndCustomProperties();
ComponentMetaData.RuntimeConnectionCollection.RemoveAll();
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports Microsoft.SqlServer.Dts.Pipeline
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime
Namespace Microsoft.Samples.SqlServer.Dts
<DtsPipelineComponent(DisplayName:="Destination Component",
ComponentType:=ComponentType.DestinationAdapter)> _
Public Class DestinationComponent
Inherits PipelineComponent
End Sub
End Class
End Namespace
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
if (cmado == null)
throw new Exception("The ConnectionManager " + cm.Name + " is not an ADO.NET connection.");
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Dim cm As ConnectionManager =
DtsConvert.GetWrapper(ComponentMetaData.RuntimeConnectionCollection(0).ConnectionManager)
Dim cmado As ConnectionManagerAdoNet = CType(cm.InnerObject,ConnectionManagerAdoNet)
If IsNothing(cmado) Then
Throw New Exception("The ConnectionManager " + cm.Name + " is not an ADO.NET connection.")
End If
End If
End Sub
End Sub
End Sub
Run Time
During execution, the destination component receives a call to the ProcessInput method each time a full
PipelineBuffer is available from the upstream component. This method is called repeatedly until there are no more
buffers available and the EndOfRowset property is true . During this method, destination components read
columns and rows in the buffer, and add them to the external data source.
Locating Columns in the Buffer
The input buffer for a component contains all the columns defined in the output column collections of the
components upstream from the component in the data flow. For example, if a source component provides three
columns in its output, and the next component adds an additional output column, the buffer provided to the
destination component contains four columns, even if the destination component will write only two columns.
The order of the columns in the input buffer is not defined by the index of the column in the input column
collection of the destination component. Columns can be reliably located in a buffer row only by using the
FindColumnByLineageID method of the BufferManager. This method locates the column that has the specified
lineage ID in the specified buffer, and returns its location in the row. The indexes of the input columns are typically
located during the PreExecute method, and cached by the developer for use later during ProcessInput.
The following code example finds the location of the input columns in the buffer during PreExecute and stores
them in an array. The array is subsequently used during ProcessInput to read the values of the columns in the
buffer.
int[] cols;
ReDim cols(input.InputColumnCollection.Count)
End Sub
Processing Rows
Once the input columns have been located in the buffer, they can be read and written to the external data source.
While the destination component writes rows to the external data source, you may want to update the "Rows read"
or "BLOB bytes read" performance counters by calling the IncrementPipelinePerfCounter method. For more
information, see Performance Counters.
The following example shows a component that reads rows from the buffer provided in ProcessInput. The indexes
of the columns in the buffer were located during PreExecute in the preceding code example.
While (buffer.NextRow())
Next col
End While
End Sub
Sample
The following sample shows a simple destination component that uses a File connection manager to save binary
data from the data flow into files. This sample does not demonstrate all the methods and functionality discussed in
this topic. It demonstrates the important methods that every custom destination component must override, but
does not contain code for design-time validation.
using System;
using System.IO;
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
namespace BlobDst
{
[DtsPipelineComponent(DisplayName = "BLOB Extractor Destination", Description = "Writes values of BLOB
columns to files")]
public class BlobDst : PipelineComponent
{
string m_DestDir;
int m_FileNameColumnIndex = -1;
int m_BlobColumnIndex = -1;
custProp = inputColumn.CustomPropertyCollection.New();
custProp.Name = "IsFileName";
custProp.Value = (object)false;
custProp = inputColumn.CustomPropertyCollection.New();
custProp.Name = "IsBLOB";
custProp.Value = (object)false;
return inputColumn;
}
custProp = column.CustomPropertyCollection["IsBLOB"];
if ((bool)custProp.Value == true)
{
m_BlobColumnIndex = (int)BufferManager.FindColumnByLineageID(input.Buffer, column.LineageID);
}
}
}
strFileName = TranslateFileName(strFileName);
Imports System
Imports System.IO
Imports Microsoft.SqlServer.Dts.Pipeline
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Namespace BlobDst
See Also
Developing a Custom Source Component
Creating a Destination with the Script Component
Developing a Custom Source Component
11/2/2020 • 16 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
SQL Server Integration Services gives developers the ability to write source components that can connect to
custom data sources and supply data from those sources to other components in a data flow task. The ability to
create custom sources is valuable when you must connect to data sources that cannot be accessed by using one of
the existing Integration Services sources.
Source components have one or more outputs and zero inputs. At design time, source components are used to
create and configure connections, read column metadata from the external data source, and configure the source's
output columns based on the external data source. During execution they connect to the external data source and
add rows to an output buffer. The data flow task then provides this buffer of data rows to downstream
components.
For a general overview of data flow component development, see Developing a Custom Data Flow Component.
Design Time
Implementing the design-time functionality of a source component involves specifying a connection to an external
data source, adding and configuring output columns that reflect the data source, and validating that the
component is ready to execute. By definition, a source component has zero inputs and one or more asynchronous
outputs.
Creating the Component
Source components connect to external data sources by using ConnectionManager objects defined in a package.
They indicate their requirement for a connection manager by adding an element to the
RuntimeConnectionCollection collection of the ComponentMetaData property. This collection serves two
purposes-to hold references to connection managers in the package used by the component, and to advertise the
need for a connection manager to the designer. When an IDTSRuntimeConnection100 has been added to the
collection, the Advanced Editor displays the Connection Proper ties tab, which lets users select or create a
connection in the package.
The following code example shows an implementation of ProvideComponentProperties that adds an output, and
adds a IDTSRuntimeConnection100 object to the RuntimeConnectionCollection.
using System;
using System.Collections;
using System.Data;
using System.Data.SqlClient;
using System.Data.OleDb;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
namespace Microsoft.Samples.SqlServer.Dts
{
[DtsPipelineComponent(DisplayName = "MySourceComponent",ComponentType = ComponentType.SourceAdapter)]
public class MyComponent : PipelineComponent
{
public override void ProvideComponentProperties()
{
// Reset the component.
base.RemoveAllInputsOutputsAndCustomProperties();
ComponentMetaData.RuntimeConnectionCollection.RemoveAll();
Imports System.Data
Imports System.Data.SqlClient
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Imports Microsoft.SqlServer.Dts.Pipeline
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
<DtsPipelineComponent(DisplayName:="MySourceComponent", ComponentType:=ComponentType.SourceAdapter)> _
Public Class MySourceComponent
Inherits PipelineComponent
End Sub
End Class
if (cmado == null)
throw new Exception("The ConnectionManager " + cm.Name + " is not an ADO.NET connection.");
Dim cm As ConnectionManager =
Microsoft.SqlServer.Dts.Runtime.DtsConvert.GetWrapper(ComponentMetaData.RuntimeConnectionCollection(0).Connec
tionManager)
Dim cmado As ConnectionManagerAdoNet = CType(cm.InnerObject, ConnectionManagerAdoNet)
If IsNothing(cmado) Then
Throw New Exception("The ConnectionManager " + cm.Name + " is not an ADO.NET connection.")
End If
End If
End Sub
End Sub
DT_CY 0 0 0 0
Because the restrictions on the data type properties are based on the data type of the output column, you must
choose the correct SSIS data type when you work with managed types. The base class provides three helper
methods, ConvertBufferDataTypeToFitManaged, BufferTypeToDataRecordType, and DataRecordTypeToBufferType,
to assist managed component developers in selecting an SSIS data type given a managed type. These methods
convert managed data types to SSIS data types, and vice versa.
The following code example shows how the output column collection of a component is populated based on the
schema of a table. The helper methods of the base class are used to set the data type of the column, and the
dependent properties are set based on the data type.
SqlCommand sqlCommand;
switch (dt)
{
// The length cannot be zero, and the code page property must contain a valid code page.
case DataType.DT_STR:
case DataType.DT_TEXT:
length = precision;
precision = 0;
scale = 0;
break;
case DataType.DT_WSTR:
length = precision;
codepage = 0;
scale = 0;
precision = 0;
break;
case DataType.DT_BYTES:
precision = 0;
scale = 0;
codepage = 0;
break;
case DataType.DT_NUMERIC:
length = 0;
codepage = 0;
if (scale > 6)
scale = 6;
break;
case DataType.DT_DECIMAL:
length = 0;
precision = 0;
codepage = 0;
break;
default:
length = 0;
precision = 0;
codepage = 0;
scale = 0;
break;
}
' Start clean, and remove the columns from both collections.
output.OutputColumnCollection.RemoveAll()
output.ExternalMetadataColumnCollection.RemoveAll()
Me.sqlCommand = sqlConnection.CreateCommand()
Me.sqlCommand.CommandType = CommandType.Text
Me.sqlCommand.CommandText = CStr(ComponentMetaData.CustomPropertyCollection("SqlStatement").Value)
Select Case dt
' The length cannot be zero, and the code page property must contain a valid code page.
Case DataType.DT_STR
Case DataType.DT_TEXT
length = precision
precision = 0
scale = 0
Case DataType.DT_WSTR
length = precision
codepage = 0
scale = 0
precision = 0
Case DataType.DT_BYTES
precision = 0
scale = 0
codepage = 0
Case DataType.DT_NUMERIC
length = 0
codepage = 0
Case DataType.DT_DECIMAL
length = 0
precision = 0
codepage = 0
Case Else
length = 0
precision = 0
codepage = 0
scale = 0
End Select
}
Private Sub CreateExternalMetaDataColumn(ByVal output As IDTSOutput100, ByVal outputColumn As
IDTSOutputColumn100)
End Sub
Run Time
During execution, components add rows to output buffers that are created by the data flow task and provided to
the component in PrimeOutput. Called once for source components, the method receives an output buffer for
each IDTSOutput100 of the component that is connected to a downstream component.
Locating Columns in the Buffer
The output buffer for a component contains the columns defined by the component and any columns added to
the output of a downstream component. For example, if a source component provides three columns in its output,
and the next component adds a fourth output column, the output buffer provided for use by the source
component contains these four columns.
The order of the columns in a buffer row is not defined by the index of the output column in the output column
collection. An output column can only be accurately located in a buffer row by using the FindColumnByLineageID
method of the BufferManager. This method locates the column with the specified lineage ID in the specified buffer,
and returns its location in the row. The indexes of the output columns are typically located in the PreExecute
method, and stored for use during PrimeOutput.
The following code example finds the location of the output columns in the output buffer during a call to
PreExecute, and stores them in an internal structure. The name of the column is also stored in the structure and is
used in the code example for the PrimeOutput method in the next section of this topic.
ArrayList columnInformation;
Processing Rows
Rows are added to the output buffer by calling the AddRow method, which creates a new buffer row with empty
values in its columns. The component then assigns values to the individual columns. The output buffers provided
to a component are created and monitored by the data flow task. As they become full, the rows in the buffer are
moved to the next component. There is no way to determine when a batch of rows has been sent to the next
component because the movement of rows by the data flow task is transparent to the component developer, and
the RowCount property is always zero on output buffers. When a source component is finished adding rows to its
output buffer, it notifies the data flow task by calling the SetEndOfRowset method of the PipelineBuffer, and the
remaining rows in the buffer are passed to the next component.
While the source component reads rows from the external data source, you may want to update the "Rows read"
or "BLOB bytes read" performance counters by calling the IncrementPipelinePerfCounter method. For more
information, see Performance Counters.
The following code example shows a component that adds rows to an output buffer in PrimeOutput. The indexes
of the output columns in the buffer were located using PreExecute in the previous code example.
if (dataReader.IsDBNull(ordinal))
buffer.SetNull(ci.BufferColumnIndex);
else
{
buffer[ci.BufferColumnIndex] = dataReader[ci.ColumnName];
}
}
}
buffer.SetEndOfRowset();
}
Public Overrides Sub PrimeOutput(ByVal outputs As Integer, ByVal outputIDs As Integer(), ByVal buffers As
PipelineBuffer())
If (dataReader.IsDBNull(ordinal)) Then
buffer.SetNull(ci.BufferColumnIndex)
Else
buffer(ci.BufferColumnIndex) = dataReader(ci.ColumnName)
End If
Next
End While
buffer.SetEndOfRowset()
End Sub
Sample
The following sample shows a simple source component that uses a File connection manager to load the binary
contents of files into the data flow. This sample does not demonstrate all the methods and functionality discussed
in this topic. It demonstrates the important methods that every custom source component must override, but
does not contain code for design-time validation.
using System;
using System.IO;
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
namespace BlobSrc
{
[DtsPipelineComponent(DisplayName = "BLOB Inserter Source", Description = "Inserts files into the data flow
as BLOBs")]
public class BlobSrc : PipelineComponent
{
IDTSConnectionManager100 m_ConnMgr;
int m_FileNameColumnIndex = -1;
int m_FileBlobColumnIndex = -1;
column = output.OutputColumnCollection.New();
column.Name = "FileBLOB";
column.SetDataTypeProperties(DataType.DT_IMAGE, 0, 0, 0, 0);
m_FileNameColumnIndex = (int)BufferManager.FindColumnByLineageID(output.Buffer,
output.OutputColumnCollection[0].LineageID);
m_FileBlobColumnIndex = (int)BufferManager.FindColumnByLineageID(output.Buffer,
output.OutputColumnCollection[1].LineageID);
}
buffers[0].SetString(m_FileNameColumnIndex, strFileName);
buffers[0].AddBlobData(m_FileBlobColumnIndex, fileData);
strFileName = (string)m_ConnMgr.AcquireConnection(null);
}
buffers[0].SetEndOfRowset();
}
}
}
Imports System
Imports System.IO
Imports Microsoft.SqlServer.Dts.Pipeline
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Namespace BlobSrc
Public Overrides Sub PrimeOutput(ByVal outputs As Integer, ByVal outputIDs As Integer(), ByVal buffers As
PipelineBuffer())
Dim strFileName As String = CType(m_ConnMgr.AcquireConnection(Nothing), String)
While Not (strFileName Is Nothing)
buffers(0).AddRow
buffers(0).SetString(m_FileNameColumnIndex, strFileName)
Dim fileInfo As FileInfo = New FileInfo(strFileName)
Dim fileData(fileInfo.Length) As Byte
Dim fs As FileStream = New FileStream(strFileName, FileMode.Open, FileAccess.Read, FileShare.Read)
fs.Read(fileData, 0, fileData.Length)
buffers(0).AddBlobData(m_FileBlobColumnIndex, fileData)
strFileName = CType(m_ConnMgr.AcquireConnection(Nothing), String)
End While
buffers(0).SetEndOfRowset
End Sub
End Class
End Namespace
See Also
Developing a Custom Destination Component
Creating a Source with the Script Component
Developing a Custom Transformation Component
with Asynchronous Outputs
11/2/2020 • 9 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
You use a component with asynchronous outputs when a transform cannot output rows until the component has
received all its input rows, or when the transformation does not produce exactly one output row for each row
received as input. The Aggregate transformation, for example, cannot calculate a sum across rows until it has read
all the rows. In contrast, you can use a component with synchronous outputs any time when you modify each row
of data as it passes through. You can modify the data for each row in place, or you can create one or more new
columns, each of which has a value for every one of the input rows. For more information about the difference
between synchronous and asynchronous components, see Understanding Synchronous and Asynchronous
Transformations.
Transformation components with asynchronous outputs are unique because they act as both destination and
source components. This kind of component receives rows from upstream components, and adds rows that are
consumed by downstream components. No other data flow component performs both of these operations.
The columns from upstream components that are available to a component with synchronous outputs are
automatically available to components downstream from the component. Therefore, a component with
synchronous outputs does not have to define any output columns to provide columns and rows to the next
component. Components with asynchronous outputs, on the other hand, must define output columns and
provide rows to downstream components. Therefore a component with asynchronous outputs has more tasks to
perform during both design and execution time, and the component developer has more code to implement.
SQL Server Integration Services contains several transformations with asynchronous outputs. For example, the
Sort transformation requires all its rows before it can sort them, and achieves this by using asynchronous
outputs. After it has received all its rows, it sorts them and adds them to its output.
This section explains in detail how to develop transformations with asynchronous outputs. For more information
about source component development, see Developing a Custom Source Component.
Design Time
Creating the Component
The SynchronousInputID property on the IDTSOutput100 object identifies whether an output is synchronous or
asynchronous. To create an asynchronous output, add the output to the component and set the
SynchronousInputID to zero. Setting this property also determines whether the data flow task allocates
PipelineBuffer objects for both the input and output of the component, or whether a single buffer is allocated and
shared between the two objects.
The following sample code shows a component that creates an asynchronous output in its
ProvideComponentProperties implementation.
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime;
namespace Microsoft.Samples.SqlServer.Dts
{
[DtsPipelineComponent(DisplayName = "AsyncComponent",ComponentType = ComponentType.Transform)]
public class AsyncComponent : PipelineComponent
{
public override void ProvideComponentProperties()
{
// Call the base class, which adds a synchronous input
// and output.
base.ProvideComponentProperties();
Imports Microsoft.SqlServer.Dts.Pipeline
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime
<DtsPipelineComponent(DisplayName:="AsyncComponent", ComponentType:=ComponentType.Transform)> _
Public Class AsyncComponent
Inherits PipelineComponent
End Sub
End Class
The following code example shows a component that adds an output column to its output column collection for
each column available from the upstream component.
Next
End Sub
Run Time
Components with asynchronous outputs also execute a different sequence of methods at run time than other
types of components. First, they are the only components that receive a call to both the PrimeOutput and the
ProcessInput methods. Components with asynchronous outputs also require access to all the incoming rows
before they can start processing; therefore, they must cache the input rows internally until all rows have been
read. Finally, unlike other components, components with asynchronous outputs receive both an input buffer and
an output buffer.
Understanding the Buffers
The input buffer is received by the component during ProcessInput. This buffer contains the rows added to the
buffer by upstream components. The buffer also contains the columns of the component's input, in addition to the
columns that were provided in the output of an upstream component but were not added to the asynchronous
component's input collection.
The output buffer, which is provided to the component in PrimeOutput, does not initially contain rows. The
component adds rows to this buffer and provides the buffer to downstream components when it is full. The
output buffer contains the columns defined in the component's output column collection, in addition to any
columns that other downstream components have added to their outputs.
This is different behavior from that of components with synchronous outputs, which receive a single shared
buffer. The shared buffer of a component with synchronous outputs contains both the input and output columns
of the component, in addition to columns added to the outputs of upstream and downstream components.
Processing Rows
Caching Input Rows
When you write a component with asynchronous outputs, you have three options for adding rows to the output
buffer. You can add them as input rows are received, you can cache them until the component has received all the
rows from the upstream component, or you can add them when it is appropriate to do so for the component. The
method that you choose depends on the requirements of the component. For example, the Sort component
requires that all the upstream rows be received before they can be sorted. Therefore, it waits until all rows have
been read before adding rows to the output buffer.
The rows that are received in the input buffer must be cached internally by the component until it is ready to
process them. The incoming buffer rows can be cached in a data table, a multidimensional array, or any other
internal structure.
Adding Output Rows
Whether you add rows to the output buffer as they are received or after receiving all of the rows, you do so by
calling the AddRow method on the output buffer. After you have added the row, you set the values of each column
in the new row.
Because there are sometimes more columns in the output buffer than in the output column collection of the
component, you must locate the index of the appropriate column in the buffer before you can set its value. The
FindColumnByLineageID method of the BufferManager property returns the index of the column in the buffer
row with the specified lineage ID, which is then used to assign the value to the buffer column.
The PreExecute method, which is called before the PrimeOutput method or the ProcessInput method, is the first
method where the BufferManager property is available, and the first opportunity to locate the indexes of the
columns in the input and output buffers.
Sample
The following sample shows a simple transformation component with asynchronous outputs that adds rows to
the output buffer as they are received. This sample does not demonstrate all the methods and functionality
discussed in this topic. It demonstrates the important methods that every custom transformation component with
asynchronous outputs must override, but does not contain code for design-time validation. Also, the code in
ProcessInput assumes that the output column collection has one column for each column in the input column
collection.
using System;
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
namespace Microsoft.Samples.SqlServer.Dts
{
[DtsPipelineComponent(DisplayName = "AsynchronousOutput")]
public class AsynchronousOutput : PipelineComponent
{
PipelineBuffer outputBuffer;
int[] inputColumnBufferIndexes;
int[] outputColumnBufferIndexes;
Imports System
Imports Microsoft.SqlServer.Dts.Pipeline
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Namespace Microsoft.Samples.SqlServer.Dts
<DtsPipelineComponent(DisplayName:="AsynchronousOutput")> _
Public Class AsynchronousOutput
Inherits PipelineComponent
' Let the base class add the input and output objects.
Me.ProvideComponentProperties()
ReDim inputColumnBufferIndexes(input.InputColumnCollection.Count)
ReDim outputColumnBufferIndexes(output.OutputColumnCollection.Count)
End Sub
Public Overrides Sub PrimeOutput(ByVal outputs As Integer, ByVal outputIDs As Integer(), ByVal
buffers As PipelineBuffer())
End Sub
' Copy the data from the input buffer column to the output buffer column.
outputBuffer(outputColumnBufferIndexes(x)) = buffer(inputColumnBufferIndexes(x))
Next
End While
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Transformation components with synchronous outputs receive rows from upstream components, and read or
modify the values in the columns of these rows as they pass the rows to downstream components. They may also
define additional output columns that are derived from the columns provided by upstream components, but they
do not add rows to the data flow. For more information about the difference between synchronous and
asynchronous components, see Understanding Synchronous and Asynchronous Transformations.
This kind of component is suited for tasks where the data is modified inline as it is provided to the component
and where the component does not have to see all the rows before processing them. It is the easiest component
to develop because transformations with synchronous outputs typically do not connect to external data sources,
manage external metadata columns, or add rows to output buffers.
Creating a transformation component with synchronous outputs involves adding an IDTSInput100 that will
contain the upstream columns selected for the component, and a IDTSOutput100 object that may contain derived
columns created by the component. It also includes implementing the design-time methods, and providing code
that reads or modifies the columns in the incoming buffer rows during execution.
This section provides the information that is required to implement a custom transformation component, and
provides code examples to help you better understand the concepts.
Design Time
The design-time code for this component involves creating the inputs and outputs, adding any additional output
columns that the component generates, and validating the configuration of the component.
Creating the Component
The inputs, outputs, and custom properties of the component are typically created during the
ProvideComponentProperties method. There are two ways that you can add the input and the output of a
transformation component with synchronous outputs. You can use the base class implementation of the method
and then modify the default input and output that it creates, or you can explicitly add the input and output
yourself.
The following code example shows an implementation of ProvideComponentProperties that explicitly adds the
input and output objects. The call to the base class that would accomplish the same thing is included in a
comment.
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime;
namespace Microsoft.Samples.SqlServer.Dts
{
[DtsPipelineComponent(DisplayName = "SynchronousComponent", ComponentType = ComponentType.Transform)]
public class SyncComponent : PipelineComponent
{
// Alternatively, you can let the base class add the input and output
// and set the SynchronousInputID of the output to the ID of the input.
// base.ProvideComponentProperties();
}
}
}
Imports Microsoft.SqlServer.Dts.Pipeline
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime
<DtsPipelineComponent(DisplayName:="SynchronousComponent", ComponentType:=ComponentType.Transform)> _
Public Class SyncComponent
Inherits PipelineComponent
' Alternatively, you can let the base class add the input and output
' and set the SynchronousInputID of the output to the ID of the input.
' base.ProvideComponentProperties();
End Sub
End Class
DT_CY 0 0 0 0
Because the restrictions on the data type properties are based on the data type of the output column, you must
choose the correct Integration Services data type when you work with managed types. The base class provides
three helper methods, ConvertBufferDataTypeToFitManaged, BufferTypeToDataRecordType, and
DataRecordTypeToBufferType that assist managed component developers in selecting an SSIS data type given a
managed type. These methods convert managed data types to SSIS data types, and vice versa.
Run Time
Generally, the implementation of the run-time part of the component is categorized into two tasks-locating the
input and output columns of the component in the buffer, and reading or writing the values of these columns in
the incoming buffer rows.
Locating Columns in the Buffer
The number of columns in the buffers that are provided to a component during execution will likely exceed the
number of columns in the input or output collections of the component. This is because each buffer contains all
the output columns defined in the components in a data flow. To ensure that the buffer columns are correctly
matched to the columns of the input or output, component developers must use the FindColumnByLineageID
method of the BufferManager. This method locates a column in the specified buffer by its lineage ID. Typically
columns are located during PreExecute because this is the first run-time method where the BufferManager
property becomes available.
The following code example shows a component that locates indexes of the columns in its input and output
column collection during PreExecute. The column indexes are stored in an integer array, and can be accessed by
the component during ProcessInput.
int []inputColumns;
int []outputColumns;
ReDim inputColumns(input.InputColumnCollection.Count)
ReDim outputColumns(output.OutputColumnCollection.Count)
End Sub
Processing Rows
Components receive PipelineBuffer objects that contain rows and columns in the ProcessInput method. During
this method the rows in the buffer are iterated, and the columns identified during PreExecute are read and
modified. The method is called repeatedly by the data flow task until no more rows are provided from the
upstream component.
An individual column in the buffer is read or written by using the array indexer access method, or by using one of
the Get or Set methods. The Get and Set methods are more efficient and should be used when the data type of
the column in the buffer is known.
The following code example shows an implementation of the ProcessInput method that processes incoming
rows.
public override void ProcessInput( int InputID, PipelineBuffer buffer)
{
while( buffer.NextRow())
{
for(int x=0; x < inputColumns.Length;x++)
{
if(!buffer.IsNull(inputColumns[x]))
{
object columnData = buffer[inputColumns[x]];
// TODO: Modify the column data.
buffer[inputColumns[x]] = columnData;
}
}
}
}
While (buffer.NextRow())
End If
Next
End While
End Sub
Sample
The following sample shows a simple transformation component with synchronous outputs that converts the
values of all string columns to uppercase. This sample does not demonstrate all the methods and functionality
discussed in this topic. It demonstrates the important methods that every custom transformation component
with synchronous outputs must override, but does not contain code for design-time validation.
using System;
using System.Collections;
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
namespace Uppercase
{
[DtsPipelineComponent(DisplayName = "Uppercase")]
public class Uppercase : PipelineComponent
{
ArrayList m_ColumnIndexList = new ArrayList();
<DtsPipelineComponent(DisplayName="Uppercase")> _
Public Class Uppercase
Inherits PipelineComponent
Private m_ColumnIndexList As ArrayList = New ArrayList
See Also
Developing a Custom Transformation Component with Asynchronous Outputs
Understanding Synchronous and Asynchronous Transformations
Creating a Synchronous Transformation with the Script Component
Developing Data Flow Components with Multiple
Inputs
11/2/2020 • 6 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
A data flow component with multiple inputs may consume excessive memory if its multiple inputs produce data at
uneven rates. When you develop a custom data flow component that supports two or more inputs, you can
manage this memory pressure by using the following members in the Microsoft.SqlServer.Dts.Pipeline namespace:
The SupportsBackPressure property of the DtsPipelineComponentAttribute class. Set the value of this
property to true if you want to implement the code that is necessary for your custom data flow component
to manage data flowing at uneven rates.
The IsInputReady method of the PipelineComponent class. You must provide an implementation of this
method if you set the SupportsBackPressure property to true . If you do not provide an implementation, the
data flow engine raises an exception at run time.
The GetDependentInputs method of the PipelineComponent class. You must also provide an implementation
of this method if you set the SupportsBackPressure property to true and your custom component supports
more than two inputs. If you do not provide an implementation, the data flow engine raises an exception at
run time if the user attaches more than two inputs.
Together, these members enable you to develop a solution for memory pressure that is similar to the solution that
Microsoft developed for the Merge and Merge Join transformations.
[DtsPipelineComponent(ComponentType = ComponentType.Transform,
DisplayName = "Shuffler",
Description = "Shuffle the rows from input.",
SupportsBackPressure = true,
LocalizationType = typeof(Localized),
IconResource = "Microsoft.Samples.SqlServer.Dts.MIBPComponent.ico")
]
public class Shuffler : Microsoft.SqlServer.Dts.Pipeline.PipelineComponent
{
...
}
NOTE
Your implementation of the IsInputReady method should not call the implementations in the base class. The default
implementation of this method in the base class simply raises a NotImplementedException .
When you implement this method, you set the status of an element in the Boolean canProcess array for each of the
component's inputs. (The inputs are identified by their ID values in the inputIDs array.) When you set the value of an
element in the canProcess array to true for an input, the data flow engine calls the component's ProcessInput
method and provides more data for the specified input.
While more upstream data is available, the value of the canProcess array element for at least one input must always
be true , or processing stops.
The data flow engine calls the IsInputReady method before sending each buffer of data to determine which inputs
are waiting to receive more data. When the return value indicates that an input is blocked, the data flow engine
temporarily caches additional buffers of data for that input instead of sending them to the component.
NOTE
You do not call the IsInputReady or GetDependentInputs methods in your own code. The data flow engine calls these
methods, and the other methods of the PipelineComponent class that you override, when the data flow engine runs your
component.
Example
In the following example, the implementation of the IsInputReady method indicates that an input is waiting to
receive more data when the following conditions are true:
More upstream data is available for the input ( !inputEOR ).
The component does not currently have data available to process for the input in the buffers that the
component has already received ( inputBuffers[inputIndex].CurrentRow() == null ).
If an input is waiting to receive more data, the data flow component indicates this by setting to true the value of the
element in the canProcess array that corresponds to that input.
Conversely, when the component still has data available to process for the input, the example suspends the
processing of the input. The example does this by setting to false the value of the element in the canProcess array
that corresponds to that input.
The preceding example uses the Boolean inputEOR array to indicate whether more upstream data is available for
each input. EOR in the name of the array represents "end of rowset" and refers to the EndOfRowset property of
data flow buffers. In a portion of the example that is not included here, the ProcessInput method checks the value of
the EndOfRowset property for each buffer of data that it receives. When a value of true indicates that there is no
more upstream data available for an input, the example sets the value of the inputEOR array element for that input
to true . This example of the IsInputReady method sets the value of the corresponding element in the canProcess
array to false for an input when the value of the inputEOR array element indicates that there is no more upstream
data available for the input.
NOTE
Your implementation of the GetDependentInputs method should not call the implementations in the base class. The default
implementation of this method in the base class simply raises a NotImplementedException .
The data flow engine only calls the GetDependentInputs method when the user attaches more than two inputs to
the component. When a component has only two inputs, and the IsInputReady method indicates that one input is
blocked (canProcess = false ), the data flow engine knows that the other input is waiting to receive more data.
However, when there are more than two inputs, and the IsInputReady method indicates that one input is blocked,
the additional code in the GetDependentInputs identifies which inputs are waiting to receive more data.
NOTE
You do not call the IsInputReady or GetDependentInputs methods in your own code. The data flow engine calls these
methods, and the other methods of the PipelineComponent class that you override, when the data flow engine runs your
component.
Example
For a specific input that is blocked, the following implementation of the GetDependentInputs method returns a
collection of the inputs that are waiting to receive more data, and are therefore blocking the specified input. The
component identifies the blocking inputs by checking for inputs other than the blocked input that do not currently
have data available to process in the buffers that the component has already received (
inputBuffers[i].CurrentRow() == null ). The GetDependentInputs method then returns the collection of blocking
inputs as a collection of input IDs.
return currentDependencies;
}
Developing Specific Types of Data Flow Components
11/2/2020 • 2 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
This section covers the specifics of developing source components, transformation components with synchronous
outputs, transformation components with asynchronous outputs, and destination components.
For information about component development in general, see Developing a Custom Data Flow Component.
In This Section
Developing a Custom Source Component
Contains information on developing a component that accesses data from an external data source and supplies it
to downstream components in the data flow.
Developing a Custom Transformation Component with Synchronous Outputs
Contains information on developing a transformation component whose outputs are synchronous to its inputs.
These components do not add data to the data flow, but process data as it passes through.
Developing a Custom Transformation Component with Asynchronous Outputs
Contains information on developing a transformation component whose outputs are not synchronous to its
inputs. These components receive data from upstream components, but also add data to the dataflow.
Developing a Custom Destination Component
Contains information on developing a component that receives rows from upstream components in the data flow
and writes them to an external data source.
Reference
Microsoft.SqlServer.Dts.Pipeline
Contains the classes and interfaces used to create custom data flow components.
Microsoft.SqlServer.Dts.Pipeline.Wrapper
Contains the unmanaged classes and interfaces of the data flow task. The developer uses these, and the managed
Microsoft.SqlServer.Dts.Pipeline namespace, when building a data flow programmatically or creating custom data
flow components.
See Also
Comparing Scripting Solutions and Custom Objects
Developing Specific Types of Script Components
Adding Connections Programmatically
11/2/2020 • 5 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The ConnectionManager class represents physical connections to external data sources. The
ConnectionManager class isolates the implementation details of the connection from the runtime. This enables
the runtime to interact with each connection manager in a consistent and predictable manner. Connection
managers contain a set of stock properties that all connections have in common, such as the Name, ID,
Description, and ConnectionString. However, the ConnectionString and Name properties are ordinarily the only
properties required to configure a connection manager. Unlike other programming paradigms, where
connection classes expose methods such as Open or Connect to physically establish a connection to the data
source, the run-time engine manages all the connections for the package while it runs.
The Connections class is a collection of the connection managers that have been added to that package and are
available for use at run time. You can add more connection managers to the collection by using the Add
method of the collection, and supplying a string that indicates the connection manager type. The Add method
returns the ConnectionManager instance that was added to the package.
Intrinsic Properties
The ConnectionManager class exposes a set of properties that are common to all connections. However,
sometimes you need access to properties that are unique to the specific connection type. The Properties
collection of the ConnectionManager class provides access to these properties. The properties can be retrieved
from the collection using the indexer or the property name and the GetValue method, and the values are set
using the SetValue method. The properties of the underlying connection object properties can also be set by
acquiring an actual instance of the object and setting its properties directly. To get the underlying connection,
use the InnerObject property of the connection manager. The following line of code shows a C# line that
creates an ADO.NET connection manager that has the underlying class, ConnectionManagerAdoNetClass.
ConnectionManagerAdoNetClass cmado = cm.InnerObject as ConnectionManagerAdoNet;
This casts the managed connection manager object to its underlying connection object. If you are using C++,
the Quer yInterface method of the ConnectionManager object is called and the interface of the underlying
connection object is requested.
The following table lists the connection managers included with Integration Services. and the string that is used
in the package.Connections.Add("xxx") statement. For a list of all connection managers, see Integration Services
(SSIS) Connections.
ST RIN G C O N N EC T IO N M A N A GER
The following code example demonstrates adding an OLE DB and FILE connection to the Connections collection
of a Package. The example then sets the ConnectionString, Name, and Description properties.
using System;
using Microsoft.SqlServer.Dts.Runtime;
namespace Microsoft.SqlServer.Dts.Samples
{
class Program
{
static void Main(string[] args)
{
// Create a package, and retrieve its connections.
Package pkg = new Package();
Connections pkgConns = pkg.Connections;
Console.WriteLine();
Console.WriteLine("Number of connections in package: {0}", pkg.Connections.Count);
Console.Read();
}
}
// <summary>
// This class contains the definitions for multiple
// connection managers.
// </summary>
public class CreateConnection
{
// Private data.
private ConnectionManager ConMgr;
}
Imports Microsoft.SqlServer.Dts.Runtime
Module Module1
Sub Main()
Console.WriteLine()
Console.WriteLine("Number of connections in package: {0}", pkg.Connections.Count)
Console.Read()
End Sub
End Module
End Class
Sample Output:
Connection description: OLE DB connection to the AdventureWorks database.
Connection description: Flat File connection.
External Resources
Technical article, Connection Strings, on carlprothman.net.
See Also
Integration Services (SSIS) Connections
Create Connection Managers
Building Packages Programmatically
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
If you need to create packages dynamically, or to manage and execute Integration Services packages outside the
development environment, you can manipulate packages programmatically. In this approach, you have a
continuous range of options:
Load and execute an existing package without modification.
Load an existing package, reconfigure it (for example, for a different data source), and execute it.
Create a new package, add and configure components object by object and property by property, save it,
and execute it.
You can use the Integration Services object model to write code that creates, configures, and executes packages in
any managed programming language. For example, you may want to create metadata-driven packages that
configure their connections or their data sources, transformations, and destinations based on the selected data
source and its tables and columns.
This section describes and demonstrates how to create and configure a package programmatically line by line. At
the less complex end of the range of package programming options, you can simply load and run an existing
package without modification as described in Running and Managing Packages Programmatically.
An intermediate option not described here is that of loading an existing package as a template, reconfiguring it
(for example, for a different data source), and executing it. You can also use the information in this section to
modify the existing objects in a package.
NOTE
When you use an existing package as a template and modify existing columns in the data flow, you may have to remove
existing columns and call the ReinitializeMetaData method of affected components.
In This Section
Creating a Package Programmatically
Describes how to create a package programmatically.
Adding Tasks Programmatically
Describes how to add tasks to the package.
Connecting Tasks Programmatically
Describes how to control execution of the containers and tasks in a package based on the result of the execution
of a previous task or container.
Adding Connections Programmatically
Describes how to add connection managers to a package.
Working with Variables Programmatically
Describes how to add and use variables during package execution.
Handling Events Programmatically
Describes how to handle package and task events.
Enabling Logging Programmatically
Describes how to enable logging for a package or task, and how to apply custom filters to log events.
Adding the Data Flow Task Programmatically
Describes how to add and configure the Data Flow task and its components.
Discovering Data Flow Components Programmatically
Describes how to detect the components that are installed on the local computer.
Adding Data Flow Components Programmatically
Describes how to add a component to a data flow task.
Connecting Data Flow Components Programmatically
Describes how to connect two data flow components.
Selecting Input Columns Programmatically
Describes how to select input columns from those that are provided to a component by upstream components in
the data flow.
Saving a Package Programmatically
Describes how to save a package programmatically.
Reference
Integration Services Error and Message Reference
Lists the predefined Integration Services error codes with their symbolic names and descriptions.
Related Sections
Extending Packages with Scripting
Discusses how to extend the control flow by using the Script task, and how to extend the data flow by using the
Script component.
Extending Packages with Custom Objects
Discusses how to create program custom tasks, data flow components, and other package objects for use in
multiple packages.
Running and Managing Packages Programmatically
Discusses how to enumerate, run, and manage packages and the folders in which they are stored.
External Resources
CodePlex samples, Integration Services Product Samples, on www.codeplex.com/MSFTISProdSamples
Blog entry, Performance profiling your custom extensions, on blogs.msdn.com.
See Also
SQL Server Integration Services
Creating a Package Programmatically
11/2/2020 • 3 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
The Package object is the top-level container for all other objects in an SSIS project solution. As the top-level
container, the package is the first object created, and subsequent objects are added to it, and then executed within
the context of the package. The package itself does not move or transform data. The package relies on the tasks it
contains to perform the work. Tasks perform most of the work performed by a package, and define the
functionality of a package. A package is created and executed with just three lines of code, but various tasks and
ConnectionManager objects are added to give additional functionality to your package. This section discusses how
to programmatically create a package. It does not provide information about how to create the tasks or the
ConnectionManager. These are covered in later sections.
Example
To write code using the Visual Studio IDE, a reference to Microsoft.SqlServer.ManagedDTS.DLL is required in order
to create a using statement ( Imports in Visual Basic .NET) to the Microsoft.SqlServer.Dts.Runtime. The following
code sample demonstrates creating an empty package.
using System;
using Microsoft.SqlServer.Dts.Runtime;
namespace Microsoft.SqlServer.Dts.Samples
{
class Program
{
static void Main(string[] args)
{
Package package;
package = new Package();
}
}
}
Imports Microsoft.SqlServer.Dts.Runtime
Module Module1
Sub Main()
End Sub
End Module
To compile and run the sample, press F5 in Visual Studio. To build the code using the C# compiler, csc.exe , at the
command prompt to compile, use the following command and file references, replacing the <filename> with the
name of the .cs or .vb file, and giving it an <outputfilename> of your choice.
csc /target:librar y /out: <outputfilename>.dll <filename>.cs /r :Microsoft.SqlSer ver.Managed DTS.dll"
/r :System.dll
To build the code using the Visual Basic .NET compiler, vbc.exe , at the command prompt to compile, use the
following command and file references.
vbc /target:librar y /out: <outputfilename>.dll <filename>.vb /r :Microsoft.SqlSer ver.Managed
DTS.dll" /r :System.dll
You can also create a package by loading an existing package that was saved on disk, in the file system, or to SQL
Server. The difference is that the Application object is first created, and then the package object is filled by one of
the Application's overloaded methods: LoadPackage for flat files, LoadFromSQLSer ver for packages saved to
SQL Server, or LoadFromDtsServer for packages saved to the file system. The following example loads an existing
package from disk, and then views several properties on the package.
using System;
using Microsoft.SqlServer.Dts.Runtime;
namespace Microsoft.SqlServer.Dts.Samples
{
class ApplicationTests
{
static void Main(string[] args)
{
// The variable pkg points to the location of the
// ExecuteProcess package sample that was installed with
// the SSIS samples.
string pkg = @"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services" +
@"\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";
Module ApplicationTests
Sub Main()
End Sub
End Module
Sample Output:
Number of configurations = 2
VersionGUID = {09016682-89B8-4406-AAC9-AF1E527FF50F}
ProtectionLevel = DontSaveSensitive
External Resources
Blog entry, API Sample - OleDB source and OleDB destination, on blogs.msdn.com.
Blog entry, EzAPI - Updated for SQL Server 2012, on blogs.msdn.com.
See Also
Adding Tasks Programmatically
Adding Tasks Programmatically
11/2/2020 • 8 minutes to read • Edit Online
Applies to: SQL Server (all supported versions) SSIS Integration Runtime in Azure Data Factory
Tasks can be added to the following types of objects in the run-time engine:
Package
Sequence
ForLoop
ForEachLoop
DtsEventHandler
These classes are considered containers, and they all inherit the Executables property. Containers can contain a
collection of tasks, which are executable objects processed by the runtime during execution of the container. The
order of execution of the objects in the collection is determined any PrecedenceConstraint set on each task in the
containers. Precedence constraints enable execution branching based on the success, failure, or completion of an
Executable in the collection.
Each container has an Executables collection that contains the individual Executable objects. Each executable task
inherits and implements the Execute method and Validate method. These two methods are called by the run-time
engine to process each Executable.
To add a task to a package, you need a container with an Executables existing collection. Most of the time, the task
that you will add to the collection is a package. To add the new task executable into the collection for that container,
you call the Add method . The method has a single parameter, a string, that contains the CLSID, PROGID, STOCK
moniker, or CreationName of the task you are adding.
Task Names
Although you can specify a task by name or by ID, the STOCK moniker is the parameter used most often in the
Add method. To add a task to an executable identified by the STOCK moniker, use the following syntax:
The following list shows the names for each task that are used after the STOCK moniker.
ActiveXScriptTask
BulkInsertTask
ExecuteProcessTask
ExecutePackageTask
Exec80PackageTask
FileSystemTask
FTPTask
MSMQTask
PipelineTask
ScriptTask
SendMailTask
SQLTask
TransferStoredProceduresTask
TransferLoginsTask
TransferErrorMessagesTask
TransferJobsTask
TransferObjectsTask
TransferDatabaseTask
WebServiceTask
WmiDataReaderTask
WmiEventWatcherTask
XMLTask
If you prefer a more explicit syntax, or if the task that you want to add does not have a STOCK moniker, you can
add the task to the executable using its long name. This syntax requires that you also specify the version number
of the task.
You can obtain the long name for the task programmatically, without having to specify the task version, by using
the AssemblyQualifiedName property of the class, as shown in the following example. This example requires a
reference to the Microsoft.SqlServer.SQLTask assembly.
using Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask;
...
Executable exec = package.Executables.Add(
typeof(Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask).AssemblyQualifiedName);
Imports Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask
...
Dim exec As Executable = package.Executables.Add( _
GetType(Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask).AssemblyQualifiedName)
The following code example shows how to create an Executables collection from a new package, and then add a
File System task and a Bulk Insert task to the collection, by using their STOCK monikers. This example requires a
reference to the Microsoft.SqlServer.FileSystemTask and Microsoft.SqlServer.BulkInsertTask assemblies.
using System;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Tasks.FileSystemTask;
using Microsoft.SqlServer.Dts.Tasks.BulkInsertTask;
namespace Microsoft.SqlServer.Dts.Samples
{
class Program
{
static void Main(string[] args)
{
Package p = new Package();
// Add a File System task to the package.
Executable exec1 = p.Executables.Add("STOCK:FileSystemTask");
TaskHost thFileSystemTask = exec1 as TaskHost;
// Add a Bulk Insert task to the package.
Executable exec2 = p.Executables.Add("STOCK:BulkInsertTask");
TaskHost thBulkInsertTask = exec2 as TaskHost;
Module Module1
Sub Main()
End Sub
End Module
Sample Output:
Type Microsoft.SqlServer.Dts.Tasks.FileSystemTask.FileSystemTask
Type Microsoft.SqlServer.Dts.Tasks.BulkInsertTask.BulkInsertTask
TaskHost Container
The TaskHost class is a container that does not appear in the graphical user interface, but is very important in
programming. This class is a wrapper for every task. Tasks that are added to the package by using the Add method
as an Executable object can be cast as a TaskHost object. When a task is cast as a TaskHost, you can use additional
properties and methods on the task. Also, the task itself can be accessed through the InnerObject property of the
TaskHost. Depending on your needs, you may decide to keep the task as a TaskHost object so that you can use the
properties of the task through the Properties collection. The advantage of using the Properties is that you can
write more generic code. If you need very specific code for a task, then you should cast the task to its appropriate
object.
The following code example shows how to cast a TaskHost, thBulkInsertTask, that contains a BulkInsertTask, to a
BulkInsertTask object.
The following code example shows how to cast the executable to a TaskHost, and then use the InnerObject
property to determine which type of executable is contained by the host.
using System;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Tasks.FileSystemTask;
using Microsoft.SqlServer.Dts.Tasks.BulkInsertTask;
namespace Microsoft.SqlServer.Dts.Samples
{
class Program
{
static void Main(string[] args)
{
Package p = new Package();
// Add a File System task to the package.
Executable exec1 = p.Executables.Add("STOCK:FileSystemTask");
TaskHost thFileSystemTask1 = exec1 as TaskHost;
// Add a Bulk Insert task to the package.
Executable exec2 = p.Executables.Add("STOCK:BulkInsertTask");
TaskHost thFileSystemTask2 = exec2 as TaskHost;
Module Module1
Sub Main()
End Sub
End Module
Sample Output:
Found task of type Microsoft.SqlServer.Dts.Tasks.FileSystemTask.FileSystemTask
The Add statement returns an executable that is cast to a TaskHost object from the newly created Executable object.
To set properties or to call methods on the new object, you have two options:
1. Use the Properties collection of the TaskHost. For example, to obtain a property from the object, use
th.Properties["propertyname"].GetValue(th)) . To set a property, use
th.Properties["propertyname"].SetValue(th, <value>); .
2. Cast the InnerObject of the TaskHost to the task class. For example, to cast the Bulk Insert task to a
BulkInsertTask after it has been added to a package as an Executable and subsequently cast to a TaskHost,
use BulkInsertTask myTask = th.InnerObject as BulkInsertTask; .
Using the TaskHost class in code, instead of casting to the task-specific class has the following advantages:
The TaskHostProperties provider does not require a reference to the assembly in the code.
You can code generic routines that work for any task, because you do not have to know the name of the
task at compile time. Such generic routines include methods where you pass in the name of the task to the
method, and the method code works for all tasks. This is a good method for writing test code.
Casting from the TaskHost to the task-specific class has the following advantages:
The Visual Studio project gives you statement completion (IntelliSense).
The code may run faster.
Task-specific objects enable early binding and the resulting optimizations. For more information about early
and late binding, see the topic "Early and Late Binding" in Visual Basic Language Concepts.
The following code example expands on the concept of reusing task code. Instead of casting tasks to their specific
class equivalents, the code example shows how to cast the executable to a TaskHost, and then uses the Properties
to write generic code against all the tasks.
using System;
using Microsoft.SqlServer.Dts.Runtime;
namespace Microsoft.SqlServer.Dts.Samples
{
class Program
{
static void Main(string[] args)
{
Package package = new Package();