Copy SPs between databases

  • Setting: Sql 7

    I tried to use DTS to copy stored procs between databases. Generally, it didn't work well so I dumped the SPs to scripts on the source box and executed them on the destination box.

    How do you copy SPs between databases (possibly on different computers)?

    TIA,

    Bill

    tps of a

  • When I'm working on some of my own projects I typically script them using EM or QA so I can look them over before moving them. Since we maintain scripts in Visual SourceSafe for the objects, I can also grab them from there, and that's the procedure when we move from one environment to the next. It ensures consistency because the source is always the same.

    K. Brian Kelley

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/shop/product.asp?ProductID=NI-SQL1

    K. Brian Kelley
    @kbriankelley

  • I almost always generate the script via EM, occassionally I user QA, on the source server, and then connect to the target server via QA and the generated script.

    -------------------------

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • On my Transactional Replication pair I use a DTS ActiveX (DMO) package that wipes out the existing stored procedures in the target database, then copies all procedures (with permissions) from the source to the target. This is useful because it allows the developers to throw changes on the source (aka production) server and every evening - or on demand if there have been several changes - I can make sure the latest version of every procedure is sitting on the replica. The ActiveX script it at home.attbi.com/~bwunder if your interested.

    Bill Wunder

  • Cant disagree with using scripting, though under the hood I imagine DTS is doing the same.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

Viewing 5 posts - 1 through 4 (of 4 total)

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