Using FTP in dts package

  • Hi

     

    I'm creating a dts package using ftp.

    When i use the internet explorer to browse to the ftp site it works. When i use file transfert protocol in the dts package it says Unable to contact to internet! Please check the source site information, your user name and password.

    I'm sure the last 3 are correct !

    Anybody got any idea ?

    Thx in advance

    El Jefe


    JV

  • I`d never used the FTP facility in a DTS, so I just went and had a go. I found that if I used ftp://ftp.whoever.com/ it gave the error message you were getting. If I stripped it to just the URL - http://ftp.whoever.com - it then worked.

    Let me know if it works for you.


    "Don`t try to engage my enthusiasm, I don`t have one."

    (Marvin)

  • Couple of things...

    First, Do you have any restrictions on who can get to the internet?  If so does your SQL Server Agent user have such a privledge.

    Second, I've never been a big fan of using the FTP task when using DTS to do FTP sessions.  Mostly because from time to time I have to FTP to an OpenVMS box and you can't leave off the file version.  Have you tried calling it from the cmd line?  I know it's not the most eligant of solutions, but I'd give it a shot as a troubleshooting step at the very least.

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • The problem was something different.

    Ftp site i need is like http://ftp.downloads.co/downloads.

    In SQL u can only use http://ftp.downloads.co

    That /downloads is the problem. But I need, so now i have to figure a way around it 🙂

    nevertheless thx

    El Jefe


    JV

  • Because of the limitations of the FTP task I resorted to using a Windows CMD file to execute the FTP commands I needed and called these using an Execute Process task.

    Not pretty, but hey, it works

  • I'm not used to work in the command line, sorry

    How do u do it in a command line ?

    thx in advance

    El Jefe


    JV

  • use something like this...

    ftp -s:MyCommands.txt --the -s specifies you will use a text file containing your ftp commands.

    The Text file should look like this.

    open http://ftp.downloads.co

    username --sends username

    password --sends password

    cd downloads --changes to your downloads directory

    lcd c:\mydownloads folder --sets your local folder

    Then you can continue with commands like get myfile.txt to download the myfile.txt file ot put myupload.txt to upload a file to that directory.  open an ftp session from the cmd line once you are connected you can type help and most times rhelp to see the commands that are supported.

    Also if yopuare downloading something be careful to setting the FTP session to ASCII or BINARY.  Some ftp servers don't always work well in one mode and you need to specify the mode you need to use.  (also contained in the help file).

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Have you considered the Custom FTP Task @ http://www.sqldts.com? It's pretty good and worth checking out. Only drawback I've found is that the data that drives it is formatted in XML which makes setting it through Dynamic Properties a little tricky.

    -Pete

  • Hello;

    In DTS FTP task just give FTP Site name like http://ftp.download.com (with valid credentials) then try to connect by clicking on Files tab. If you can see ftp root in source column now then you are logged successfuly. From the source column select the required directory (double click the directory to see its contents; you will be inside that directory). Now select you target file from the source. By browsing directory from the Files tab like this will make FTP request to http://ftp.download.com/targeted-directory .

    If the above approach didn't work then try to incorporate batch file approach; CMD file which calling some *.ftp file similar to the following:

        open http://ftp.download.com

        user UserID Password

        binary

        cd /targeted-directory

        get target-file.zip

        quit

    Let me know if any of the above or any other method worked for you.

    With Regards

    Sulaiman Lalani

    Software Release Engineer

     

  • Thanks, the DTS interface solution sitll works, Just dbl-click the directory name when configuring the DTS package FTP connection.

Viewing 10 posts - 1 through 9 (of 9 total)

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