.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> DataBase >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Scripting in SSIS Packages - SQL Server Integration Services (SSIS) - Part 8

Posted By:Karthikeyan Anbarasan       Posted Date: February 27, 2011    Points: 100    Category: DataBase    URL: http://www.dotnetspark.com  

In this article we are going to see on the scripting option available with SSIS, which is nothing but the Script Task component in SSIS.
 

Introduction:


In this article we are going to see on the scripting option available with SSIS, which is nothing but the Script Task component in SSIS. The very cool feature available in SSIS packaging is the Script Task, to justify is many task components are available which performs a single operation as per the nature of the task. But with this Script task we can perform our own custom task on how the process should happen as per the business. We will see the step by step process on how to use this task.

Before proceeding to the steps, in order to follow the series of articles on SSIS check the below URL's.

This is part 8 of the series of article on SSIS. Other part of my SSIS articles at the below urls

Basics of SSIS and Creating Package - SQL Server Integration Services (SSIS) - Part 1

Transforming SQL Data to Excel Sheet - SQL Server Integration Services (SSIS) - Part 2

Export Data using Wizard - SQL Server Integration Services (SSIS) - Part 3

Import Data using Wizard - SQL Server Integration Services (SSIS) - Part 4

Building and Executing a Package - SQL Server Integration Services (SSIS) - Part 5

Options to execute a package in SSIS - SQL Server Integration Services (SSIS) - Part 6 

Options to Deploy a package in SSIS - SQL Server Integration Services (SSIS) - Part 7
 

Steps:

Follow steps 1 to 3 on my first article to open the BIDS project and select the right project to work on integration services project. Once the project is created, we will see on how to use the Script Task component.

On the Tool box available in the right side pane, select the Script Task component as shown in the below screen.


Right Click on the Script Task and select edit or double click on the task component in order to go through the properties of the task as shown in the below screen.


In the Script Pane, we have option as Script Language which points to Microsoft Visual Basic .Net. We have only this option in SSIS 2005 version, if we have installed with SSIS 2008 then we have option for C#.Net as well. Entry Point option is the place which we need to specify the main method for the script which we are going to write. Readonlyvariables and Readwritevariables are the options where we can use it for specifying the variables which are used at the script. We can specify the variables in comma separated format in order to use more than a single variable.

At the bottom of the pane you can find Design Script option which is the main window where we are going to put the script code. Clicking on that button will open the window as shown in the below screen.



As you see in the screen ScriptMain is the main method which is going to act as the entry point. This window helps to put our own custom logic as per the business using all the Visual Basic references and build a complete useful task.


Conclusion:

So in this article we have seen on how to create a Script task and write a custom code as per our requirement.

 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend