Create Custom Task in SSIS

No.of Views1160
Bookmarked0 times
Downloads 
Votes0
By  Rahul   On  12 Jun 2010 03:06:13
Tag : SSIS , How to
Will demonstrate how to create custom Task in SSIS
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

SSIS has a rich set of Task and Transformation but still developer may have a requirement or for fun want to create own custom task. SSIS allow 5 Types of custom objects

  1. Custom tasks.
  2. Custom connection managers.
  3. Custom log providers.
  4. Custom enumerators.
  5. Custom data flow components.

A. To create a custom object you will need to    Microsoft.DataTransformationServices.Controls to references. This doesnt show up in .Net tab so you can browse to C:\Windows\Assembly to add

B. Its usually a good design practice to Separate out the UI code and Runtime Code so that only runtime code is loaded during execution of the package.

C. UI: To develop a UI one would need inherit from propere base class according to the Custom Object.

Custom objectBase class

Task

IDtsTaskUI

 

Connection manager

IDtsConnectionManagerUI

Log provider

IDtsLogProviderUI

Enumerator

ForEachEnumeratorUI

Data flow component

IDtsComponentUI

D. Runtime code : Inherite base class according to the table

E. Apply the appropriate attribute to your new class.

F. Override the methods of the base class as required and write code for the custom functionality of your object.

Custom objectBase classAttributeImportant methods

Task

Task

DtsTaskAttribute

Execute

Connection manager

ConnectionManagerBase

DtsConnectionAttribute

AcquireConnection,ReleaseConnection

Log provider

LogProviderBase

DtsLogProviderAttribute

OpenLog,Log,CloseLog

Enumerator

ForEachEnumerator

DtsForEachEnumeratorAttribute

GetEnumerator

Data flow component

PipelineComponent

DtsPipelineComponentAttribute

ProvideComponentProperties,PrimeOutput,ProcessInput

G. After Creating class, you would need to create the dll and builing it and dll has to be signed with strong key

H. Install Custom object dll to GAC and copy dll to SQL SERVER DTS objects fodler for example if  custome task has to be copied to \\Program Files\Microsoft SQL Server\100\DTS\Tasks

 

You can see and download an example of  custom task from here.

http://sqlserversolutions.blogspot.com/2010/05/create-custom-task-in-ssis.html

i hope this is help to you all.

 
Sign Up to vote for this article
 
About Author
 
Rahul
Occupation -
Company-
Member Type-Fresh
Location-India
Joined date-22 May 2010
Home Page-
Blog Page-http://sqlserversolutions.blogspot.com/2010/05/cre
 
 
Other popularSectionarticles
    Comments
    There is no comments for this articles.
    Leave a Reply
    Title:
    Display Name:
    Email:
    (not display in page for the security purphase)
    Website:
    Message:
    Please refresh your screen using Ctrl+F5
    If you can't read this number refresh your screen
    Please input the anti-spam code that you can read in the image.
    ^ Scroll to Top