Hi All,
My programmers have asked for my help in troubleshooting an ftp issue we're having when calling an FTP command from a DTS but I'm stumped.
I'm not a programmer myself so hopefully I provide you with enough info. Basically, we have a DTS that runs nightly - goes out to a client FTP site, downloads some files and imports them into the database. For some reason, it just stopped working.
We're running the ftp command with the -s switch which allows us to call an ftp script from a text file. Here is the code that should do this:
DECLARE @bcpCommand varchar(2000) SET @bcpCommand = 'ftp -s:K:\clients\husa\data\dev\cargo\ftp_get.txt' EXEC master..xp_cmdshell @bcpCommand
The error I get is the following:
Error opening script file K:\clients\husa\data\dev\cargo\ftp_get.txt.
If I open a command prompt, and type the part that appears to be failing:
ftp -s:K:\clients\husa\data\dev\cargo\ftp_get.txt
Thre are no problems opening/executing the FTP script and it goes out and does everything it's supposed to.
It seems like it could be permission related so I've attempted to copy the ftp script locally and call to the local file but I have the exact same results. Please let me know if you have any further questions and thanks in advance for your help!
Heather Masterson
My programmers have asked for my help in troubleshooting an ftp issue we're having when calling an FTP command from a DTS but I'm stumped.
I'm not a programmer myself so hopefully I provide you with enough info. Basically, we have a DTS that runs nightly - goes out to a client FTP site, downloads some files and imports them into the database. For some reason, it just stopped working.
We're running the ftp command with the -s switch which allows us to call an ftp script from a text file. Here is the code that should do this:
DECLARE @bcpCommand varchar(2000) SET @bcpCommand = 'ftp -s:K:\clients\husa\data\dev\cargo\ftp_get.txt' EXEC master..xp_cmdshell @bcpCommand
The error I get is the following:
Error opening script file K:\clients\husa\data\dev\cargo\ftp_get.txt.
If I open a command prompt, and type the part that appears to be failing:
ftp -s:K:\clients\husa\data\dev\cargo\ftp_get.txt
Thre are no problems opening/executing the FTP script and it goes out and does everything it's supposed to.
It seems like it could be permission related so I've attempted to copy the ftp script locally and call to the local file but I have the exact same results. Please let me know if you have any further questions and thanks in advance for your help!
Heather Masterson