Archive for the ‘SSIS’ Tag

Software Tools To Be Thankful For

In the spirit of today’s holiday, I figured I would run down a list of software tools that make an identity management implementation that much easier.

SSIS [Windows]
Whether it’s sanitizing, organizing, or just moving large amounts of data, this tool does it all and more.

Notepad++ [Windows]
This super text editor is a must have for anyone who does light or even heavy coding. One great feature that this editor offers is the ability to display text in different coding languages such as SQL or VB, which makes coding a whole lot easier on the eyes.

Grep [Linux]
A lean, mean, command line tool used to search for string patterns or regular expressions in text files. There’s no doubt that grep is one of the most powerful *nix commands in your command line arsenal.

VMware Server (or virtualization in general) [Linux, Mac, Windows]
Set up a virtual environment, do some testing, then blow it all away. Check out my thoughts on the new VMware Server 2.0.

There’s a wealth of information out there on the web, especially code. When you’re on an implementation, the last thing you need eating up your time is having to reinvent the wheel. Google it!

Have any tools that you’re thankful for?


Failproofing Your SSIS Package

Here’s a script that you can add to your SSIS toolbelt. With this script, you can prevent an SSIS package from failing when it tries to import data from a flat file that isn’t there.

To start, we’ve got a simple package with a single Data Flow Task. If this package runs while the referenced flat file is missing, the package will fail.


To take care of this potential problem, we’ll add a Script Task that will check to see if the import file is there before proceeding with the Data Flow Task. Note the name of the Flat File connection (“Input Text File”) that points to our import file.


Here’s what’s inside the Script Task. We create a variable called filename, which we then assign the path to our import file by referencing the Flat File Connection in our package. The script then checks to see if the file is there.  If it is, the Script Task ends with a result of “Success” then continues on to the Data Flow Task, otherwise it will end with a result of “Failure”.


Here’s the code for your ctrl+c pleasure:

    Public Sub Main()
        ' Get file name from the "Flat File" Connection
        Dim filename As String = Dts.Connections("Input Text File").ConnectionString
        ' Check if the named file exists
        If System.IO.File.Exists(filename) Then
            Dts.TaskResult = Dts.Results.Success
            Dts.TaskResult = Dts.Results.Failure
        End If
    End Sub

Now we can be sure that the package will not fail should our import file be missing for some reason. The error prevention of this package can be further enhanced by utilizing the “Failure” result of the Script Task and maybe adding a Send Email Task to send a notification that the import file is missing.

Hope this has been useful. Anybody have a different approach to solving this problem?