Groups | Blog | Home
all groups > sql server dts > june 2006 >

sql server dts : How can I achieve the foll in dts


Chris
6/6/2006 1:43:01 PM
Hi,
I need to download a file from an ftp server via my dts package. The order is

connect to ftp server
check if file exists (the name is always the same)
if yes, down load file and delete copy on ftp server
rename file from test to test.txt
parse file (This I got working)

I need help with the ftp part.

Allan Mitchell
6/7/2006 12:00:00 AM
Hello rb,

The package does not automatically have to fail. You could handle the "No
File" through the "On Failure" precedence constraint. You could also set
up the package to allow n errors before failing.

To rename the file I would be tempted to use the File System task from the
toolbox.


allan

[quoted text, click to view]

rb
6/7/2006 2:00:02 AM
Hi Chris,

[quoted text, click to view]

Within DTS there is a FTP task where you can select a source, destination,
login information, etc. If the file does not exists this task will fail, so
automatically stopping the rest of your DTS package.

[quoted text, click to view]
Once the FTP task has completed successfully you could have use an ActiveX
task to rename the file using the FileSystemObject model or write a batch/cmd
file to do the renaming and execute it with a Execute Process Task.

[quoted text, click to view]
rb
6/7/2006 3:11:02 AM
Hi Alan,

You are perfectly correct, both the success and failure can be handled.

Ray

[quoted text, click to view]
Chris
6/7/2006 9:21:02 AM
Hey, Thanks lads. Will work on this right away. This is good.

[quoted text, click to view]
AddThis Social Bookmark Button