SQL Server Integration Services: The Complete DBA and Developer Guide
SQL Server Integration Services (SSIS) is Microsoft’s on-premises ETL and data integration platform. It ships as a component of SQL Server and runs packages — XML-based workflow files that extract data from sources, apply transformations, and load results into destinations. SSIS has been the foundation of enterprise ETL on the Microsoft stack since SQL Server 2005, when it replaced the older Data Transformation Services (DTS). SQL Server 2012 added the SSISDB catalog, which transformed how packages are deployed, parameterized, monitored, and secured.
This guide covers SSIS from the ground up: what every component does, how the package execution engine works, every major task and transformation type, deployment models, the SSISDB catalog internals, connection manager patterns, monitoring queries, checkpoints, SQL Server 2025 changes, and how to configure SSISDB for high availability with Always On Availability Groups.
Contents
What SSIS Is and Where It Fits
BeginnerSSIS sits between source systems (databases, flat files, APIs, cloud services) and destination systems (data warehouses, staging databases, reporting stores). It handles the extract, transform, and load (ETL) operations that move and shape data on a schedule or triggered by an event.
SSIS is not a database. It does not store data permanently. It is a pipeline engine: packages read from sources, process data through in-memory buffers, apply transformations, and write to destinations. The package itself is an XML file with a .dtsx extension containing the complete definition of every connection, task, transformation, variable, and configuration.
| Component | Role |
|---|---|
| SSIS Runtime Engine | Controls package execution order, manages containers, handles events, applies logging, manages transactions and checkpoints |
| SSIS Data Flow Engine (pipeline engine) | Manages in-memory buffer allocation, moves data between sources and destinations, applies transformations within a Data Flow task |
| SSIS Designer (Visual Studio extension) | Graphical development environment for building packages. Packages are created and edited here only — SSMS does not have a package designer. |
| SSISDB Catalog | SQL Server database that stores deployed projects, packages, parameters, environments, and execution history |
| dtexec.exe | Command-line utility for executing packages from the file system, MSDB, or SSISDB catalog |
| ISServerExec.exe | Server-side execution process used when packages are executed through the SSISDB catalog |
Package Anatomy: The Five Designer Tabs
BeginnerWhen a package is open in Visual Studio, the SSIS Designer shows five tabs. Each tab exposes a different aspect of the package.
| Tab | What It Shows | What Is Configured Here |
|---|---|---|
| Control Flow | The workflow of the package: which tasks run, in what order, under what conditions | Tasks, containers, precedence constraints, annotations |
| Data Flow | The data pipeline inside a Data Flow task: how data moves from sources through transformations to destinations | Sources, transformations, destinations, error output paths |
| Event Handlers | Custom workflows that fire in response to package and task events | OnError, OnTaskFailed, OnWarning, OnPreExecute, OnPostExecute handlers |
| Package Explorer | A tree view of all package objects: connection managers, event handlers, executables, log providers, precedence constraints, variables | Read-only overview; double-click objects to edit |
| Parameters | Package-level parameters that can be passed in at runtime to change behavior without editing the package | Create, name, type, and set default values for package parameters |
The Two Execution Engines
IntermediateSSIS uses two separate engines that operate at different layers of a package.
The Runtime Engine manages everything in the Control Flow layer: it sequences tasks and containers, evaluates precedence constraints, fires event handlers, manages transactions, applies logging, and implements checkpoints. It processes one task at a time (or multiple tasks in parallel when configured) and tracks the overall package execution state.
The Data Flow Engine (pipeline engine) manages the Data Flow task layer: it allocates in-memory buffers, moves data between components, applies transformations, and writes to destinations. The pipeline engine uses a buffered execution model — data moves through the pipeline in batches (buffers) rather than row by row, which is why SSIS can process millions of rows efficiently. The buffer size is controlled by the DefaultBufferMaxRows and DefaultBufferSize properties on the Data Flow task.
BufferTempStoragePath (defaults to the system temp directory). Buffer spill dramatically reduces throughput. If execution logs show high disk I/O during package runs, check available memory and adjust DefaultBufferSize or add RAM to the server.
Control Flow: Tasks, Containers, and Precedence Constraints
BeginnerThe Control Flow defines what a package does and in what order. It is built from three types of objects.
Tasks are the individual units of work: run a SQL statement, move a file, send an email, execute a data flow. Each task is an independent executable that succeeds or fails and returns a completion state to the runtime engine.
Containers group tasks and control execution flow: loop over a set of files, repeat a block of tasks a fixed number of times, or group tasks for transaction management. Containers can nest inside each other.
Precedence Constraints connect tasks and containers and define the conditions under which the next object executes. A constraint can be based on the outcome of the previous task (success, failure, or completion regardless of outcome), on the value of a variable or expression, or on a combination of both.
| Precedence Constraint Type | Behavior |
|---|---|
| Success | The downstream object executes only if the upstream object succeeded. Default for new connections. |
| Failure | The downstream object executes only if the upstream object failed. Used for error handling workflows. |
| Completion | The downstream object always executes regardless of whether the upstream object succeeded or failed. |
| Expression | The downstream object executes only when a SSIS expression evaluates to true, independent of task outcome. |
| Expression and Constraint | Both the outcome condition AND the expression must be true for the downstream object to execute. |
| Expression or Constraint | Either the outcome condition OR the expression being true causes the downstream object to execute. |
Built-In Tasks
Beginner| Task | What It Does |
|---|---|
| Data Flow Task | Hosts the entire data pipeline: sources, transformations, and destinations. The most commonly used task in ETL packages. Each package can have multiple Data Flow tasks. |
| Execute SQL Task | Runs one or more T-SQL or ANSI SQL statements against any database accessible through a connection manager. Can capture single-row or full result sets into SSIS variables. |
| Execute Package Task | Calls another SSIS package and waits for it to complete. Used to break large solutions into modular parent-child package hierarchies. |
| Script Task | Runs custom C# or VB.NET code in the control flow. Used for operations that no built-in task covers: calling REST APIs, custom file operations, complex conditional logic. |
| File System Task | Copies, moves, renames, deletes files and directories. Operates on the Windows file system using paths defined in Flat File or File connection managers. |
| Send Mail Task | Sends email via SMTP. Uses a SMTP connection manager. Typically used in event handlers to notify on failure, not in the main control flow. |
| FTP Task | Transfers files to and from FTP servers. Supports file send, receive, create directory, remove directory, and delete operations. |
| Web Service Task | Calls a SOAP web service method and can store the result in a variable or file. Does not support REST — use Script Task for REST API calls. |
| Execute Process Task | Runs an external executable or batch file and waits for it to complete. Can capture the process exit code into a variable. |
| Bulk Insert Task | Performs a fast bulk insert from a flat file into a SQL Server table using the same engine as T-SQL BULK INSERT. Faster than the OLE DB Destination for large file loads but less flexible. |
| Analysis Services Execute DDL Task | Executes XMLA DDL commands against an Analysis Services instance: process cube, create database, alter partition. |
| Analysis Services Processing Task | Processes Analysis Services objects: databases, cubes, dimensions, partitions. |
| XML Task | Performs XML operations: validate, merge, diff, patch, query with XPath, transform with XSLT. |
| Message Queue Task | Sends and receives MSMQ messages. Legacy task; rarely used in modern implementations. |
Containers
Beginner| Container | What It Does | Common Use |
|---|---|---|
| Sequence Container | Groups tasks and containers into a logical unit with a shared transaction scope and a single success/failure state. Does not loop. | Grouping related tasks (all dimension loads in one container, all fact loads in another) for transaction management and visual organization |
| For Loop Container | Repeats the tasks inside it a fixed number of times based on an initializer expression, a condition expression, and an assignment expression — equivalent to a for loop in code. | Processing a fixed number of iterations where the count is known at design time or stored in a variable |
| Foreach Loop Container | Iterates over a collection and executes the tasks inside for each member. The collection is defined by an enumerator type. | Processing all files in a folder (Foreach File enumerator), iterating over rows in a result set (Foreach ADO enumerator), looping over items in a variable (Foreach Item enumerator) |
| Task Host Container | An implicit container that wraps every task. Not visible in the designer. Provides the task with a variable scope, transaction context, and event handling capability. | Internal implementation detail; not configured directly by developers |
Event Handlers
IntermediateEvent handlers are mini control flows that execute in response to events raised by the package, containers, or tasks at runtime. They have the same structure as the package control flow — they can contain tasks and containers connected by precedence constraints — but they execute only when a specific event fires.
| Event | Fires When | Common Use |
|---|---|---|
OnError | An error occurs in the executable that owns the handler | Send failure notification email; write error details to a log table; roll back custom state |
OnTaskFailed | A task fails | Same as OnError but specifically for task failures; can be defined at the task level rather than package level |
OnWarning | A warning is raised | Log warnings to a table; send email when data quality warnings exceed a threshold |
OnPreExecute | Immediately before an executable starts | Log execution start time; validate preconditions; set runtime variables |
OnPostExecute | Immediately after an executable completes (regardless of outcome) | Log execution end time; clean up temporary files; update processing status tables |
OnProgress | Progress information is reported during execution | Custom progress monitoring |
OnVariableValueChanged | A variable with RaiseChangeEvent set to true changes value | React dynamically to variable value changes during execution |
Event handlers propagate up the container hierarchy by default. If a task raises an OnError event and the task has no OnError handler, the event propagates to the task’s parent container, then to the package. The first handler found in the hierarchy handles the event.
Data Flow Architecture
IntermediateThe Data Flow task hosts a separate execution graph from the control flow. Inside a Data Flow task, components are connected by data paths (green arrows) that carry columns of data between components. The pipeline engine allocates memory buffers, fills them with rows from sources, passes them through transformation components, and delivers them to destinations.
Components in a data flow are classified by their relationship to data:
- Sources read data from external systems and introduce it into the pipeline as rows and columns.
- Transformations receive rows from upstream components, apply operations (modify values, filter rows, look up reference data, split or merge streams), and pass results downstream.
- Destinations consume rows from the pipeline and write them to external systems.
Transformations are further classified by whether they are synchronous (process one row at a time, same buffer, no additional memory) or asynchronous (must collect rows before producing output, requires a new buffer, higher memory usage). Sorting and aggregating are asynchronous because they cannot produce output until all input rows have been received. Derived Column and Conditional Split are synchronous because each input row immediately produces output.
Sources
Beginner| Source Component | Reads From | Notes |
|---|---|---|
| OLE DB Source | SQL Server, Oracle, Access, and any OLE DB provider | Supports table, view, or SQL query mode. Most commonly used source for SQL Server data. |
| ADO.NET Source | Any .NET data provider | Required for SQL Server 2025 packages with the new Microsoft.Data.SqlClient provider; preferred over OLE DB for modern deployments |
| Flat File Source | Delimited, fixed-width, or ragged-right text files | Reads one file per execution. Use Foreach Loop to iterate over multiple files. |
| Excel Source | Microsoft Excel workbooks (.xls, .xlsx) | Requires the ACE OLE DB provider installed on the SSIS server. 64-bit driver required for 64-bit execution. |
| XML Source | XML files | Generates output based on the XSD schema. Complex XML requires custom mapping. |
| Raw File Source | SSIS raw file format written by Raw File Destination | Fastest read format; no parsing overhead. Only readable by SSIS itself. |
| Script Component (source mode) | Any source code can access | C# or VB.NET code generates rows. Used for REST APIs, custom file formats, or any source no built-in component supports. |
Transformations
Intermediate| Transformation | What It Does | Sync/Async |
|---|---|---|
| Derived Column | Adds new columns or replaces existing column values using SSIS expressions. The most commonly used transformation for data manipulation. | Synchronous |
| Conditional Split | Routes rows to different output paths based on conditions — equivalent to an IF/ELSE or CASE statement applied to data flow rows. | Synchronous |
| Lookup | Joins each pipeline row to a reference dataset (from a database table, cache, or raw file) on one or more key columns. Returns matched or unmatched rows to different outputs. | Synchronous (full cache mode); Asynchronous characteristics apply in partial/no cache mode |
| Merge Join | Performs INNER, LEFT OUTER, or FULL OUTER joins on two sorted input streams. Both inputs must be sorted on the join key columns before entering Merge Join. | Synchronous |
| Sort | Sorts all rows on one or more columns. Must accumulate all rows before producing sorted output — high memory usage for large datasets. If the source can sort (SQL ORDER BY), prefer that over this transformation. | Asynchronous (blocking) |
| Aggregate | Groups rows and computes aggregates: SUM, COUNT, AVG, MIN, MAX, COUNT DISTINCT. Must accumulate all rows in the group before producing output. | Asynchronous (blocking) |
| Data Conversion | Converts a column from one data type to another. Produces a new column — the original is preserved. Rename the output column and drop the original if the original name is needed. | Synchronous |
| Character Map | Applies string function mappings: uppercase, lowercase, byte reversal, simplified/traditional Chinese character mapping, Hiragana/Katakana. | Synchronous |
| Copy Column | Creates a copy of one or more columns in the pipeline buffer. Useful when a column needs to be used in different downstream paths with different transformations applied. | Synchronous |
| Multicast | Sends a copy of every row to multiple outputs. Used when the same data needs to be delivered to more than one destination. | Synchronous |
| Union All | Combines multiple input streams into one output stream. Does not sort or deduplicate — equivalent to UNION ALL in SQL. | Asynchronous (partially blocking) |
| Merge | Combines two sorted input streams into one sorted output stream. Both inputs must already be sorted on the same key. Use Union All when sorting is not required. | Asynchronous (partially blocking) |
| Pivot | Converts rows into columns — unpivots a normalized dataset into a wide format. Requires the pivot column values to be known at design time. | Asynchronous (blocking) |
| Unpivot | Converts wide-format column data into rows. Normalizes data from a denormalized source format. | Synchronous |
| Row Count | Counts rows passing through the pipeline and stores the count in a variable. Zero impact on throughput. | Synchronous |
| Script Component (transformation mode) | Custom C# or VB.NET transformation logic. Used when no built-in transformation covers the requirement. | Synchronous or Asynchronous depending on implementation |
| Fuzzy Lookup | Performs approximate (fuzzy) matching against a reference table — matches despite typos, misspellings, or slight variations. Slower than exact Lookup; best for data cleansing scenarios. | Asynchronous |
| Fuzzy Grouping | Groups rows that appear to be duplicates based on fuzzy matching. Returns a canonical representative for each group. | Asynchronous (blocking) |
| Cache Transform | Writes data from the pipeline to a Cache connection manager’s in-memory or file cache. The cached data is then referenced by a Lookup transformation configured to use cache mode. | Asynchronous |
Destinations
Beginner| Destination Component | Writes To | Notes |
|---|---|---|
| OLE DB Destination | SQL Server and any OLE DB target | Supports fast load (bulk insert) and row-by-row insert. Fast load mode is significantly faster for large volumes but acquires a table lock. Row-by-row mode allows concurrent writes. |
| ADO.NET Destination | Any .NET data provider target | Preferred for SQL Server 2025 with Microsoft.Data.SqlClient. More flexible than OLE DB for modern authentication scenarios. |
| Flat File Destination | Delimited or fixed-width text files | Overwrites or appends to the file. One file per execution — combine with Foreach Loop for multiple output files. |
| Excel Destination | Microsoft Excel workbooks | Requires the same ACE OLE DB driver as Excel Source. Limited to 65,535 rows in older .xls format. |
| Raw File Destination | SSIS raw file format | Fastest write format. Used as a checkpoint or intermediate store between pipeline stages. Only readable by SSIS Raw File Source. |
| SQL Server Destination | SQL Server on the same machine as the package | Uses shared memory for maximum throughput — fastest local SQL Server destination. Deprecated in SQL Server 2025; migrate to OLE DB Destination or ADO.NET Destination. |
| SQL Server Compact Destination | SQL Server Compact databases | Legacy. SQL Server Compact is end-of-life. Do not use in new implementations. |
| Script Component (destination mode) | Any target code can write to | Custom write logic in C# or VB.NET. Used for REST API targets, custom file formats, or targets no built-in component supports. |
Error Outputs
IntermediateMost data flow components support an error output — a secondary output path that receives rows that fail processing in that component. Each error output row includes two additional columns: ErrorCode (a negative integer identifying what went wrong) and ErrorColumn (the lineage ID of the column that caused the error).
Error output behavior is configurable per component and per column. The options are: Fail Component (the entire data flow task fails on the first error), Ignore Failure (the row continues to the standard output as if no error occurred), and Redirect Row (the row is sent to the error output instead of the standard output).
-- Look up the column name from ErrorColumn lineage ID at design time
-- SSIS expression to get a readable description:
-- Use the SSIS function in Script Component:
-- ComponentMetaData.GetErrorDescription(ErrorCode)
-- ComponentMetaData.GetErrorColumnDescription(ErrorColumn, ErrorCode)
-- In the Script Component reading the error output, add this to the Input0_ProcessInputRow method:
-- Row.ErrorDescription = ComponentMetaData.GetErrorDescription(Row.ErrorCode);
Variables, Parameters, and Expressions
IntermediateVariables
Variables store values that change at runtime. They are scoped to the object that defines them — a package-level variable is visible to all tasks; a container-level variable is only visible within that container. Variables are read and written by tasks (Execute SQL Task can map query results to variables), by expressions, and by Script Tasks.
Parameters
Parameters are values passed into a package from outside at execution time. They are read-only inside the package. Package parameters are defined at the package level. Project parameters are defined at the project level and shared across all packages in the project.
| Concept | Scope | Writable at Runtime | Passed From Outside |
|---|---|---|---|
| Variable | Package, container, or task | Yes — tasks and expressions can write to variables | No — set inside the package or via package configuration |
| Package Parameter | Package | No — read-only during execution | Yes — passed at execution time via SSISDB environment or dtexec command line |
| Project Parameter | All packages in the project | No — read-only during execution | Yes — bound to SSISDB environment variables |
Expressions
SSIS expressions are a formula language used to dynamically set property values at runtime. Expressions can reference variables, parameters, system variables, and functions. They are evaluated when the package starts (for most properties) or at each iteration (for properties inside loops).
-- Common expression examples
-- Dynamic file path using today's date (set on Flat File Connection Manager's ConnectionString property)
@[User::FilePath] + "sales_" + (DT_STR, 4, 1252) DATEPART("yyyy", GETDATE())
+ RIGHT("0" + (DT_STR, 2, 1252) DATEPART("mm", GETDATE()), 2)
+ RIGHT("0" + (DT_STR, 2, 1252) DATEPART("dd", GETDATE()), 2) + ".csv"
-- Conditional precedence constraint expression: only proceed if row count > 0
@[User::RowCount] > 0
-- Dynamic SQL in Execute SQL Task CommandText property
"SELECT * FROM " + @[$Project::SourceSchema] + ".Orders WHERE LoadDate = '"
+ (DT_STR, 10, 1252) @[User::ProcessDate] + "'"
Connection Managers
BeginnerConnection managers store connection information: server names, credentials, file paths, and provider settings. They are separate from the tasks and components that use them, so the same connection can be shared across multiple tasks without duplicating configuration. Connection managers exist at two scopes.
| Scope | Visible To | Best For |
|---|---|---|
| Package-level | All tasks and components within one package | Connections used only within a single package |
| Project-level | All packages in the project | Shared connections: the source database, the destination warehouse, a shared SMTP server |
Connection strings in connection managers can be parameterized using project or package parameters, so the same package connects to the development database in one SSISDB environment and the production database in another without any package modification.
-- Bind a project-level connection manager's ConnectionString to an SSISDB environment variable
EXEC catalog.set_object_parameter_value
@object_type = 20, -- 20 = project
@folder_name = N'ETL',
@project_name = N'SalesETL',
@parameter_name = N'CM.SourceDB.ConnectionString',
@parameter_value = N'DbConnString',
@value_type = 'R'; -- R = reference to environment variable
GO
Checkpoints
IntermediateCheckpoints allow a failed package to restart from the point of failure rather than from the beginning. When checkpoints are enabled, SSIS writes a checkpoint file after each successfully completed task. If the package fails and is re-executed, SSIS reads the checkpoint file and skips all previously completed tasks, resuming from the first task that did not complete successfully.
-- Checkpoint properties set on the Package object (not a task)
-- In Visual Studio, select the package background and set these in the Properties window:
-- CheckpointFileName: path to the checkpoint file
-- "C:\SSISCheckpoints\SalesLoad.dtsx.chk"
-- CheckpointUsage: options are
-- Never (default) - checkpoints not used
-- IfExists - use checkpoint file if it exists; start fresh if it does not
-- Always - checkpoint file must exist; fail if it does not exist
-- SaveCheckpoints: True to write the checkpoint file; False to read only
Deployment Models: File System, MSDB, SSISDB
BeginnerSSIS packages can be deployed and stored in three locations. The correct choice for any new implementation is SSISDB.
| Model | Storage | Execution | Logging | Versioning |
|---|---|---|---|---|
| File System | .dtsx files on disk or a UNC share |
dtexec /f or SQL Agent CmdExec job step |
Optional log providers (flat file, event log, SQL Server table) | Manual — no built-in versioning |
| MSDB (Legacy Package Store) | msdb.dbo.sysssispackages in the SQL Server database |
dtexec /SQL or SQL Agent SSIS Package step |
Same optional log providers as file system | None |
| SSISDB Catalog (Project Deployment) | SSISDB database — projects deployed as .ispac files |
SQL Agent Integration Services Package step or catalog.start_execution |
Built-in automatic logging to catalog views | Automatic — each deployment creates a new version; rollback available |
-- Deploy an ISPAC file to SSISDB using T-SQL
-- First create the catalog if it does not exist (requires CLR enabled)
EXEC catalog.create_catalog
@catalog_password = 'YourStrongPassword';
GO
-- Create a folder
EXEC catalog.create_folder
@folder_name = N'ETL';
GO
-- Deploy from file using PowerShell (most common approach):
-- $env = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Management.IntegrationServices")
-- $conn = New-Object Microsoft.Data.SqlClient.SqlConnection "Server=.;Integrated Security=SSPI;Encrypt=True;TrustServerCertificate=True;"
-- $ssis = New-Object Microsoft.SqlServer.Management.IntegrationServices.IntegrationServices $conn
-- $catalog = $ssis.Catalogs["SSISDB"]
-- $folder = $catalog.Folders["ETL"]
-- $ispac = [System.IO.File]::ReadAllBytes("C:\Projects\SalesETL\bin\Development\SalesETL.ispac")
-- $folder.DeployProject("SalesETL", $ispac)
SQL Server 2025 Changes
Advanced| Change | Type | Impact and Action |
|---|---|---|
| Microsoft Connector for Oracle | Removed | No longer available from SQL Server 2025 SSIS. Support ended July 4, 2025. Migrate Oracle connections to ADO.NET components, or migrate the integration to Azure Data Factory or Microsoft Fabric Data Factory. |
| CDC components by Attunity | Removed | CDC components and CDC service for Oracle by Attunity are discontinued in SQL Server 2025. Support ended December 13, 2025. Migrate to Azure Data Factory or custom CDC implementations using SQL Server CDC feature. |
| Hadoop tasks | Removed | Hadoop Hive Task, Hadoop Pig Task, and Hadoop File System Task are removed. Migrate to Azure Data Factory or Spark-based pipelines. |
| Legacy SSIS Service (MSDB Package Store) | Deprecated | The service that enables MSDB package storage is deprecated. Still installed in SQL Server 2025 but should be disabled. Migrate packages to SSISDB catalog. |
| 32-bit execution mode | Deprecated | SSIS 32-bit execution is deprecated. SSMS 21 and Integration Services Projects 2022+ are 64-bit only. Review any packages relying on 32-bit-only OLE DB providers or ODBC drivers and source 64-bit replacements. |
| SDS (SQL Server Destination) connection type | Deprecated | Replace with OLE DB Destination or ADO.NET Destination. |
| Foreach ADO.NET Schema Rowset Enumerator | Deprecated | Migrate to alternative enumeration patterns. |
| Foreach SMO Enumerator | Deprecated | Migrate to alternative enumeration patterns. |
| ADO.NET Connection Manager: Microsoft SqlClient provider | New feature | ADO.NET connection manager now supports Microsoft.Data.SqlClient, enabling TLS 1.3, Strict Encryption, and Microsoft Entra ID authentication. Update connection managers in new packages to use this provider. |
| .NET API breaking change | Breaking change | The Microsoft.SqlServer.Management.IntegrationServices constructor now requires Microsoft.Data.SqlClient.SqlConnection instead of System.Data.SqlClient.SqlConnection. Update all PowerShell and C# deployment automation scripts before upgrading to SQL Server 2025. |
SSISDB Catalog Internals
IntermediateThe SSISDB catalog is a SQL Server database installed on the same instance as the SSIS service. It organizes content in a four-level hierarchy: Catalog → Folder → Project → Package. Environments store named variable sets that are bound to project or package parameters to support multiple deployment targets (Dev, QA, Production) from a single deployed project.
| Catalog View | Contains |
|---|---|
catalog.folders | All folders in SSISDB |
catalog.projects | All deployed projects with version information |
catalog.packages | All packages within deployed projects |
catalog.environments | All environments and their parent folders |
catalog.environment_variables | Variables defined within each environment |
catalog.executions | All execution records: status, timing, executed by, parameter values used |
catalog.event_messages | Detailed messages for each execution: errors, warnings, informational events, task-level messages |
catalog.operation_messages | Operation-level messages for deployments, validations, and executions |
catalog.executable_statistics | Per-task execution timing for each package run |
-- Recent executions with status and duration
USE SSISDB;
GO
SELECT
e.execution_id,
e.folder_name,
e.project_name,
e.package_name,
e.executed_as_name,
e.start_time,
e.end_time,
DATEDIFF(SECOND, e.start_time, e.end_time) AS duration_seconds,
CASE e.status
WHEN 1 THEN 'Created'
WHEN 2 THEN 'Running'
WHEN 3 THEN 'Cancelled'
WHEN 4 THEN 'Failed'
WHEN 5 THEN 'Pending'
WHEN 6 THEN 'Ended Unexpectedly'
WHEN 7 THEN 'Succeeded'
WHEN 8 THEN 'Stopping'
WHEN 9 THEN 'Completed'
END AS status_description
FROM catalog.executions e
ORDER BY e.start_time DESC;
GO
-- Error messages for the most recent failed execution
USE SSISDB;
GO
DECLARE @execution_id BIGINT = (
SELECT TOP 1 execution_id
FROM catalog.executions
WHERE status = 4 -- 4 = Failed
ORDER BY start_time DESC
);
SELECT
em.message_time,
em.message_source_name,
em.package_path,
em.message
FROM catalog.event_messages em
WHERE em.operation_id = @execution_id
AND em.event_name = 'OnError'
ORDER BY em.message_time;
GO
Monitoring and Execution Logs
IntermediateSSISDB automatically captures execution history without any log provider configuration. The logging level (set on the SQL Agent job step or via catalog.set_execution_parameter_value) controls the detail captured.
| Logging Level | Value | What Is Captured |
|---|---|---|
| None | 0 | No messages logged |
| Basic | 1 | Errors, warnings, and task-level start/end events (default) |
| Performance | 2 | Basic plus data flow pipeline statistics (rows read, rows written per component) |
| Verbose | 3 | All messages including diagnostic and progress events |
-- Per-task execution statistics for a specific execution
-- Shows which task in a long-running package consumed the most time
USE SSISDB;
GO
SELECT
es.execution_id,
es.execution_path,
es.start_time,
es.end_time,
DATEDIFF(MILLISECOND, es.start_time, es.end_time) AS duration_ms
FROM catalog.executable_statistics es
WHERE es.execution_id = <your_execution_id>
ORDER BY duration_ms DESC;
GO
SSISDB Security and Roles
Intermediate| Role | Permissions |
|---|---|
ssis_admin | Full control of the SSISDB catalog: deploy, execute, delete, manage permissions, view all execution history and logs |
ssis_logreader | Read-only access to all execution logs and catalog views. Cannot deploy, execute, or modify packages. |
| Object-level permissions | Granular permissions on specific folders, projects, or packages granted via catalog.grant_permission. Allows giving a service account execute permission on one specific project without broader access. |
-- Grant execute permission on a specific project to a SQL login
USE SSISDB;
GO
EXEC catalog.grant_permission
@object_type = 3, -- 3 = project
@object_id = (SELECT project_id FROM catalog.projects WHERE name = 'SalesETL'),
@principal_id = DATABASE_PRINCIPAL_ID('ETLServiceAccount'),
@permission_type = 1; -- 1 = Read, 2 = Modify, 3 = Execute, 4 = Manage permissions, 100 = Read object
GO
Always On Availability Groups with SSISDB
AdvancedSSISDB is a user database under the hood. It can be added to a SQL Server Always On Availability Group like any other user database, providing automatic failover of the SSIS catalog to a secondary replica. When SSISDB fails over, all deployed projects, packages, environments, and execution history on the primary are immediately available on the new primary.
Prerequisites
- SQL Server Enterprise or Developer edition on all AG nodes
- SSIS installed on the primary replica node (does not need to be installed on secondary replicas for AG membership — only the SSISDB database needs to be present)
- CLR integration enabled on all nodes
- An Always On Availability Group already configured with a listener
-- Step 1: Enable CLR on all nodes
EXEC sp_configure 'clr enabled', 1;
RECONFIGURE;
GO
-- Step 2: On the primary replica, create the SSISDB catalog if not already created
-- In SSMS: right-click Integration Services Catalogs > Create Catalog
-- Enable CLR integration, set a password
-- Step 3: Back up the SSISDB master key
USE SSISDB;
GO
BACKUP MASTER KEY
TO FILE = 'C:\SSISKeys\SSISDBMasterKey.key'
ENCRYPTION BY PASSWORD = 'YourKeyBackupPassword';
GO
-- Step 4: Add SSISDB to the Availability Group
ALTER AVAILABILITY GROUP [YourAGName]
ADD DATABASE SSISDB;
GO
-- Step 5: On each secondary replica, restore and open the master key
-- Copy the master key backup file to each secondary node first, then:
USE SSISDB;
GO
RESTORE MASTER KEY
FROM FILE = 'C:\SSISKeys\SSISDBMasterKey.key'
DECRYPTION BY PASSWORD = 'YourKeyBackupPassword'
ENCRYPTION BY PASSWORD = 'YourNewSecondaryPassword'
FORCE;
GO
-- Open the master key using the service master key for automatic decryption
ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY;
GO
-- Step 6: Verify SSISDB is in the AG and synchronized
SELECT
ag.name AS ag_name,
drs.database_id,
DB_NAME(drs.database_id) AS database_name,
drs.synchronization_state_desc,
drs.synchronization_health_desc
FROM sys.dm_hadr_database_replica_states drs
JOIN sys.availability_groups ag ON drs.group_id = ag.group_id
WHERE DB_NAME(drs.database_id) = 'SSISDB';
GO
-- Step 7: Test failover and confirm SSIS execution after failover
-- In SSMS on the primary: right-click the AG > Failover
-- After failover, execute a package using the listener name:
DECLARE @execution_id BIGINT;
EXEC SSISDB.catalog.create_execution
@folder_name = N'ETL',
@project_name = N'SalesETL',
@package_name = N'LoadDimCustomer.dtsx',
@execution_id = @execution_id OUTPUT;
EXEC SSISDB.catalog.start_execution
@execution_id = @execution_id;
-- Monitor:
SELECT execution_id, status, start_time, end_time
FROM SSISDB.catalog.executions
WHERE execution_id = @execution_id;
GO
Workshop 1: Build and Deploy a Package to SSISDB
Prerequisites
Visual Studio 2022 with Integration Services Projects extension, SQL Server 2019 or later with SSIS and SSISDB configured, SSMS.
Step 1: Create the project
Open Visual Studio 2022. File → New → Project. Search for “Integration Services Project”. Name the project SalesETL. Set the TargetServerVersion in project properties to match the SQL Server version.
Step 2: Build the control flow
Open Package.dtsx. On the Control Flow tab, drag in an Execute SQL Task. Double-click it and configure it to truncate the staging table:
TRUNCATE TABLE dbo.Customers_Stage;
Drag in a Data Flow Task below it. Connect them with a precedence constraint (green arrow — Success).
Step 3: Build the data flow
Double-click the Data Flow Task to open the Data Flow tab. Add an OLE DB Source connected to the source database. Configure it to read from dbo.Customers. Add a Derived Column transformation. Create a new column FullName:
[FirstName] + " " + [LastName]
Add an OLE DB Destination connected to the staging table. Map columns. Create the staging table if needed:
CREATE TABLE dbo.Customers_Stage (
CustomerID INT,
FirstName NVARCHAR(50),
LastName NVARCHAR(50),
FullName NVARCHAR(100)
);
Step 4: Add an OnError event handler
Click the Event Handlers tab. In the Executable dropdown, select Package. In the Event Handler dropdown, select OnError. Add a Send Mail Task. Configure it with the SMTP connection manager and the DBA team email address. This fires and sends an email any time the package fails.
Step 5: Deploy to SSISDB
Right-click the project in Solution Explorer → Deploy. In the Integration Services Deployment Wizard, select the SSISDB instance and a target folder. Complete the wizard. The project deploys as an .ispac file.
Step 6: Create an environment and bind parameters
In SSMS, expand SSISDB → the folder → Environments. Right-click → Create Environment. Name it Production. Add a variable SourceConnString and set its value to the production connection string. Right-click the deployed project → Configure → References tab → add a reference to the Production environment. Map project parameters to environment variables.
Step 7: Execute and monitor
-- Execute via T-SQL with environment reference
DECLARE @execution_id BIGINT;
EXEC catalog.create_execution
@folder_name = N'ETL',
@project_name = N'SalesETL',
@package_name = N'Package.dtsx',
@reference_id = (SELECT reference_id FROM catalog.environment_references
WHERE environment_name = 'Production'),
@execution_id = @execution_id OUTPUT;
EXEC catalog.start_execution @execution_id = @execution_id;
-- Monitor result
SELECT execution_id, status, start_time, end_time
FROM catalog.executions
WHERE execution_id = @execution_id;
Workshop 2: Configure SSISDB with Always On Availability Groups
Prerequisites
SQL Server Enterprise on at least two nodes. An Always On AG already configured with a listener. SSISDB created on the primary node. Master key backed up.
Step 1: Enable CLR on all nodes
EXEC sp_configure 'clr enabled', 1;
RECONFIGURE;
GO
Step 2: Add SSISDB to the AG
ALTER AVAILABILITY GROUP [ProductionAG] ADD DATABASE SSISDB;
GO
Step 3: Restore the master key on each secondary
Copy the master key backup file to each secondary node. On each secondary replica, run:
USE SSISDB;
GO
RESTORE MASTER KEY
FROM FILE = 'C:\SSISKeys\SSISDBMasterKey.key'
DECRYPTION BY PASSWORD = 'YourKeyBackupPassword'
ENCRYPTION BY PASSWORD = 'SecondaryNodeKeyPassword'
FORCE;
GO
ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY;
GO
Step 4: Create a SQL Agent job using the listener
In SSMS, connect to the AG listener. Create a SQL Agent job with an Integration Services Package step. Set the server name on the step to the AG listener name. This ensures the job continues to work after any failover.
Step 5: Test failover
In SSMS, right-click the AG and select Failover. After failover completes, connect to the listener (which now points to the new primary). Execute the SSIS package via the Agent job. Confirm execution succeeds and history appears in SSISDB on the new primary. Fail back and confirm continuity.
Step 6: Verify SSISDB health after failover
-- Confirm SSISDB is on the current primary and synchronized
SELECT
ar.replica_server_name,
drs.synchronization_state_desc,
drs.synchronization_health_desc,
drs.is_primary_replica
FROM sys.dm_hadr_database_replica_states drs
JOIN sys.availability_replicas ar ON drs.replica_id = ar.replica_id
WHERE DB_NAME(drs.database_id) = 'SSISDB';
GO
The technical information in this article was verified against Microsoft documentation at the time of publication. SQL Server features, cloud service capabilities, licensing terms, and configuration requirements can change between versions and cumulative updates. Always validate implementation details against current Microsoft Learn documentation before deploying to production. References in this article link directly to the authoritative Microsoft sources.
References
- Microsoft Docs: SQL Server Integration Services Overview
- Microsoft Docs: What’s New in Integration Services in SQL Server 2025
- Microsoft Docs: Control Flow
- Microsoft Docs: Data Flow
- Microsoft Docs: Integration Services Event Handlers
- Microsoft Docs: Restart Packages by Using Checkpoints
- Microsoft Docs: SSIS Catalog
- Microsoft Docs: catalog.executions (SSISDB Database)
- Microsoft Docs: catalog.event_messages (SSISDB Database)
- Microsoft Docs: Always On for SSIS Catalog (SSISDB)
- Microsoft Docs: Integration Services Variables
- Microsoft Docs: Integration Services Package and Project Parameters
- Microsoft Docs: Security Overview (Integration Services)
- SQLYARD: Troubleshooting SSIS Package Failures in SQL Server Agent Jobs
- SQLYARD: Building an SSIS Multi-Server Health Sweep with Automated Email Reports
- SQLYARD: Always On Availability Groups Guide
- SQLYARD: SQL Server Agent: The Complete DBA Guide
Discover more from SQLYARD
Subscribe to get the latest posts sent to your email.


