dbTalk Databases Forums  

Pass connection parameter to DTS

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


Discuss Pass connection parameter to DTS in the microsoft.public.sqlserver.dts forum.



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

Default Pass connection parameter to DTS - 01-24-2006 , 09:25 AM






Using SQL Server 2000, I have a DTS job that imports data from a text file
that uses 2 connections and a transform data task. Obiviously the first
connection is the text file and the other is the SQL Server database. The
problem is that the text file will not always be in the same directory and so
I want to pass in the directory location to the DTS job so that it knows
where to grab the text file. Does anybody have any good examples or links or
how to do this?

Thanks

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

Default Re: Pass connection parameter to DTS - 01-24-2006 , 02:18 PM






blue_nirvana wrote:
Quote:
Using SQL Server 2000, I have a DTS job that imports data from a text file
that uses 2 connections and a transform data task. Obiviously the first
connection is the text file and the other is the SQL Server database. The
problem is that the text file will not always be in the same directory and so
I want to pass in the directory location to the DTS job so that it knows
where to grab the text file. Does anybody have any good examples or links or
how to do this?

Thanks

Look up the Dynamic Properties Task, Global Variables in Books Online.

Also look up the /A parameter for DTSRUN.


Some articles on connections, including managing them-

Connections
(http://www.sqldts.com/default.aspx?101)

--
Darren
http://www.sqldts.com
http://www.sqlis.com


Reply With Quote
  #3  
Old   
blue_nirvana
 
Posts: n/a

Default Re: Pass connection parameter to DTS - 01-24-2006 , 03:11 PM



Thanks Darren, but I just decided to create and execute the DTS job in
VB.NET. That way it is easy for me to control the datasource for that
connection. Also, I don't have to worry about passing a parameter. It
surprising works really well and ran very quickely.

If there are any concerns that I should know about doing it that way, please
let me know.

Thanks again

"Darren Green" wrote:

Quote:
blue_nirvana wrote:
Using SQL Server 2000, I have a DTS job that imports data from a text file
that uses 2 connections and a transform data task. Obiviously the first
connection is the text file and the other is the SQL Server database. The
problem is that the text file will not always be in the same directory and so
I want to pass in the directory location to the DTS job so that it knows
where to grab the text file. Does anybody have any good examples or links or
how to do this?

Thanks


Look up the Dynamic Properties Task, Global Variables in Books Online.

Also look up the /A parameter for DTSRUN.


Some articles on connections, including managing them-

Connections
(http://www.sqldts.com/default.aspx?101)

--
Darren
http://www.sqldts.com
http://www.sqlis.com


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

Default Re: Pass connection parameter to DTS - 01-26-2006 , 04:56 PM



blue_nirvana wrote:
Quote:
Thanks Darren, but I just decided to create and execute the DTS job in
VB.NET. That way it is easy for me to control the datasource for that
connection. Also, I don't have to worry about passing a parameter. It
surprising works really well and ran very quickely.

If there are any concerns that I should know about doing it that way, please
let me know.

Just be aware that the package runs on the same machine as the VB.Net
app, and under tech security context of the user running the
application. Jobs are often used to help abstract as they use the SQL
Server Agent service account, or a proxy account, and execute on the server.


--
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.