all groups > sql server dts > june 2004 >
You're in the

sql server dts

group:

How to: define and run a DTS package with connections as passed in arguments


How to: define and run a DTS package with connections as passed in arguments thegriff
6/30/2004 3:13:32 PM
sql server dts:
I have a simple dts task. I need to update tables from a
source_server to a target_server.

Task: Drop table from target_server then copy table from
source_server to target_server.

Problem:
I want to be able to pass in the source_server and
target_server names as arguments.
How can I define a DTS package to use passed in arguments?
I need something similar to command line input arguments
or the DOS %1 %2 type arguments.

I understand I may be able to do this using SQL global
variables.
I need an example of how to this?

If I use global variables, what is the scope of the global
variable?
What happens when two different users execute the DTS
package simultaneously using different arguments?
Re: How to: define and run a DTS package with connections as passed in arguments Allan Mitchell
7/1/2004 8:25:08 AM
You can use Global Variables to map the values in Global Variables to
properties in your package
In DTS 2000 you can use the DEynamic Properties task to read from an
external source the value to set.
If using DTSRUN you can look at the /A switch.

There are examples of mapping variables to properties here

Connections
(http://www.sqldts.com/default.aspx?101)

Multiple people execute the same package they each get a copy of the package
and their variables are their variables. Thise variable values are valid
for the runtime of the package. They are not persisted so when you open the
package in Designer they will be values you originally set at runtime.

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
[quoted text, click to view]

AddThis Social Bookmark Button