dbTalk Databases Forums  

RE: Dynamic FTP Connection

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss RE: Dynamic FTP Connection in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Charles Kangai
 
Posts: n/a

Default RE: Dynamic FTP Connection - 08-28-2006 , 01:17 PM






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






"kiran" wrote:

Quote:
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")).Cus tomTask

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



Reply With Quote
  #2  
Old   
Sissel
 
Posts: n/a

Default RE: Dynamic FTP Connection - 08-31-2006 , 02:05 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?


"Charles Kangai" wrote:

Quote:
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






"kiran" wrote:

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")).Cus tomTask

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



Reply With Quote
  #3  
Old   
Deepesh (Offline)
Junior Member
 
Posts: 3
Join Date: Sep 2006

Default More Description - 09-11-2006 , 09:48 AM



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

Reply With Quote
  #4  
Old   
Deepesh (Offline)
Junior Member
 
Posts: 3
Join Date: Sep 2006

Default 09-12-2006 , 07:14 AM



[quote=Charles Kangai]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






Hi I have tried that, in the configuration file I have added two connection for two different FTP location but the last one work in all the cases. The file is not fetched from the first location.

Reply With Quote
  #5  
Old   
Deepesh (Offline)
Junior Member
 
Posts: 3
Join Date: Sep 2006

Default 09-20-2006 , 01:26 AM



I have solved the task.

Thanks,
Deepesh Verma

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.