Floating FB popout byF5debug

SQL Server Integration Services (SSIS) – Part 23 – Send File using FTP Task in SSIS Package

 

This is part 23 of the series of article on SSIS. In this article, we are going to see how to send file to FTP using SSIS.

Introduction

In this article we are going to see on how to use a FTP task in SSIS package to Send a file.

You can look into my series of article on SSIS at the url - http://f5debug.net/tutorial/ssis.aspx

[more]

Steps:

In this article we are going to see on how to use a FTP task container in packaging. FTP task is mainly used to do a file transfer using FTP. SSIS provides the inbuilt task container to do a FTP of a file. Let’s jump start to see the on how to use the task in real time. Here I’m going to show a small example on how to configure a FTP task and Send a file to the remote host.

Follow steps 1 to 3 on my first article to open the BIDS project and select the right project to work on integration services project. Once the project is created, we will see on how to use FTP task container. Drag and drop the FTP task as shown in the below screen.

clip_image001

Now double click on the task to open the property window and set the properties as shown in the below screen.

clip_image002

The above image is for setting the FTP Connection, end user need to provide the correct connection settings and click on the Test Connection to confirm if the connection is valid.

Now in the file transfer tab we need to set the property since in our example we are going to send the file to FTP we need to set as below. Here input variable is used to get the path where we need to get the file.

clip_image003

Here the operation section we need to select Send Files in order to send files to a destination FTP. And in the Remote parameters section we need to specify the FTP site location using a variable and in the local parameter section we need to select the local file location to send file to the remote location.

Here once you have given valid credentials by running directly the package will do the necessary steps of sending the files from FTP to the local folder.

Conclusion

So in this article we have seen on how to use the FTP task to send a file from a local to a remote site.

About Author: Karthikeyan Anbarasan, Microsoft MVP (Most Valuable Professional) in ASP.NET/IIS Architecture. He is the Founder and Chief Editor of the www.f5debug.net website and has authored books on Windows Phone and Business Intelligence(SSIS). He is also a Passionate Speaker and a Blogger on Microsoft Technologies.

You can Join Me On: Facebook, Twitter, Google Plus, LinkedIn

Comments (4) -

Donna
Donna
8/9/2012 2:38:10 PM #

I just wanted to share some info I learned recently.

I got this error recently from the FTP task in SSIS:

     Unable to send files using "FTP".

I had everything correct in the package, by the book, and I had also referenced the instructions in this blog.  My FTP task was trying to send a file, but it gave the same error when trying to receive a file.  I already verified that I could send the file via command line FTP, so the FTP was not "secure FTP" (which wouldda required FileZilla or WinSCP or something similar) and my credentials were fine.

But I still got the above error.  I was beginning to thing that the FTP task in SQL Server 2008 was broken and just couldn't send files.

Well, this issue is now resolved and here is my solution...

The problem was in the destination folder.  I was assuming that the root folder for my FTP account held the files.  So I entered the destination folder as this:
   /data_in/

But... the FTP task sees the root folder as one up from that.  So I had to use my account name in the path... meaning I had to change the destination folder to this:    

   /myaccountname/data_in/

(where "myaccountname" was my login to the FTP site.)

Then it worked like a charm!

I hope this post helps someone else.

Donna

murali krishna
murali krishna
9/25/2012 4:06:05 AM #

I am facing the same problem here..... I tried the way you instructed above...Still My problem was not resolved.....Any help on this is more thankfull.

Regards,
Murali,
murali.ms18@gmail.com.

yogi
yogi
10/22/2013 7:37:48 AM #

nice articles

yogi
yogi
10/22/2013 10:55:32 AM #

how to get the port no of a ftp site

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Recent Posts

Random Posts

Most Viewed

URL Shortner

Create your own short urls!!!

Site Counter

free counters

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer. For accuracy and official reference refer to MSDN/ TechNet. I have documented my personal experience on this blog.

Protected by Copyscape Web Plagiarism Finder

Site Meter