dbTalk Databases Forums  

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

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


Discuss How to: define and run a DTS package with connections as passed in arguments in the microsoft.public.sqlserver.dts forum.



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

Default How to: define and run a DTS package with connections as passed in arguments - 06-30-2004 , 05:13 PM






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?
Would they overwrite each others global variables?

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: How to: define and run a DTS package with connections as passed in arguments - 07-01-2004 , 02:25 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
"thegriff" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
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?
Would they overwrite each others global variables?



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.