Professional SQL Server™ 2005 Integration Services
by Brian Knight, Allan Mitchell, Darren Green, Douglas Hinson, Kathi Kellenberger, Andy Leonard, Erik Veerman, Jason Gerard, Haidong Ji, Mike Murphy
7.3. Script Tasks
The role of the Script task is primarily to control the flow of the SSIS package. When one of the existing Control Flow Items is not flexible enough to perform the action you desire, you should consider writing a script.
Here you'll create your very first SSIS script. You will create the most basic "Hello World!" example just to see how to add a script to a package, edit it, and execute it.
To create a SSIS project and add a Script task, do the following:
Create a new Integration Services Project.
Ensure that the Control Flow tab is selected and open the Toolbox.
Select the Script task from the Toolbox and drag it to the Control Flow container.
Your screen should look something like Figure 7-7.
Figure 7.7. Figure 7-7
To open the Script task, you can double-click it or right-click it and select Edit. This will bring up the Script Task Editor window, as shown in Figure 7-8.
Figure 7.8. Figure 7-8
This window allows you to set a name for your script and give it a description. Never leave the name set to the default value; always give your script a meaningful name and description. Go ahead and change the Name property from Script Task to HelloWorldScriptTask. Change the description to "Prints ‘Hello World!’ to the screen."
Now select Script in the left pane. This ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access