Calling a DTS standard task/custom task from a T-SQL Stored procedure

Calling a DTS standard task/custom task from a T-SQL Stored procedure

Post by Belin » Wed, 29 Jan 2003 21:05:12



Is it possible to call a DTS standard task or a custom task from a
T-SQL stored procedure as a OLE stored procedure. If so can you please
point me to some sample of calling a DTS task from a OLE stored proc.
I am not keen on running a package from T-SQL which I can imagine can
be done from xp_commandshell calling DTSrun. I am wondering is it
possible to call just a DTS task from OLE stored proc.

Thanks
Belinda

 
 
 

Calling a DTS standard task/custom task from a T-SQL Stored procedure

Post by Darren Gree » Thu, 30 Jan 2003 02:09:01




Quote:>Is it possible to call a DTS standard task or a custom task from a
>T-SQL stored procedure as a OLE stored procedure. If so can you please
>point me to some sample of calling a DTS task from a OLE stored proc.
>I am not keen on running a package from T-SQL which I can imagine can
>be done from xp_commandshell calling DTSrun. I am wondering is it
>possible to call just a DTS task from OLE stored proc.

>Thanks
>Belinda

You can call a package from OLE, but tasks cannot be used on their own.
You could build the entire package dynamically in memory through OLE
calls, but it would be messy to code. It only needs to be a simple
package with a single step to host a single task task. Set task
properties etc then execute the package.

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