DTS FTP Tasks Failing for Unknown Reason

  • Hello everyone.

    I am seeing any DTS package that runs an FTP task failing on a consistant basis.

    No error other than "One or more files could not be transferred" is generated.

    The strange thing is that I can run FileZilla on my laptop and copy down a target

    file to the laptop and then to the server. Then I can run the rest of the DTS package.

    Does anyone know the Port number the task uses to FTP?

    Has anyone else had issues like these?

    Much Thanks.

  • I believe it uses port 21. 

    I've had many problems with the FTP task which led me to use an Active X script task to execute shell commands to http://FTP.  Here's an example (I use Global variables to store the FTP address, username, & password, all of which are retrieved from a table in a Dynamic Properties task):

    Function Main()

     Dim objFSO

     Dim objShell

     Dim objTS

     Dim strCommand

     Dim strScriptFile

     Set objFSO = CreateObject("Scripting.FileSystemObject")

     strScriptFile = "c:\ftp.scr"  ' set your own path

     Set objTS = objFSO.CreateTextFile(strScriptFile, True)

     strCommand = "open " & DTSGlobalVariables("FTPSite").Value & vbCrLf

     strCommand = strCommand & DTSGlobalVariables("FTPUser").Value & vbCrLf

     strCommand = strCommand & DTSGlobalVariables("FTPPassword").Value & vbCrLf

     strCommand = strCommand & "lcd " & DTSGlobalVariables("FTPFolder").Value & vbCrLf ' set where you want files downloaded to

     strCommand = strCommand & "prompt off" & vbCrLf 

     strCommand = strCommand & "binary" & vbCrLf

     strCommand = strCommand & "mget *" & vbCrLf  ' instead of getting all files, you can specifiy name of a specific file

     strCommand = strCommand & "disconnect" & vbCrLf

     strCommand = strCommand & "quit" & vbCrLf

     strCommand = strCommand & "exit" & vbCrLf

     

     objTS.Write strCommand

     objTS.Close

     Set objShell = CreateObject("WScript.Shell")

     objShell.Run("ftp -s:" & strScriptFile)

     Set objTS = Nothing

     Set objShell = Nothing

     Set objFSO = Nothing

     Main = DTSTaskExecResult_Success

    End Function

     

    There is an enhanced FTP task available at http://www.sqldts.com/302.aspx.  I haven't used it, but have heard good things about it.

  • I have used the same approach as above, but made use of NcFTP which has been effective (see http://www.ncftp.com/ncftp).

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

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