dbTalk Databases Forums  

Dynamic DTS Task Challenge

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


Discuss Dynamic DTS Task Challenge in the microsoft.public.sqlserver.dts forum.



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

Default Dynamic DTS Task Challenge - 05-17-2005 , 12:30 PM






I have a DTS Task that has the following:

* Dynamic Property
* SQL Task (Truncate a table in SQL)
* Connection1 (Input CSV file)
* Connection2 (Output SQL Server)

This tasks previously did not contain a Dynamic Property and, as you know,
the connection details and filename was hardcoded.

To remove the hardcoded values, I created a DTS.INI file that has
"Servername", "Username", "Password', and "Database" names, etc. under a
[DTS] section heading.

The Dynamic Property reads the DTS.INI file to obtain its values.

I have a SETUP program that will dynamically create the DTS.INI file at
installation and will install the DTS package within SQL Server.

My only opportunity now with the package is that the SQL Tasks has the
hardcoded name and SQL statement that includes the database name. Does
anyone know of an easy way to change this information?

Can I also use an INI file for this?

Any help would be appreciated.







Reply With Quote
  #2  
Old   
Helge C. Rutz
 
Posts: n/a

Default Re: Dynamic DTS Task Challenge - 05-17-2005 , 04:26 PM






Hi,

dm4714 wrote:
Quote:
My only opportunity now with the package is that the SQL Tasks has the
hardcoded name and SQL statement that includes the database name.
Does anyone know of an easy way to change this information?

Can I also use an INI file for this?
e.g. you can read the name from ini file and assign it to a global variable.
Then use an activeX task to replace placeholders in the sql statements with this database name.

Helge


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

Default Re: Dynamic DTS Task Challenge - 05-17-2005 , 06:14 PM



In message <3ev5rkF54db3U1 (AT) individual (DOT) net>, Helge C. Rutz
<news050424 (AT) nurfuerspam (DOT) de> writes
Quote:
Hi,

dm4714 wrote:
My only opportunity now with the package is that the SQL Tasks has the
hardcoded name and SQL statement that includes the database name.
Does anyone know of an easy way to change this information?
Can I also use an INI file for this?
e.g. you can read the name from ini file and assign it to a global variable.
Then use an activeX task to replace placeholders in the sql statements
with this database name.

Helge

This may help-

Global Variables and SQL statements in DTS
(http://www.sqldts.com/default.aspx?205)

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #4  
Old   
Rodney Mullins
 
Posts: n/a

Default RE: Dynamic DTS Task Challenge - 05-19-2005 , 06:45 PM



I would also take a look at the best practice document put out by
Trey Johnson and Mark Chaffin
http://msdn.microsoft.com/library/de...tbpwithdts.asp
This document was written for SQL Server 2K. I'm sure there will be a new
doc when Yukon is released with Integration Services.

"dm4714" wrote:

Quote:
I have a DTS Task that has the following:

* Dynamic Property
* SQL Task (Truncate a table in SQL)
* Connection1 (Input CSV file)
* Connection2 (Output SQL Server)

This tasks previously did not contain a Dynamic Property and, as you know,
the connection details and filename was hardcoded.

To remove the hardcoded values, I created a DTS.INI file that has
"Servername", "Username", "Password', and "Database" names, etc. under a
[DTS] section heading.

The Dynamic Property reads the DTS.INI file to obtain its values.

I have a SETUP program that will dynamically create the DTS.INI file at
installation and will install the DTS package within SQL Server.

My only opportunity now with the package is that the SQL Tasks has the
hardcoded name and SQL statement that includes the database name. Does
anyone know of an easy way to change this information?

Can I also use an INI file for this?

Any help would be appreciated.








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.