locked
How to use the script task to to do the following task RRS feed

  • Question

  • Hi all,

    I am Created the package now i want insert the following data to data base table using Script task please help me out i don't too know much about C# coding.

    I need to create a script task that should insert following data in to a table.

           Package start date time
           Package Path
           Server
           Package End date Time
           Error Description
           Error date Time
           After Error start time
           Total Time taken

    thanks in advance please help

    Regards

    Sunil Yoganna.

    Thursday, February 2, 2012 7:07 AM

Answers

  • DON'T.

    Use an Execute SQL Task instead.


    Todd McDermid's Blog Talk to me now on
    • Proposed as answer by Eileen Zhao Tuesday, February 7, 2012 4:13 PM
    • Marked as answer by Eileen Zhao Thursday, February 9, 2012 12:32 AM
    Friday, February 3, 2012 8:24 PM
  • Inserting will be easier with the Execute SQL Task like the other mentioned. The problem will be to get all these values. Some are easy (they are stored in System Variables), others are more difficult (they have to be calculated or retrieved from the data flow) and some are very difficult (f.e. PackagePath, the package has no knowledge of its own location).

    But why don't you use Package logging? http://msdn.microsoft.com/en-us/library/ms138020.aspx


    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
    • Proposed as answer by Eileen Zhao Tuesday, February 7, 2012 4:13 PM
    • Marked as answer by Eileen Zhao Thursday, February 9, 2012 12:32 AM
    Friday, February 3, 2012 9:28 PM

All replies

  • Why use a script task for this? You can accomplish this with the most basic SQL statements.
    MCTS, MCITP - Please mark posts as answered where appropriate.
    Answer #1: Have you tried turning it off and on again?
    Answer #2: It depends...
    Thursday, February 2, 2012 9:07 AM
  • DON'T.

    Use an Execute SQL Task instead.


    Todd McDermid's Blog Talk to me now on
    • Proposed as answer by Eileen Zhao Tuesday, February 7, 2012 4:13 PM
    • Marked as answer by Eileen Zhao Thursday, February 9, 2012 12:32 AM
    Friday, February 3, 2012 8:24 PM
  • Inserting will be easier with the Execute SQL Task like the other mentioned. The problem will be to get all these values. Some are easy (they are stored in System Variables), others are more difficult (they have to be calculated or retrieved from the data flow) and some are very difficult (f.e. PackagePath, the package has no knowledge of its own location).

    But why don't you use Package logging? http://msdn.microsoft.com/en-us/library/ms138020.aspx


    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
    • Proposed as answer by Eileen Zhao Tuesday, February 7, 2012 4:13 PM
    • Marked as answer by Eileen Zhao Thursday, February 9, 2012 12:32 AM
    Friday, February 3, 2012 9:28 PM