Groups | Blog | Home
all groups > sql server dts > december 2006 >

sql server dts : Accessing DTS properties via TSQL


BLS
12/29/2006 12:25:36 PM
Can anyone tell me how to access DTS properties (such as global
variable values) via TSQL?

Examples would be nice.

Thanks
Allan Mitchell
12/29/2006 9:28:16 PM
Probably not in the way you would want but you need to look up the
sp_OA* family of stored procedures


--


Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com




[quoted text, click to view]
Simon Sabin
12/31/2006 10:45:36 PM
Hello BLS,

DTS doesn't run within TSQL. Are you trying to execute some TSQL from within
a DTS package and have the TSQL use some global variable.

If so you can set the SQL in your execute sql task from an activex script
component. In here you can build the TSQL with the value of the global variable.


Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons


[quoted text, click to view]

BLS
1/1/2007 1:09:53 PM

[quoted text, click to view]

What I would like to do is access a DTS global variable inside a TSQL
task. I'd like to set its value, etc, only not via activex but using
TSQL.
BLS
1/1/2007 5:21:13 PM

[quoted text, click to view]

Yes. Do you know the syntax for how to assign values to DTS Global
Variables in that way?
Allan Mitchell
1/1/2007 9:23:17 PM
Using the ExecuteSQL task you can assign values from a SQL Statement to
Global Variables.

Is this what you want?

--


Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com




[quoted text, click to view]
BLS
1/2/2007 3:17:02 PM

Thanks! I believe that is exactly what I was looking for.

Much appreciated.
Allan Mitchell
1/2/2007 10:47:44 PM
Have a look at this article

http://www.developmentnow.com/g/103_2004_6_0_0_396551/DTS-Problem-After-Move.htm

--


Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com




[quoted text, click to view]
AddThis Social Bookmark Button