dbTalk Databases Forums  

dts and variable location for text file source

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


Discuss dts and variable location for text file source in the microsoft.public.sqlserver.dts forum.



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

Default dts and variable location for text file source - 11-11-2005 , 04:38 AM






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

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: dts and variable location for text file source - 11-11-2005 , 01:48 PM






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


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.