Thursday, March 29, 2012

ftp task to network drive?

Hi I have a simple ftp task that downloads some files from an ftp to a local directory. That package run as a sheduled job from the sql 2005 server without a problem so far.

Now I whant to have the same task but to download the files to different mapped network drives , so I mapped the drives then I changed the paths to the config file but since then the job fails...

is it possible to do that or I did something wrong?

Thanks
g

Drive mappings are local to the user profile, so trying to use them in unattended jobs which run under a service account context does not make too much sense. I would strongly advise you to use a UNC path instead, e.g. \\Server\Share\Folder\File.ext

You will need top ensure that the service account or job proxy account has access to the share, as well as the normal folder permissions required for local as well.

|||Hi Darren,

Thanks a lot for the reply!!

I try the UCN path from the BI studio and it works fine but since I run it as a job faild. It must be something with the access to the share as you already said but since I am a newbie I don't know where exaclly to look for the problem... I am not running the job from a proxy do I have to create one? And if yes could you let me know for the process ?

As about the folder permissions I ve set full permission to "Everyone".

Thanks in advanced
G
|||

There is no need for a proxy account. By default your job will run under the context of the SQL Server Agent service account. Make sure you know what this is, and then check if that account has access to the share.

FTP Task Send error

I cannot seem to get the FTP task to send files. I tested the process manually (not using ssis) and it works fine. I have tried many ways to transfer the files, using variables, including full paths, partial paths, etc. but I keep getting a "550 permission denied" error. I have rechecked all variables. Has anybody else had trouble sending files with the FTP task?

Do you have access (or can someone GET access) to the FTP logs on the server to see who it thinks you are connecting as?|||

I am checking with them but it seems strange. I have set the user and password using a configuration file and I am getting the following error:

[Connection manager "MyFTPConnection"] Error: An error occurred in the requested FTP operation. Detailed error description: 200 Type set to IMAGE. 227 Entering Passive Mode (xx,xx,xxx,xxx,xx,xx). 550 permission denied .

I have tested the configuration file to make sure the server name was being set correctly from the file and it was. I am assuming the password would be also. I can connect manually.

This really should not be such a struggle. I remember DTS did not have an upload FTP component. Maybe I need a 3rd party component. Does anybody know of one?

|||

Looks like I'm connecting but the required slash is causing a permissions problem on the server. Anybody know how to solve this? The task won't let me send a file without a slash.

[FTP Task] Error: Variable "RemoteFile" doesn't start with "/".

sql

FTP Task samples

I am using SQL Server 2005 - CTP June 2005 and I am trying to create a simple FTP task. After I create a new FTP Connection Manager and verify the connection, I drag an FTP Task object to the designer and set the FtpConnection property to my FTP Connection Manager. The designer is showing a red X in the FTP Task object with the following error:

Attempt to read message string 0xc002f313 failed with error 0xc02090f3. Make sure all message re...

Any ideas? I am also trying to locate some samples for using the FTP Task. Can anyone point me in the right direction?

Thank you.
Clay BenoitHi Clay
This is a validation error telling you to complete the properties in the FTP dialog, either select send or the receive option with complete valid paths
for example of FTP please try the http://www.sqlis.com/

Thanks|||Perhaps it's this error? http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackid=40987f12-a941-46b3-ad80-01f67ff25559

FTP Task question

Hi,

In the FTP Task, is there any way to set it so that once a file is successfully FTP'd down, it deletes the file on the ftp server?

We need to be able to do this so that on the next day's ftp, we don't download OLD files, ie) the one from the day before with the same name. Deleting the file immediately after successful download will ensure that this never happens.

Thanks

I have one possible approach that you could use to achieve this:

Have one FTP task that does the operation of "Receive Files". A second FTP task can be used to the operation of "Delete Remote Files" and the precedence constraint between the first and the second task could be that the second one executes on the first task returning success.

Thanks,

Bhargavi


This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Yes, I see that option now.

What happens in the event that the file does not exist - it got deleted some other way? Then I can't move forward on a success constraint, as it will be a failure.

I suppose I could have two "paths" but that seems kind of klunky.

Is there a better way to handle this?

Thanks

|||

You could use Completion. However, if the file doesn't exist, you don't want to try to delete it, do you?

I'd probably put both the FTP Task to download the file and the FTP Task to delete the file in a sequence container. Use an Success constraint between the download task and the delete task, and a Completion contraint between the sequence container and the next task to be executed.

|||It's not "klunky", it's really pretty straight forward and self-documenting. If the retrieval is SUCCESSful, DELETE the file. If the retrieval is SUCCESSful...any other steps. Use the COMPLETION to move forward with any steps that do not rely on the retrieval.

