Showing posts with label execute. Show all posts
Showing posts with label execute. Show all posts

Thursday, March 29, 2012

FTP Task fails to execute

Hi everyone:

I have a very simple FTP Task that is supposed to grab two files from an ftp server and save them locally on my machine. The problem is that when I test the connection everything works okay (I know that this connection "hides" the password when seen on the Connection Manager Editor, so I re-enter it everytime I want to test the connection). I can see in the Task property that the username and passwords are set, but regardless I always get this error message:

Error: 0xC002918F at Cost Files Transfer, FTP Task: Unable to connect to FTP server using "FTP Bread".

Any idea what could be worng?

Thanks

Idelso

for those of you who have the same issue. apparently is a bug in the Task. Simply put the password in a variable and reference it and it will work okay. The UI deletes the password and as such it can not make the connection.

|||

After you have set the password on the FTP Connection Manager Editor and click OK to commit the settings, did you re-open the FTP Connection Manager Editor and click OK again? This is the only way I can reproduce your problem.

Everytime you re-open the FTP Connection Manager Editor, we explcitly empyt out the password information. If you click OK without specifying tyhe password again, the empty password will be use.

So avoid the problem, either don't re-open it or click the "Cancel" button to avoid committing the empty password.

FTP Task Connection Problem

Problem: my FTP Connection Manager cannot connect to the FTP service specified in its configuration parameters. When I execute the FTP Task hooked to that connection manager I get the following error:

[FTP Task] Error: Unable to connect to FTP server using "FTP Connection Manager".

When I test the FTP service using FTP from a command prompt on the same workstation using the same parameters it connects just fine.

When I attempt to edit the settings in the FTP Connection Manager, the editor window pops up and then immediately disappears which is another problem. As I watch closely I can see that the username property is set to my domain login, not the value I typed in when I created it.

So I used the property sheet for the manager to set all the parameters correctly. However it still will not connect. Am I missing something? I've seen posts concerning issues connecting to UNIX/LINUX based FTP services. This particular service is hosted on a LINUX box. TIA.

I am not sure if this gona work for you or not but no harm trying it out, because this worked out for me. For example:

ftp://myservername/

if you type this in windows explorer then it prompts you for username and password.

Fillout the property page as follows:

