Hi,
I have some kind of cache problem while downloading files from FTP server, using FTP task. Package work this way:
- Package takes customer FTP connection info from SQL table (server address, login, password, file name)
- For Each Loop is started
- Server name, login and password are assigned to FTP Connection manager in script task
- FTP task download file
- File is unzipped using script task
- File is loaded in SQL, etc..
- Downloaded and unzipped files are deleted
- For Each Loop finished
Everything runs ok when I do it from my PC (Win7) from Visual Studio. But when I run this package on Win2012 (with SQL Server 2012 installed), I have weird situation.
File for first customer is downloaded, extracted and everything is ok. But on second customer, first customers file is downloaded. Interesting thing is, both customers use same server name and same file name, but their logins and passwords are different. Files for both customers are very similar or even identical in size and generation date. I checked FTP logs and what I found - while downloading file for second customer, FTP server doesn't get "RETR" command, so file is not requested to be downloaded from server. last issued command before closing connection is "LIST".
I believe some kind of "improvement" does trick here. Package see same server, same file name, size and modification date, so it doesn't bother to download it. If I use different servers or file names for two customers, everything goes just fine. Any ideas how to solve this?
Thanks