Exploring packages in code

In my previous post Searching for tasks with code you can see how to explore the control flow side of packages, drilling down through containers, task, and event handlers, but it didn’t cover the data flow. I recently saw a post on the MSDN forum asking how to edit an existing package programmatically, and the… Continue reading Exploring packages in code

Logging connection strings

If you some of the dynamic features of SSIS such as package configurations or property expressions then sometimes trying to work out were your connections are pointing can be a bit confusing. You will work out in the end but it can be useful to explicitly log this information so that when things go wrong… Continue reading Logging connection strings

Published
Categorised as Scripting

Searching for tasks with code – Executables and Event Handlers

Searching packages or just enumerating through all tasks is not quite as straightforward as it may first appear, mainly because of the way you can nest tasks within other containers. You can see this illustrated in the sample package below where I have used several sequence containers and loops. To complicate this further all containers… Continue reading Searching for tasks with code – Executables and Event Handlers

Maintaining packages with code – Adding a property expression programmatically

Every now and then I’ve come across scenarios where I need to update a lot of packages all in the same way. The usual scenario revolves around a group of packages all having been built off the same package template, and something needs to updated to keep up with new requirements, a new logging standard… Continue reading Maintaining packages with code – Adding a property expression programmatically

Creating packages in code – Package Configurations

Continuing my theme of building various types of packages in code, this example shows how to building a package with package configurations. Incidentally it shows you how to add a variable, and a connection too. It covers the five most common configurations: Configuration File Indirect Configuration File SQL Server Indirect SQL Server Environment Variable  For… Continue reading Creating packages in code – Package Configurations

Creating packages in code – Flat File Source to OLE-DB Destination (SQL Server)

This code sample programmatically creates a package that imports a text file into SQL Server, with a Flat File Source and the OLE-DB Destination. This shows how you can leverage the SSIS engine to write your own data import tool for example, but beware importing files is not as simple as it may seem. When… Continue reading Creating packages in code – Flat File Source to OLE-DB Destination (SQL Server)