dbTalk Databases Forums  

Adding DTS via script

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


Discuss Adding DTS via script in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sheldon W.
 
Posts: n/a

Default Adding DTS via script - 11-09-2004 , 09:40 AM






I am trying to automate the rollout of new objects in my production
environment in such a way in that a DBA does not have to be on hand to add
the objects to the database. I think I have everything covered with the
exception of DTS packages. Is there a way to add these files to the sql
server using some form of scripting?

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

Default Re: Adding DTS via script - 11-09-2004 , 10:46 AM






There are several methods available-

Use VBScript/VB or any other COM compliant language to build the entire
package and save to file or SQL server.
You could also do this in T-SQL via the OLE stored procedures, but it would
be a lot more work.

If the package is built then you can save it between servers manually, or
automate this. You can also copy to and from files.

I often copy packages between two servers, e.g.

Transferring DTS Packages
(http://www.sqldts.com/default.aspx?204)

If you want a file stage then this can also be done, similar to above.

The key to most automated methods is that the sysdtspackages table in msdb
holds the package data, and you can hack it directly.

I use osql in batch files for most automated builds, so one option would be
to prepare the dts data using bcp out to a file. Then use bcp in to put it
into the new server in the batch file with the regular osql calls.
Plenty of options but if you are still unclear, can you be a bit more
specific about what your source and destination storage locations are and
what if any steps you need in between.


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


"Sheldon W." <Sheldon W. (AT) discussions (DOT) microsoft.com> wrote

Quote:
I am trying to automate the rollout of new objects in my production
environment in such a way in that a DBA does not have to be on hand to add
the objects to the database. I think I have everything covered with the
exception of DTS packages. Is there a way to add these files to the sql
server using some form of scripting?



Reply With Quote
  #3  
Old   
Sheldon W.
 
Posts: n/a

Default Re: Adding DTS via script - 11-10-2004 , 10:09 AM



As far as the DTS packages go, my source would be the structured storage file
and the destination would be the sql server I wanted to add it to.

The intention is to eliminate the need to open Enterprise Manager and add
the dts package manually. My .cmd batch file contains a listing of all the
objects I am deploying with osql commands executing my various sql scripts
and all I am hoping for is a method that I can call from this batch to add
the packages to the servers I designate.

"Darren Green" wrote:

Quote:
There are several methods available-

Use VBScript/VB or any other COM compliant language to build the entire
package and save to file or SQL server.
You could also do this in T-SQL via the OLE stored procedures, but it would
be a lot more work.

If the package is built then you can save it between servers manually, or
automate this. You can also copy to and from files.

I often copy packages between two servers, e.g.

Transferring DTS Packages
(http://www.sqldts.com/default.aspx?204)

If you want a file stage then this can also be done, similar to above.

The key to most automated methods is that the sysdtspackages table in msdb
holds the package data, and you can hack it directly.

I use osql in batch files for most automated builds, so one option would be
to prepare the dts data using bcp out to a file. Then use bcp in to put it
into the new server in the batch file with the regular osql calls.
Plenty of options but if you are still unclear, can you be a bit more
specific about what your source and destination storage locations are and
what if any steps you need in between.


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


"Sheldon W." <Sheldon W. (AT) discussions (DOT) microsoft.com> wrote in message
news:6B884A08-258C-4451-9494-04BC7EEC3FF2 (AT) microsoft (DOT) com...
I am trying to automate the rollout of new objects in my production
environment in such a way in that a DBA does not have to be on hand to add
the objects to the database. I think I have everything covered with the
exception of DTS packages. Is there a way to add these files to the sql
server using some form of scripting?




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

Default Re: Adding DTS via script - 11-14-2004 , 04:11 PM



In message <A5DAB632-E2D6-4D59-A0C4-0E7BA0E69447 (AT) microsoft (DOT) com>, Sheldon
W. <SheldonW (AT) discussions (DOT) microsoft.com> writes
Quote:
As far as the DTS packages go, my source would be the structured storage file
and the destination would be the sql server I wanted to add it to.

The intention is to eliminate the need to open Enterprise Manager and add
the dts package manually. My .cmd batch file contains a listing of all the
objects I am deploying with osql commands executing my various sql scripts
and all I am hoping for is a method that I can call from this batch to add
the packages to the servers I designate.

There are no tools in SQL that will do this, but you could write some
VBScript for example. The DTSBackup 2000 tool on my site would also do
it, or you could even write your own, but either way, you will need to
ship an extra execute able/script file to do the work.

Perhaps a similar way would be to load the package into SQL sever (msdb)
first, then export via bcp. The bcp output could then be shipped with
the scripts and easily loaded into the destination from your batch file
without the need for any extra executable code.


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