DTS Package to Migrate Stored Procedures and Functions Only

  • I have the following scenario where I need to move stored procedures and functions only from a Test Environment to Production:

    Dev and Test environments are located on the same server.

    I created a DTS package with a "Copy SQL Server Objects Task" in it and specified the Test Database as Source and Production Database as the Destination, selected objects (only functions and stored procedures) from the "Copy" tab. 

    The problem I am having is that even though I specifically do not select any table objects, the data in my tables in my Production Environment is being overwritten with data from my Test Envirnment ( I even tried deselecting the "copy data" check box and "include all dependent objects"..and get the same result.

    Anyone know how to solve this problem ?  I eventually just ended up scripting out my functions and stored procedures and executing the script on my Production Environment.

    Also as a side question..Is there any way to programatically select the objects I want to transfer using the "Copy SQL Server Objects Task" task ?

     

    TIA

     


    Mathew J Kulangara
    sqladventures.blogspot.com

  • Sounds like you are doing it correctly. I was able to transfer just stored procs and functions to a different database with the settings you mentioned.

    While in the DTS designer, save the package as a Visual Basic file. You can use that to see what your package is actually transfering by opening in VB or Notepad. That can get you started writing a program or script to select the objects you want to transfer.

    Aunt Kathi Data Platform MVP
    Author of Expert T-SQL Window Functions
    Simple-Talk Editor

Viewing 2 posts - 1 through 1 (of 1 total)

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