Script a DTS Package?

  • Is there anyway to script a DTS Package to store it into Visual Source Safe?


    Kindest Regards,

  • You can save the package as either a structured stored file or as a Visual Basic file and then check it in to VSS.

    If you save it as a structure storage file (which has extension .DTS), all the formatting etc of the package is retained. It is a binary file - not sure how well VSS handles this.

  • ok. If I save it as a Sturctured Storage File. How do I then load back into SQL Server? Lets say for example someone deleted it and I need to recreate that DTS Package from a Structred Storage File.


    Kindest Regards,

  • In Enterprise Manager, right click on "Data Transformation Services" and click "open package...".

    Once you have opened your package, save as "SQL Server".

  • Ok thanks HappyCat59.


    Kindest Regards,

  • Additional question

    we have a series of DTS packages that we migrate through several environments (DEV, QA UAT, PROD). Each environmentr has it's own servers. When we migrate to the next level, after the install, we have to open up the package and manually key in the server names in the appropriate places. Mistakes have been made ocassionally resulting in loud gnashing of teeth and profuse bleeding. Is there any way to apply any type of script (SQL or otherwise) against the package so that these server names are not subject to fat fingers on the keyboard?

  • Dynamic configuration of DTS packages is pretty straightforward - try searching on google for DTS Package Configuration. One of the results I got is http://www.sqlis.com/post/Easy-Package-Configuration.aspx. This gives you exactly what you need. You may need to ensure that there is consistency within all of the packages wrt naming of connections to make your life easier. If the naming conventions are in place, you should be able to get away with a single config file (although you may need more than one).

    There are alternatives to this using a combination of the DTS configuration task and scripts but try the method in the link above first.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply