Groups | Blog | Home
all groups > sql server (alternate) > july 2003 >

sql server (alternate) : DTS Package portability



theodore.feldman NO[at]SPAM fmglobal.com
7/7/2003 8:05:39 AM
If connection properties and global variables are set from an INI
file, how can a DTS package be made truly portable?

If the INI file pathname is hard-coded in the package, it must be
edited when you copy the package to a new environment; otherwise your
packages in multiple environments will all reference the same INI
file. If there are dozens of properties that need to be set
dynamically (for example, connections that reference different text
files), changing the pathname of the INI file for each one can be a
real bear.

I was hoping to be able to set the pathname of the INI file from the
command line as a global variable. Then the package could be pointed
dynamically to one of several INI files. However, the pathname for
the INI file cannot be set dynamically from a global variable, as far
as I can tell.

One alternative would be to set connection properties and global
variables from the command line. Again, if there are dozens of
connections, the command line will be quite long!

Does anyone have any suggestions? What is the limit to command-line
length in WIN 2000?

Simon Hayes
7/7/2003 7:42:50 PM
Comments inline.

Simon

[quoted text, click to view]

You don't have to use an INI file - you can use other sources, including a
database query, which is often the most flexible and powerful.

[quoted text, click to view]

You could store these in a database table, along with some key values such
as site code, package name etc. to identify which set of values are to be
used in which "environments".

[quoted text, click to view]

You can just pass the server name and database name of the "configuration
database" from the command line, then retrieve the rest of the values from
the parameters table, based on whatever criteria are most useful in your
situation.

[quoted text, click to view]

Probably better to pass the minimum number of values on the command line and
retrieve the rest from some other location. Using database tables makes
centralized management and logging much easier.

[quoted text, click to view]

No idea, but as you mentioned, the command line is quite limiting. If you
really had to do this, it would probably be easier to call the DTS package
and set the variables from VB, using some sort of config file (back to INI
files again), rather than cram everything onto the command line.

AddThis Social Bookmark Button