Server Name: myservername (Do not use ftp:// prefix or the / suffix)

Port No.: 21 (in not changed)

Verify this with 'Test Connection' button.

Tuesday, March 27, 2012

FTP file using DTS package

I have a DTS package which does the following
1. EXECUTE SQL TASK (query in it)
on success
2. Microsoft OLE DB (database connection)
transform data task
3. Text File Destination (creates a text file TEST in a folder)
on success
4. FTP ( I WANT TO FTP THIS FILE TO A SITE)
The problem is I click on the FILE TRANSFER PROTOCOL TASK
and its asks me to enter the FTP SITE USERNAME AND PASSWORD
and then the destination DIRECTORY PATH.
I don't know the path. What do I need to mention here
Also when I click on file and select a Blank Text file from there
and check overwrite still after the task is complete data does not
appears in that.
ALTHOUGH IT SAYS TASK SUCCESSFUL even if I leave the destination
Directory path BLANK.
Does anyone knows how to figure this out. I am sure its a simple
solution.VJ:
What do you mean you do not know the path? If you were to manually upload
the file to an ftp site you would type in the ftp site. For example:
ftp.access.com. If this was a valid ftp site then I would be taken to the
folder where I needed to send my files. This is usually a setting that is
set up by the company in charge of the ftp site.
So when you set up the FTP on DTS you would chose internet as the source,
enter your username and password. On the path you would use :ftp.access.com.
I would need to know more information on your file move or overwrite
problem. Does the problem exist when you move the file from your file that
you created to the ftp site? Maybe once you get the FTP path configured
correctly you will not have this problem.
--
Thanks Kllyj64
"VJ" wrote:
> I have a DTS package which does the following
>
> 1. EXECUTE SQL TASK (query in it)
> on success
> 2. Microsoft OLE DB (database connection)
> transform data task
> 3. Text File Destination (creates a text file TEST in a folder)
> on success
> 4. FTP ( I WANT TO FTP THIS FILE TO A SITE)
> The problem is I click on the FILE TRANSFER PROTOCOL TASK
> and its asks me to enter the FTP SITE USERNAME AND PASSWORD
> and then the destination DIRECTORY PATH.
> I don't know the path. What do I need to mention here
> Also when I click on file and select a Blank Text file from there
> and check overwrite still after the task is complete data does not
> appears in that.
> ALTHOUGH IT SAYS TASK SUCCESSFUL even if I leave the destination
> Directory path BLANK.
>
> Does anyone knows how to figure this out. I am sure its a simple
> solution.
>|||VJ wrote:
> I have a DTS package which does the following
>
> 1. EXECUTE SQL TASK (query in it)
> on success
> 2. Microsoft OLE DB (database connection)
> transform data task
> 3. Text File Destination (creates a text file TEST in a folder)
> on success
> 4. FTP ( I WANT TO FTP THIS FILE TO A SITE)
> The problem is I click on the FILE TRANSFER PROTOCOL TASK
> and its asks me to enter the FTP SITE USERNAME AND PASSWORD
> and then the destination DIRECTORY PATH.
> I don't know the path. What do I need to mention here
> Also when I click on file and select a Blank Text file from there
> and check overwrite still after the task is complete data does not
> appears in that.
> ALTHOUGH IT SAYS TASK SUCCESSFUL even if I leave the destination
> Directory path BLANK.
>
> Does anyone knows how to figure this out. I am sure its a simple
> solution.
>
Hi
I think the problem is that the FTP task is only only able to download
files from an FTP site - not upload.
Instead you can create a bat file with the commands for the files you
want to upload and then execute this bat file from your DTS package.
That's the way I'm doing it and that works fine.
Regards
Steen Schlüter Persson
DBAsql

FTP file using DTS package

I have a DTS package which does the following
1. EXECUTE SQL TASK (query in it)
on success
2. Microsoft OLE DB (database connection)
transform data task
3. Text File Destination (creates a text file TEST in a folder)
on success
4. FTP ( I WANT TO FTP THIS FILE TO A SITE)
The problem is I click on the FILE TRANSFER PROTOCOL TASK
and its asks me to enter the FTP SITE USERNAME AND PASSWORD
and then the destination DIRECTORY PATH.
I don't know the path. What do I need to mention here
Also when I click on file and select a Blank Text file from there
and check overwrite still after the task is complete data does not
appears in that.
ALTHOUGH IT SAYS TASK SUCCESSFUL even if I leave the destination
Directory path BLANK.
Does anyone knows how to figure this out. I am sure its a simple
solution.VJ:
What do you mean you do not know the path? If you were to manually upload
the file to an ftp site you would type in the ftp site. For example:
ftp.access.com. If this was a valid ftp site then I would be taken to the
folder where I needed to send my files. This is usually a setting that is
set up by the company in charge of the ftp site.
So when you set up the FTP on DTS you would chose internet as the source,
enter your username and password. On the path you would use :ftp.access.com
.
I would need to know more information on your file move or overwrite
problem. Does the problem exist when you move the file from your file that
you created to the ftp site? Maybe once you get the FTP path configured
correctly you will not have this problem.
--
Thanks Kllyj64
"VJ" wrote:

> I have a DTS package which does the following
>
> 1. EXECUTE SQL TASK (query in it)
> on success
> 2. Microsoft OLE DB (database connection)
> transform data task
> 3. Text File Destination (creates a text file TEST in a folder)
> on success
> 4. FTP ( I WANT TO FTP THIS FILE TO A SITE)
> The problem is I click on the FILE TRANSFER PROTOCOL TASK
> and its asks me to enter the FTP SITE USERNAME AND PASSWORD
> and then the destination DIRECTORY PATH.
> I don't know the path. What do I need to mention here
> Also when I click on file and select a Blank Text file from there
> and check overwrite still after the task is complete data does not
> appears in that.
> ALTHOUGH IT SAYS TASK SUCCESSFUL even if I leave the destination
> Directory path BLANK.
>
> Does anyone knows how to figure this out. I am sure its a simple
> solution.
>|||VJ wrote:
> I have a DTS package which does the following
>
> 1. EXECUTE SQL TASK (query in it)
> on success
> 2. Microsoft OLE DB (database connection)
> transform data task
> 3. Text File Destination (creates a text file TEST in a folder)
> on success
> 4. FTP ( I WANT TO FTP THIS FILE TO A SITE)
> The problem is I click on the FILE TRANSFER PROTOCOL TASK
> and its asks me to enter the FTP SITE USERNAME AND PASSWORD
> and then the destination DIRECTORY PATH.
> I don't know the path. What do I need to mention here
> Also when I click on file and select a Blank Text file from there
> and check overwrite still after the task is complete data does not
> appears in that.
> ALTHOUGH IT SAYS TASK SUCCESSFUL even if I leave the destination
> Directory path BLANK.
>
> Does anyone knows how to figure this out. I am sure its a simple
> solution.
>
Hi
I think the problem is that the FTP task is only only able to download
files from an FTP site - not upload.
Instead you can create a bat file with the commands for the files you
want to upload and then execute this bat file from your DTS package.
That's the way I'm doing it and that works fine.
Regards
Steen Schlter Persson
DBA

FTP Connection problem with "The Password was not allowed" error message

Hi

I have a simple FTP task that I am trying to connect to an FTP server. I can test the connection fine, however, when I try and execute the package from Visual Studio 2005 I get the "The Password was not allowed" message. I have found some threads that mention setting the protection level on the package to EncryptSensitiveWithPassword, however, I still get the same message appearing.

Has anyone any idea as to what is causing this and how I can get around it

Thanks

Darrell

The error comes from the FTP server due to a invalid password. Can you tell me what is the value ProtectionLevel property in the Package?


Thanks,

Ovidiu Burlacu

|||EncryptSensitiveWithPassword means you have to enter a password in the package properties. You have specified the wrong password there, most likely.

For running in BIDS, EncryptSensitiveWithUserKey is just fine.|||

I had set the PackageProtection to EncryptSensitiveWithPassword, but that didn't work either.

As for an incorrect password, this can't be correct, because when I test the FTP connection it works fine

Any other thoughts ?

Thanks

D

Monday, March 19, 2012

From DataSet To SqlDataReader in a CLR Stored Procedure

Hi all,
I'm writing a CLR stored procedure that just execute a query using 2 parameters.

SqlContext.Pipe.Send can send a SqlDataReader, but if I've got a DataSet?
How can I obtain a SqlDataReader from a DataSet?

Dim command As New SqlCommand(.......)
.....
Dim ds As New DataSet()
Dim adapter As New SqlDataAdapter(command)

adapter.Fill(ds, "MyTable")

... 'manipulating the ds.Tables("MyTable")

At this moment I have to send the table...but
ds.Tables("MyTable").CreateDataReader()
just give me a DataTableReader, and i can't send it with SqlContext.Pipe.Send(...

Help me please!
The DataSet.CreateDataReader method can be used to generate a data reader that reads data from a dataset.|||DataSet.CreateDataReader() is the same of dataSet.Table(x).CreateDataReader()...it returns a DataTableReader!
There is also an overload for dataSet.CreateDataReader that get an array of dataTable as parameter!|||Sorry about that. For some reason, I was quite convinced that SqlPipe.Send accepted an IDataReader rather than a SqlDataReader. Looks like you'll need to use SqlPipe.SendResultsRow. See http://msdn2.microsoft.com/en-US/library/microsoft.sqlserver.server.sqlpipe.sendresultsrow(VS.80).aspx for details and sample code.|||Thank you, but i don't think that can be the "best practice", it's not in .net style!!!
I'll search better!|||? It used to accept IDataReader during the betas, all the way up to one of the final CTPs -- then that functionality was removed for some reason :( -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <Nicole Calinoiu@.discussions.microsoft.com> wrote in message news:7725b945-d2c1-44d0-a698-fa9a344a48d4@.discussions.microsoft.com...Sorry about that. For some reason, I was quite convinced that SqlPipe.Send accepted an IDataReader rather than a SqlDataReader. Looks like you'll need to use SqlPipe.SendResultsRow. See http://msdn2.microsoft.com/en-US/library/microsoft.sqlserver.server.sqlpipe.sendresultsrow(VS.80).aspx for details and sample code.|||

Well, at least I wasn't imagining things. ;)

Based on the current implementation, I'd have to guess that the change may have been made for 2 main reasons: improved performance and enhanced metadata extraction. However, I can't see any reason why an overload that accepts IDataReader couldn't have been left in since the "improved" SqlDataReader implementation would still be used where possible. A wee bit odd...