FTP Task question

Hi,

In the FTP Task, is there any way to set it so that once a file is successfully FTP'd down, it deletes the file on the ftp server?

We need to be able to do this so that on the next day's ftp, we don't download OLD files, ie) the one from the day before with the same name. Deleting the file immediately after successful download will ensure that this never happens.

Thanks

I have one possible approach that you could use to achieve this:

Have one FTP task that does the operation of "Receive Files". A second FTP task can be used to the operation of "Delete Remote Files" and the precedence constraint between the first and the second task could be that the second one executes on the first task returning success.

Thanks,

Bhargavi


This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Yes, I see that option now.

What happens in the event that the file does not exist - it got deleted some other way? Then I can't move forward on a success constraint, as it will be a failure.

I suppose I could have two "paths" but that seems kind of klunky.

Is there a better way to handle this?

Thanks

|||

You could use Completion. However, if the file doesn't exist, you don't want to try to delete it, do you?

I'd probably put both the FTP Task to download the file and the FTP Task to delete the file in a sequence container. Use an Success constraint between the download task and the delete task, and a Completion contraint between the sequence container and the next task to be executed.

|||It's not "klunky", it's really pretty straight forward and self-documenting. If the retrieval is SUCCESSful, DELETE the file. If the retrieval is SUCCESSful...any other steps. Use the COMPLETION to move forward with any steps that do not rely on the retrieval.

FTP Task Problem

I am new to this task...In order to set up this task do i need to set any basic thing on my local machine.

If so Please let me know

Sureshv,
Please read the Books On-Line page on this task and then come back here with any further questions you might have.

http://msdn2.microsoft.com/en-us/library/ms137656.aspx|||

I have few question

server name= ?

Server por =?

username=?

password=?

if i am trying to connect to remote

|||

sureshv wrote:

I have few question

server name= ?

Server por =?

username=?

password=?

if i am trying to connect to remote

If you know how to use FTP, you know the answer to those questions otherwise you won't be able to use FTP at all and you should probably talk to whomever supports the FTP site you want to connect to.|||

What i meant is

IS server name=Name of remote server or machine(is it ip address)

server port =server port which remote uses

username=is it valid username with all the permission to access

Password= valid password

|||

sureshv wrote:

What i meant is

IS server name=Name of remote server or machine(is it ip address)

server port =server port which remote uses

username=is it valid username with all the permission to access

Password= valid password

Yes.|||

I am trying to use FTP task to a remote machine.I am trying to take a local file from my machine and place it over there using FTP.

I place the ip address in the server name and i tried server name too..

port 21

i have a remote account(with full control set up) too by which i login using remote desk top

But my connection fails

Please help..

|||Can you ftp to this site and upload a file using one of approximately 10,000 (I'm being a little facetious but its close) non SSIS ftp clients?
|||I have no idea of what u are talking.what do i need to do now..I am not an expert in the area...would u please help|||I'm trying to help, believe it or not. The question was, can you upload to the site with a non-SSIS ftp client first off, so at least we know the issue is specific to SSIS?
|||

so do u mean that my system via command promt has an ability to reach the remote by sending files.

If u are talking about this.I say system gets connected but what do we need to do to send a file.

Please let me know.

|||Please stop starting new threads for an issue you've already opened here.

I've merged this thread.|||Should FTP from command prompt work first in order to set up ftp task
|||

sureshv wrote:

Should FTP from command prompt work first in order to set up ftp task

YES!

How do you know everything is setup correctly if you don't know how to FTP?

That is, how have you verified that it is setup correctly and that you have full permissions?

FTP TASK PROBLEM

Dear all,

I have problem in my ftp task.For example,
I create two variable remotepath and localpath to set up remote and local path of ftp task. And the IsRemotePathVariable and IsLocalPathVariable is set to true.

I create two funtions to retrun the pathvalue. The return value

is like 'D:\A.TXT' , but in DTSX the varible value is changed to 'D:\\A.TXT'. So my ftp task fail.

How can I overcome this problem?

Thanks a lot.

Regards

wen


Replace all occurences of "\\" with "\" if its causing you a problem.

You can do this in an expression.

-Jamie

|||

It doesn't actually change the value. It is just that the undelying engine for SSIS is written in C and "\" is an escape character. To actually display the value of "\" it has to be preceeded by a "\". so to use/display it in a string it appears as "\\". For example \r actually means a carriage return.

As for your situation what error are you getting?

|||

when the path value is changed to "\\" , the error is as bellow,

Error: 0xC0029183 at FTP Task, FTP Task: File represented by "User::FTPPATH" does not exist.
Task failed: FTP Task

sql