Results 1 to 3 of 3

Thread: Ftp

  1. #1
    Join Date
    Oct 2003
    Posts
    83

    Question Unanswered: Ftp

    How can I do FTP(File transfer protocol) tasks in between 2-3 remote servers?I want to know in details.I have to do by writing SQL SERVER 2000 programming code.

  2. #2
    Join Date
    Sep 2003
    Posts
    212

    Re: Ftp

    Originally posted by subhasishray
    How can I do FTP(File transfer protocol) tasks in between 2-3 remote servers?I want to know in details.I have to do by writing SQL SERVER 2000 programming code.
    This site shows a simple task. Get some direction from here:

    http://www.nigelrivett.net/s_ftp_PutFile.html

    thanks to nigelrivett

  3. #3
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322

    Re: Ftp

    Yeah,

    Nigel's stuff is great!

    Or you could just execute a bat file

    master..xp_cmdshell 'D:\Somelocation\FTP_EVPDNS.bat'

    Where that contains something like:

    c:\winnt\system32\ftp -s:E:\Projects\GOCall\FTP\INST.ftp > INST_ftp.log
    c:\winnt\system32\ftp -s:E:\Projects\GOCall\FTP\RETA.ftp > RETA_ftp.log

    And the script file contains (
    this is going to the mainframe)

    open servername
    <login>
    <Password>
    delete 'AD2AIC.EVPDNS.RETAIL.FEED.W0340'
    quote site cyl pri=5 sec=2 lrecl=677 blksize=6770 recfm=fb retpd=60
    put v:\data\Reta.txt 'AD2AIC.EVPDNS.RETAIL.FEED.W0340'
    quit

    There will be a log created in the location of the bat file which will show you the results...


    But if it's SQL Server to SQL Server, why not create a linked server?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •