Home > SSIS > SQL SERVER – Send or Receive files from FTP server – FTP Task – SSIS

SQL SERVER – Send or Receive files from FTP server – FTP Task – SSIS


FTP

File Transfer Protocol (FTP) is a standard network protocol used to copy a file from one host to another over a TCP-based network. Source http://en.wikipedia.org/wiki/File_Transfer_Protocol

FTP Task

FTP Task sends and receives data files and manages directory in the server. It is an important task that can be used in the SSIS package to handle file transfer through FTP.

Read morehttp://msdn.microsoft.com/en-us/library/ms137656.aspx

Scenario

I have two requirements in which I need to send a text file from my local machine to ftp server. Secondly, my DBA team uploads a data file every data and I need to get the file to my machine and upload in to a table in my database.

To make this article very simple I am going show you how to download a file from the FTP server to my local machine.

In this exercise, I have already created an FTP account in www.drivehq.com . I have also uploaded a file in the server. So, I will explain how to configure a SSIS package to download a file from FTP server.

Implementation

Step 1: Create a package and add the FTP Task.

Step 2: Edit the task and create FTP Connection Manager from FtpConnection property.

FTP Connection  settings

Step 3: Go To file transfer tab and configure the following properties

  1. Under local parameter category

Select local path and create a file connection and map to a folder in the local machine.

  1. Under operation category

Select the operation property as Receive files

  1. Under Remote parameters category

Set Reportpath with the ftp location of the data file

Step 4: Click OK and execute the package

Thanks for reading. Please rate this article and subscribe for email to get post updates instantly.

Advertisements
  1. Gary Miller
    June 7, 2011 at 11:18 am

    Can this control do Secure FTP? It seemed like that feature was lacking if you need to send a file to a customer.

  2. June 7, 2011 at 1:11 pm

    Yeah, It does not have this feature. But, we can write custom script to accomplish this task. You can use script task. or
    Here is the free SFTP. http://winscp.net/eng/docs/scripting

  1. September 5, 2013 at 3:45 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: