April 15, 2010 at 1:33 pm
I need to find a way to import a file into SQL Server 2008 that is accessed via FTP. Any suggestions?
Thanks
April 15, 2010 at 3:04 pm
I recommend doing this with a .net application. We have to do this regularly via ftp and http and I set up a table driven .net application that downloads, unzips (if necessary) pre-processes then bulk inserts data into servers at different times.
That way you get the robust error handling, retrying and logging that you really need for a production environment.
The probability of survival is inversely proportional to the angle of arrival.
April 15, 2010 at 3:49 pm
April 18, 2010 at 8:20 pm
SSIS is a natural solution, you might also like to consider:
1. An external tool like WGET (call from T-SQL/Agent then bulk load the local file)
2. SQLCLR
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
April 18, 2010 at 9:08 pm
Is the file name the same every time? Same location? Or do you need to somehow read what's on the FTP site and then programmatically pick a file to retreive?
April 19, 2010 at 1:25 am
You can alternatively use BCP to export the data , Zip it (7za is free and also run from command line)
then using ftp you can copy to destination , unzip it and use bcp in to import.
I have been doing this since past 6 months and transporting around 20 gb of data across wan. The whole process just takes around 1.5 hrs and is fully automated using batch file.
April 19, 2010 at 5:12 am
SSIS is the way to go. If you need more functionality like sftp, look into CozyRoc.
April 19, 2010 at 8:39 am
I use SSIS and cuteFTP (Pro edition) if I am dealing with protocols like SFTP or HTTPS
April 20, 2010 at 8:38 am
I use SSIS and WinSCP.
-------------------------------------------------------------------------
Normal chaos will be resumed as soon as possible. :crazy:
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply