Stephen Lonsdale wrote:
Quote:
We have a number of DTS packages that use a Text File Source connection.
These packages are implemeted at a number of client sites and although the
source text file names are the same at each site the location (server name,
unc path - disk, folder etc) differs and we have no/little influence over
this.
Is there a way of specifying a global variable for path / file name that can
be simply used (i.e. little or no code) across our packages.
many thanks
Stephen |
You can use the Dynamic Properties task to full values from locations
such as INI files, the registry or a SQL Server table. So use this and
maybe some ActiveX Script Tasks to set variables and properties from an
external source.
Personally I use two methods of design, depending on what scenario I'm
going for.
1 - All packages use a Dynamic Properties Task to read any such data
from a SQL Server table, and assign it to variables or properties. The
name of the SQL Server for the Dynamic Properties Task connection is
read from a global variable. This global variable is set from the
command line, DTSRUN, through the /A parameter. It is always a local or
semi-local server, so Windows Auth is always used.
2 - All parameters are passed in from the command line and assigned to
global variables. Again this uses DTSRUN /A.
Design you packages such that they read all such parameters from an
external source, that is the key. How you set that source can vary, but
one simple thing to change.
--
Darren
http://www.sqldts.com
http://www.sqlis.com