all groups > sql server dts > august 2006 >
You're in the

sql server dts

group:

Dynamic FTP Connection


Dynamic FTP Connection kiran
8/28/2006 5:23:04 AM
sql server dts:
Hello ,
I wanted to know how to make a dynamic FTP Connection. My
FTP Server will be having a FTP server Name , File path, FTP Server
Name, FTP User Name, FTP Password. Our Database maintains different FTP
servers for different clients.In DTS we used below code in activex
script task to connect to the FTP Dynamically.


"Set objTask =
objPackage.Tasks(cstr("DTSTask_DTSFTPTask_2")).CustomTask

objTask.SourceLocation = 0
objTask.sourcesite = DTSGlobalVariables("g_str_ftpservername").Value
objTask.SourceUsername = DTSGlobalVariables("g_str_ftpusername").Value
objTask.SourcePassword = DTSGlobalVariables("g_str_ftppassword").Value
objTask.NonOverwritable = False
objTask.SourceFilename = srcFiles
objTask.destsite = DTSGlobalVariables("g_str_filelocation").Value

Now we are migrating our workflows to SSIS (SQL Server
2005). The problem is we are unable to find solution for dynamically
connecting to FTP Server which maintains a password.
Can any body help please.
Thanks,
Kiran G
RE: Dynamic FTP Connection Charles Kangai
8/28/2006 11:17:01 AM
Create your FTP connection manager (with static values). Create a package
configuration by selecting Package Configurations from the SSIS menu, then
export the ConnectionString, ServerName, ServerPassword and ServerUserName
properties of the FTP connection manager to the package configuration
location. Save your package configuration to an XML file or to a SQL Server
table, because they allow multiple values to be saved.

Each time you want new values for ServerName, ServerPassword, etc. you just
enter them into the configuration file or SQL Server table. This way your
package will run dynamically with the whatever values you have saved in your
package configuration.

The SSIS tutorial also shows you how to create a package configuration.

Hope this helps.

Charles Kangai, MCT, MCDBA

Author of Learning Tree's 4-day course: "SQL Server 2005 Integration
Services" URL: http://www.learningtree.com/courses/134.htm
Author of Learning Tree's 4-day course: "SQL Server Reporting Services" URL:
http://www.learningtree.com/courses/523.htm






[quoted text, click to view]
Re: Dynamic FTP Connection kiran
8/30/2006 10:45:22 PM

[quoted text, click to view]

Thanks Charles Kangai ,

It was really useful.It is working..
Thank You.
Now the question is regarding downloading a file from an FTP Server to
local (through SSIS FTP Task). I have 2 questions to ask you.
1. I have Downloaded a file of 5.5 MB from FTP Server to Local through
(SSIS FTP Task).It took nearly 4 Minutes 20 seconds (Nearly). Is there
any method to download a file from an FTP Server to local (through SSIS
FTP Task)? (These are Just the test results.).

2. I have a set of Files to download from an FTP.I am using FTP Task
in a loop to download each file.Now I think Each Time It passes through
the FTP Task Is connection to the Server.Obviously there is a time
delay. is there any method through which i can call the FTP task only
once to download those set Of files.?
Thnaks,
Kiran G
RE: Dynamic FTP Connection Sissel
8/31/2006 12:05:02 AM
I have tried this method for an Oracle connection, both with SQL Server and
XML.
When running the package, I get an error "Invalid username/password).

I check the password, and it's **** in db and blank in the xml file.
I type the correct password, but it still does not work.

Have you tried this with an Oracle connection?


[quoted text, click to view]
RE: Dynamic FTP Connection Deepesh
9/11/2006 9:48:20 AM

Can you please describe in brief, How this can be don

--
Deepes
-----------------------------------------------------------------------
Deepesh's Profile: http://www.dbtalk.net/m81
View this thread: http://www.dbtalk.net/t32862
RE: Dynamic FTP Connection Deepesh
9/12/2006 7:14:09 AM

[quoted text, click to view]

--
Deepes
-----------------------------------------------------------------------
Deepesh's Profile: http://www.dbtalk.net/m81
View this thread: http://www.dbtalk.net/t32862
RE: Dynamic FTP Connection Deepesh
9/20/2006 1:26:29 AM

I have solved the task.

Thanks,
Deepesh Verm

--
Deepes
-----------------------------------------------------------------------
Deepesh's Profile: http://www.dbtalk.net/m81
View this thread: http://www.dbtalk.net/t32862
Re: Dynamic FTP Connection kiran
9/20/2006 1:55:42 AM
Thats for ur soln. But My problem is not how to dynamically connect to
FTP Server which is having password


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