Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Setting Dynamic Connections in DTS Packages

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-06-13 : 08:08:52
Srinivasa Girish writes "I gathered an article on use of FSO in DTS and using global variables in DTS which provided me with a overview of using global variables for dynamically setting DTS connection Is it possible to provide the sample code so that I can invoke it and try.

My Goal:

I have a DTSpackage say package1 that does data transformation and outputs the data to a text file.

Source Data:

SERVER NAME: XYZ
DATABASE NAME: dbTest

Destination Text File

File Name: G:\test\testlog.txt

If I develop the package under one server then when I want to move it to a different server I want to be able to set the above values (Source & Destination) dynamically if possible else I would like to know the alternative method of implementation.

Srinivasa Girish"

KHeon
Posting Yak Master

135 Posts

Posted - 2002-06-13 : 08:12:04
I've done a couple things that setup dynamically set datasources. One solution I did was to use an INI file to set the source and target database information, which works great for what I developed it for (it's a job that gets executed maybe once every 3-6 months so editing the source/target info is pretty simple, and doesn't require that we get in and change code in the DTS package.

When you say dynamically are you referring to telling, through code what server the DTS is running on and then setup the connection?

Kyle Heon
PixelMEDIA, Inc.
Senior Application Programmer, MCP
kheon@pixelmedia.com
Go to Top of Page
   

- Advertisement -