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.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|||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?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment