SSIS Script Task & Deployment

  • I have built a Script task in an SSIS package on my workstation. The script task has 2 files - ScriptMain.cs and http://FTP.cs.

    The script task works fine when I load it in BIDs, but fails whenever I try to run it deployed on the server.

    However, the script task does not actually fail or give an exception, and validates successfully.

    The Server is running

    Microsoft SQL Server 2012 (SP3-GDR) (KB3194721) - 11.0.6248.0 (X64)

    Sep 23 2016 15:49:43

    Copyright (c) Microsoft Corporation

    Developer Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ).

    The issue appears to be with executing any of the data in the http://FTP.cs class. I came to this conclusion because I have a log file that gets written to inside a foreach loop that also downloads each file from the FTP site in scriptmain.cs which puts the name of the file followed by a space and the word Downloaded to a text file. The loop writes "Downloaded" exactly once into the file, rather than the number of files that should have been pulled into the loop and downloaded.

    Is there an issue with using multiple .cs files in a script task? Could there be an issue with my .net framework version, or would that cause the script task to fail on the server?

  • Steven.Grzybowski (1/11/2017)


    I have built a Script task in an SSIS package on my workstation. The script task has 2 files - ScriptMain.cs and http://FTP.cs.

    The script task works fine when I load it in BIDs, but fails whenever I try to run it deployed on the server.

    However, the script task does not actually fail or give an exception, and validates successfully.

    The Server is running

    Microsoft SQL Server 2012 (SP3-GDR) (KB3194721) - 11.0.6248.0 (X64)

    Sep 23 2016 15:49:43

    Copyright (c) Microsoft Corporation

    Developer Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ).

    The issue appears to be with executing any of the data in the http://FTP.cs class. I came to this conclusion because I have a log file that gets written to inside a foreach loop that also downloads each file from the FTP site in scriptmain.cs which puts the name of the file followed by a space and the word Downloaded to a text file. The loop writes "Downloaded" exactly once into the file, rather than the number of files that should have been pulled into the loop and downloaded.

    Is there an issue with using multiple .cs files in a script task? Could there be an issue with my .net framework version, or would that cause the script task to fail on the server?

    Script Tasks do not create separate .cs files ... all of the code which script tasks contain is encapsulated by the package containing the task itself.

    So I'd like to know what it was you did to generate these files in isolation?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • When I open up the script task is SSDT editor, I see the what is in the attached screenshot. I am not saying they are separate files on the server, I meant that they were separate files in SSDT / VSTA.

  • Steven.Grzybowski (1/11/2017)


    When I open up the script task is SSDT editor, I see the what is in the attached screenshot.

    OK, now I know what you mean. Though they look like files in Solution Explorer, they do not exist in isolation in the file system. They are contained in the package which contains the script task.

    Getting back to your problem, as zero files are being downloaded, the first thing I would look at is permissions. Are you able to verify whether or not the connection to the FTP server is successful, when run on the server?

    If yes, perhaps the script task cannot 'see' any of the files there and therefore completes without error?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

Viewing 4 posts - 1 through 3 (of 3 total)

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