Unable to Send Files to FTP Server

  • MSDN state the following...

    Valid values are one and higher, or -1. Other values are invalid. A value of -1 allows the maximum number of concurrently running executables to equal the number of processors plus two. Setting this property to zero or any other negative value fails with an error code that indicates an invalid argument.

    Why equal to the number of processor plus two I don't know.....

  • i am able to urun the task from BIDS but it fails from Agent. any help is appreciated.

  • radhika0626 (5/7/2009)


    i am able to run the task from BIDS but it fails from Agent. any help is appreciated.

    Most likely this is of course down to security. Running the job in BIDS is done using your credentials, but under the service account that runs the SQL Agent, it probably does not have the same rights.

    What error are you getting? Have you got any logging setup and any error message in particular showing there which will point you in any one direction?

  • 1) Make Sure your remote path actually exists. I got this error because I was pointing to a subdirectory that someone had subsequently removed.

    2) Use the format "/DIR/SUBDIR/SUBDIR" for your RemotePath.

    3) You can't have spaces in your directory names. Maybe you can with a remote path variable, haven't tried it.

  • 1) Make Sure your remote path actually exists. I got this error because I was pointing to a subdirectory that someone had subsequently removed.

    2) Use the format "/DIR/SUBDIR/SUBDIR" for your RemotePath.

    3) You can't have spaces in your directory names. Maybe you can with a remote path variable, haven't tried it.

  • 1) Make Sure your remote path actually exists. I got this error because I was pointing to a subdirectory that someone had subsequently removed.

    2) Use the format /DIR/SUBDIR/SUBDIR for your RemotePath.

    3) You can't have spaces in your directory names. Maybe you can with a remote path variable, haven't tried it.

  • Hello,

    exactly i used same above code to send a file to FTP server.But my script task remains in execution mode all the time ( Yellow ).

    can any please suggest wat happening in my code . I have tested my FTp connection in Script task as well as in FTP connection manger : working perfectly

    Imports System

    Imports System.Data

    Imports System.Math

    Imports Microsoft.SqlServer.Dts.Runtime

    Public Class ScriptMain

    Public Sub Main()

    Try

    Dim cm As ConnectionManager = Dts.Connections.Add("FTP")

    cm.Properties("ServerName").SetValue(cm, "S-SQL15.apollo.zeus.internal")

    cm.Properties("ServerUserName").SetValue(cm, "FTPUser")

    cm.Properties("ServerPassword").SetValue(cm, "ftpconnection@123")

    cm.Properties("ServerPort").SetValue(cm, "21")

    cm.Properties("Timeout").SetValue(cm, "0")

    cm.Properties("ChunkSize").SetValue(cm, "1000") '1000 kb

    cm.Properties("Retries").SetValue(cm, "1")

    Dim ftp As FtpClientConnection = New FtpClientConnection(cm.AcquireConnection(Nothing))

    'Connects to the ftp server

    http://ftp.Connect()

    Dim files(0) As String

    files(0) = "C:\TestFtp.txt"

    http://ftp.SendFiles(files, "/", True, False)

    http://ftp.Close()

    Catch ex As Exception

    Dts.TaskResult = Dts.Results.Failure

    End Try

    Dts.TaskResult = Dts.Results.Success

    End Sub

    End Class

  • If you are able to transfer manually ,try using passive mode on ftp manager. Enable the logging for the client you are using to transfer manually for any additional settings.

  • You may need to set your destination folder to the following:

    /myaccountname/dir/subdir/subdir/

    (where "myaccountname" is your login to the FTP site.)

    Instead of just:

    /dir/subdir/subdir/

    This worked for me and stopped the following error:

    Unable to send files using "FTP".

    Donna

  • You may need to set your destination folder to the following:

    /myaccountname/dir/subdir/subdir/

    (where "myaccountname" is your login to the FTP site.)

    Instead of just: /dir/subdir/subdir/

    This worked for me and stopped the following error: Unable to send files using "FTP".

    Donna

  • Hi Guys...need help in http://ftp..

    my local folder has 100 files and each day files are added to this local folder has date and time in the file name as abc_2013.07.30.12.00.tmp , I want to send the latest file to ftp server using ssis package ??is this possible ???

    Any help pls ????

  • When I set "Use Passive Mode" in connection manager, it worked! (but FTP Task is not helpful since it's saying Password is not allowed).

    Suresh

  • MSSQLBuddy (2/16/2009)


    Hi,

    Thank u so much. I can upload now.

    The problem is that "I shouldn't specify the remote file name. only "/" in remote file succeeds sending file to ftp server"

    Thanks again.

    Priya

    @MSSQLBuddy

    Thanks !! You saved my day !!

  • Thank you - this solved my issue!

    MSSQLBuddy (2/16/2009)


    Hi,

    Thank u so much. I can upload now.

    The problem is that "I shouldn't specify the remote file name. only "/" in remote file succeeds sending file to ftp server"

    Thanks again.

    Priya

Viewing 14 posts - 16 through 28 (of 28 total)

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