Copy stored procedures to another db (instance)

  • How can I copy all the stored procedures to another db (or another instance)?

    In SQL2000 you could select the database objects in the import/export wizard, but seems it's gone in SQL2005... 🙁

    Is there a way to bulk copy them?

    I know I could script them 1 by 1, but that's to much work 🙁

  • You do not need to script them 1 by 1. You can script them all in 1 go. Or inside of ssis you can create a package to copy objects.

    I am assuming that you do not have any of the procs in some sort of version control software that you can check out of.

    MCT
    MCITP Database Admin 2008
    MCITP Database Admin 2008
    MCITP Database Dev 2008
    www.jnrit.com.au/Blog.aspx

  • Rhox (6/28/2011)


    How can I copy all the stored procedures to another db (or another instance)?

    In SQL2000 you could select the database objects in the import/export wizard, but seems it's gone in SQL2005... 🙁

    Is there a way to bulk copy them?

    I know I could script them 1 by 1, but that's to much work 🙁

    Use the generate script option and select all the SP's and paste it another DB or server and run it.

    Muthukkumaran Kaliyamoorthy
    https://www.sqlserverblogforum.com/

  • or you could use the sql publisher wizard under

    C:\Program Files\Microsoft SQL Server\90\Tools\Publishing\1.4

    SqlPubWiz.exe

    its GUI which allows you to publish the procs directly to the target rather than script and then execute the script separately.

    Jayanth Kurup[/url]

  • Thanks for the help...

    I didn't found 'SqlPubWiz.exe', so I've done it with the Generate script... 🙂

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

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