none
Output from script task to cmd prompt

    Question

  • Hi,

    I have a SISS package that has script task in it. 

    I'm exeuting the package in the command prompt using the following command. 

    DTEXEC.EXE /F "C:\Documents and Settings\Devuser\Desktop\Deployment\Package.dtsx" /set \package.variables[filepath].Value;"C:\\Documents and Settings\\Devuser\\Desktop\\Release-Deployment\\release\\"

    It is sucessfully executed and the following is displayed in the command prompt screen. 

    DTExec : The package execution returned DTDER_SUCESS <0>

    However, i would like to show cusom message. Is it possible to show custom message string returned by the script task? 

    Please assist me. 

    Thanks,
    Venkat.

    Best Regards, Venkat

    Monday, July 21, 2014 7:57 AM

Answers

  • No, I haven't tried events.

    Could you please point me some tutorials or urls where i can get information?

    Thanks,

    Venkat.


    Best Regards, Venkat


    Click on the link in the previous reply. With for example Dts.Events.FireWarning(.......) you can create a warning with a custom text in it.

    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    • Marked as answer by Venkats Monday, July 21, 2014 11:28 AM
    Monday, July 21, 2014 9:05 AM
    Moderator

All replies

  • which script task? DO you mean you've script task inside SSIS configured to return a custom message?

    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    Monday, July 21, 2014 8:02 AM
  • Its a C# script task. 

    I want something like the below ouptut

    Started:  8:05:45 AM
    Warning: 2011-11-12 08:05:45.93
       Code: 0x00000000
       Source: Some text here from the script task
    Description: 5 files excuted successfully. 
    End Warning
    DTExec: The package execution returned DTSER_SUCCESS (0).

    Best Regards, Venkat

    Monday, July 21, 2014 8:11 AM
  • Have you tried throwing events? (and logging them)

    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    Monday, July 21, 2014 8:39 AM
    Moderator
  • No, I haven't tried events.

    Could you please point me some tutorials or urls where i can get information?

    Thanks,

    Venkat.


    Best Regards, Venkat

    Monday, July 21, 2014 9:00 AM
  • No, I haven't tried events.

    Could you please point me some tutorials or urls where i can get information?

    Thanks,

    Venkat.


    Best Regards, Venkat


    Click on the link in the previous reply. With for example Dts.Events.FireWarning(.......) you can create a warning with a custom text in it.

    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    • Marked as answer by Venkats Monday, July 21, 2014 11:28 AM
    Monday, July 21, 2014 9:05 AM
    Moderator
  • Hi, 

    Thanks for the info.

    I will check this out and let you know. 

    Thanks,

    Venkat.


    Best Regards, Venkat

    Monday, July 21, 2014 9:19 AM
  • Hi,

    I have added the events like 

    Dts.Events.FireWarning(0, "Script Execution Error:", ex.Message, String.Empty, 0);

    It is showing in the cmd prompt. However if i use FireInformation like below

    Dts.Events.FireInformation(0, "Script Execution Status:", "exucuted successfully.", String.Empty, 0, ref fireAgain);

    then it is not displaying.

    Only warning displayed in the cmd prompt?

    Thanks,

    Venkat.


    Best Regards, Venkat

    Monday, July 21, 2014 11:03 AM
  • Sounds reasonable that only warnings and errors are displayed by default. Have you checked all options from dtexec (like /Cons[oleLog])

    If you add logging to your package then you can choose which events you want to log.


    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    Monday, July 21, 2014 11:15 AM
    Moderator
  • Hi

    Thanks for the assistance. It saved me a lot of time.

    Thanks,

    Venkat.


    Best Regards, Venkat

    Monday, July 21, 2014 11:32 AM