Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I have written a query to download files from ftp server. My query is working fine in window xp, but when i execute the same query in window 7 and window 8 its not working. In window xp when query is executed all files on given path of ftp server are downloaded in local folder. But in case of window 7 either execution remains in process for hrs without any result or download only first file and closes the connection.

Please help me...
This is the output I Got in case of window xp
id ouputtmp
1 User (FTPserver_name:(none)): open FTPserver_name
2 Interactive mode Off .
3 Local directory now E:\FTP_download_SQl.
4 NULL
5 NULL
6 prompt
7 lcd E:\FTP_download_SQl
8 cd /testFTP
9 mget /testFTP
10 quit
11 NULL

and in case of window 7
id ouputtmp
1 User (FTPserver_name:(none)): open FTPserver_name
2 Interactive mode Off .
3 Local directory now C:\FTP_download_SQLtest.
4 Connection closed by remote host.
5 NULL
6 NULL
7 prompt
8 lcd C:\FTP_download_SQLtest
9 cd /testFTP
10 mget /testFTP
11 quit
12 NULL
Posted
Comments
Dominic Burford 11-Nov-14 10:02am    
I've had similar issues with FTP working from one server but not another. In my case it was the firewall that was blocking the FTP requests as the server I was copying the files to were in the DMZ.

Ensure the server has FTP permissions on the firewall. Can you FTP a single file or several files?

Can you FTP the files using a different client? Try using a different FTP client and see if that helps.

I have also resorted to changing the FTP server. We were using IIS as the FTP server but changed over to Filezilla FTP server and this was far more stable and faster too.
pck.ns 12-Nov-14 1:14am    
Thank you for your comment. But I have already disabled firewall and enabled ftp service in my Windows 7 system.
I want this query to be executed from sql agent as a sql job.
Dominic Burford 12-Nov-14 6:41am    
If it works from one PC but not another, then try to determine what is different between the two PCs.

Are you using the same FTP client, the same user / permissions, firewall settings etc.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900