Showing posts with label path. Show all posts
Showing posts with label path. Show all posts

Thursday, March 29, 2012

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

Tuesday, March 27, 2012

FTP Task

I am trying to grab a file from an ftp server hosted on a mainframe. The path to the file is in the following format 'xxx.xxxx.xxxxx' Yes you read right there are single quotes surrounding a string. If I use the built in ftp program in command prompt I am able to download the file after executing the following commands.

ftp ftpserver.domain.com
userid
password
cd 'xxx.xxxxxx.xxxxxx'
get remotefile localfile

The problem is when I use an ftp task in a ssis package. When I define the remote path I get an error that says the path doesn't start with a /. Of course the path doesn't start with a / it starts with '. Just for giggles I added / infront of the ' and got an error that said the file doesn't exist.It is a known problem when using non-Microsoft FTP servers. You can search this forum for many conversations on that topic.

One workaround is to build your own batch file and then execute that batch file with an Execute Process task inside SSIS.|||

Phil Brammer wrote:

It is a known problem when using non-Microsoft FTP servers. You can search this forum for many conversations on that topic.

One workaround is to build your own batch file and then execute that batch file with an Execute Process task inside SSIS.

That's what I thought I would need to do. Just wanted to make sure the out of the box solution was really broke before I went down that path. Thanks!

|||

If you think that not being able to receive files from the stock FTP task on a mainframe is a serious bug and would like to see it fixed, please "vote" on the following:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=281893

sql

FTP Task

I am trying to grab a file from an ftp server hosted on a mainframe. The path to the file is in the following format 'xxx.xxxx.xxxxx' Yes you read right there are single quotes surrounding a string. If I use the built in ftp program in command prompt I am able to download the file after executing the following commands.

ftp ftpserver.domain.com
userid
password
cd 'xxx.xxxxxx.xxxxxx'
get remotefile localfile

The problem is when I use an ftp task in a ssis package. When I define the remote path I get an error that says the path doesn't start with a /. Of course the path doesn't start with a / it starts with '. Just for giggles I added / infront of the ' and got an error that said the file doesn't exist.It is a known problem when using non-Microsoft FTP servers. You can search this forum for many conversations on that topic.

One workaround is to build your own batch file and then execute that batch file with an Execute Process task inside SSIS.|||

Phil Brammer wrote:

It is a known problem when using non-Microsoft FTP servers. You can search this forum for many conversations on that topic.

One workaround is to build your own batch file and then execute that batch file with an Execute Process task inside SSIS.

That's what I thought I would need to do. Just wanted to make sure the out of the box solution was really broke before I went down that path. Thanks!

|||

If you think that not being able to receive files from the stock FTP task on a mainframe is a serious bug and would like to see it fixed, please "vote" on the following:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=281893