Extend the SSIS Script Task with Your Own .NET Class Library, Page 3
Major ConsiderationsYour Script Task error-handling approach will depend on a number of things. Ask yourself the following questions when determining your approach:
- Should the error be handled by the Script Task or by the SSIS Package Error Handler?
- Should the error cause the whole package to fail?
- What action must be taken when the error occurs? Should the error be logged?
- How frequently do you expect the error to occur?
The Script Task may be part of a SSIS Package Transaction. Make sure that actions your Script Task performs do not conflict with other parts of the SSIS Package.
Your SSIS package will execute under the configured SSIS account (DTS Server). Therefore, you must consider whether the actions taken by your Script Task have the appropriate authority.
Script Tasks are not your only options if you want to perform something not built into SSIS. Your other options include the following:
- The Execute process allows you to execute a command-line application.
- SQL Server 2005 now includes support for the CLR. You could always build your code into a CLR stored procedure.
- ActiveX Script Task is another option.
- Custom Task Components allow you to build reusable components for all of your SSIS Packages.
Extend Your SSIS PackageA Script Task allows you to extend your SSIS Package, and even your own custom class, using VB.NET. Using the DTS object, a Script Task allows you to access SSIS Package variables and change SSIS Package behavior. However, as you develop your own Script Tasks, you must consider things like transactions and error handling.
Download the Code
To download the accompanying source code for the examples, click here.
About the AuthorJeffrey Juday is a software developer with Crowe Chizek in South Bend, Indiana. He has been developing software with Microsoft tools for more than 12 years in a variety of industries. Jeff currently builds solutions using BizTalk 2004, ASP.NET, SharePoint, and SQL Server 2000. You can reach Jeff at firstname.lastname@example.org.