Sunday, February 19, 2012

create DTS programmly

is it possible to create DTS programmly and is there a real file for each
DTS in my SQL SERVER?
Regards,
OfirDTS has a COM API so you can create DTS packages programatically using
VB for example. If you open an existing package in the Designer you can
select Package / Save As to save it as VB code that you can then modify
yourself if you like. You can also save a package as a Striuctured
Storage file (.DTS)
David Portas
SQL Server MVP
--|||and how do i run this vb file?
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1117033002.025025.117300@.f14g2000cwb.googlegroups.com...
> DTS has a COM API so you can create DTS packages programatically using
> VB for example. If you open an existing package in the Designer you can
> select Package / Save As to save it as VB code that you can then modify
> yourself if you like. You can also save a package as a Striuctured
> Storage file (.DTS)
> --
> David Portas
> SQL Server MVP
> --
>|||You would first have to compile the file to an executable using
VisualBasic / VisualStudio - you said you wanted to do it
programmatically so I assumed you meant you wanted to create an
executable.
Maybe you were instead looking for a script to create DTS packages from
DOS / Windows / TSQL without compiling any code? I'm not sure that's
possible. Perhaps it's possible in VB script - I haven't tried that
myself.
What you can do is save the DTS file and then copy it to where you want
it and *execute* it from DOS using the DTSTRUN utility. Look up DTSRUN
in Books Online.
David Portas
SQL Server MVP
--|||Also checkout www.sqldts.com. It is an excellent site packed with all the
relevant information on DTS including its programming considerations.
Anith

No comments:

Post a Comment