Script Component for error handling - Code resuability

  • Hi All,

    Good morning! I have an SSIS package that uses script component for handling errors in SSIS data flow. I ahve similar packages taht also uses the error handling.

    The errors are stored in the SQL Server database (user created table).

    Can i reuse the error handling code for all the packages?

    Any help greatly appreciated...

    Thanks in advance

    Nithya

    Regards
    Priya

  • Nithya,

    You have to build custom SSIS data flow component to be able to reuse the code in different projects. You can find here more information on building custom component.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • I have written a component that does something similar and you can download it and the source here: http://cid-d959306fcfdbac21.skydrive.live.com/self.aspx/Public/SSIS%20Components/JDCSSISLogging.zip. My component is an extension of the code in this article: http://www.sqlservercentral.com/articles/Integration+Services/62662/

    You can use it as is, modify it to do the logging the way you want, or use it as a template to learn how to do custom components. I also blogged about it here: http://wiseman-wiseguy.blogspot.com/2008/08/ssis-error-logging-custom-component.html

  • Hi Jack,

    Thanks for your innovative work!

    Regards,

    Nithya

    Regards
    Priya

  • I don't know about innovative, but you are welcome and I'm glad I could be of some help.

  • Hi Jack,

    I have a doubt again.... Should I want to create ur downloaded code as a .msi installer for reusing it for all the packages or is that used as part of references in Script Component.....?

    Sorry i am new to the coding section of .net and SSIS..

    Thanks

    Nithya

    Regards
    Priya

  • Hi All,

    I had created the ErrorHandling.cs to a .MSI Installer.... After installing the setup, i could not find the component in the SSIS --> Data Flow Transformation tab.

    Please help me in this issue as I have to complete the task by today...

    Thanks in advance...

    Nithya

    Regards
    Priya

  • Sorry, I am enroute from Florida to New Hampshire (1500 miles) and have not had a chance to be online. If you add the .DLL to "C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies" you can then add it to the toolbox in BIDS. You also need to add it to the GAC on both the development machine and the SSIS server. This article, http://www.sqlservercentral.com/articles/SQL+Server+2005+-+SSIS/2795/ has the instructions and in Listing 2 an example batch file that will do both for you. You'll have to change the name and path to the custom component.

  • Hi Jack,

    I am using VS2008. Should the VSS be installed for sure? I dont have VSS in mine.

    I could not find the GACutil in the folder "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil". Googling it i found it in the folder "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\GacUtil"

    Does the above creates any problem...?

    I had created the bat file and executed it with no errors.

    The batch file i created is as follows...

    ======================================================================

    REM Delete existing component

    DEL /Q "C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies\SSIS.Logging.dll"

    REM Copy the assembly to the relevant DTS folder

    COPY "E:\SSISLibraries\SSIS\SSIS.Logging\bin\Debug\SSIS.Logging.dll" "C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies"

    REM Unregister and re-register the assembly on the GAC

    "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil" /u SSIS.Logging

    "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil" /i "C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies\SSIS.Logging.dll"

    pause

    ======================================================================

    The assembly is now seen in to the specified folder "C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies\SSIS.Logging.dll".

    I had refreshed BIDS and Even then i could not find the component in the toolbox --> Choose toolbox Items --> SSIS Data Flow Items.

    Should i also want to create msi installer for this...? or please specify me an alternative to solve this.

    Please help me in resolving this issue.

    Thanks in advance...

    Nithya

    Regards
    Priya

  • As I said in my previous post "you can then add it to the toolbox". You need to right-click on the toolbox and select Add Items. Then you can find it one of the lists presented. Check it and it will be added to the toolbox.

  • Thanks for ur response.. I did the same.. Right clicked the Toolbox --> Choose Toolbox items --> SSIS Data Flow items -->

    But i could not find the custom component.. Should i want to do anything else..?

    Please help

    Nithya

    Regards
    Priya

  • Sorry for coming again and thanks for ur response Jack...

    I did the same and i couldnot get the component in

    Toolbox(right click) --> Choose toolbox items --> SSIS Data Flow components -->

    The custom component is not found here...

    Should i want to add any reference further?

    Please help..

    Nithya

    Regards
    Priya

  • Hi Jack,

    I downloaded the JDCSSISLogging.zip and extracted.

    when I try to open the solution from SQL Server 2005, It gives an error " ---------------------------

    Microsoft Visual Studio

    ---------------------------

    The selected file is a solution file, but was created by a newer version of this application and cannot be opened.

    ---------------------------

    OK

    ---------------------------

    "

    Do you have a version which is developed for 2005.

    I need it very urgently.

    Thanks a lot

    Regards,

    Lali

  • I do not have a version developed in VS 2005. It is an SSIS 2005 component, though, so you can extract the dll and use the component in your packages as is.

Viewing 14 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic. Login to reply