all groups > sql server dts > july 2003 >
You're in the

sql server dts

group:

DTS package with variable


DTS package with variable Ram
7/31/2003 5:02:49 PM
sql server dts: Hi,

I want to create a DTS package which can accept parameters
and only import / export data based on the value of the
parameter.

can anyone please help on how to create such package and
how to execute such package by passing parameter.

Appreciate your help.

Thank you,
Ram.
DTS package with variable Jamie Thomson
8/1/2003 5:13:22 AM
You could put the parameter value in a .ini file and read
it in using the Dynamic Properties package which will
populate a global variable which you can then use
throughout your package.

Regards
Jamie


[quoted text, click to view]
Re: DTS package with variable Allan Mitchell
8/1/2003 5:17:13 AM
Are you using 2000 ?

If you are then add a Dynamic properties task to your designer as the first task. This can read from a variety of sources and set a variety of properties in your package i.e. Destination Server, Database etc

You can also write an Active Script task that sets properties based on Global Variable values. You can pass in Global variable values on the cmd line using DTSRUN and the /A switch.

You could if using v7 SQL Server have your values stored in a table and use a datapump task to pump the values into Global Variables. You then use the Active Script task to assign them.

Have a look through the site and there are examples of most properties that people reset in a package being reset.

www.SQLDTS.com


--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
AddThis Social Bookmark Button