Copy stored procedure between SQL Server 2005 databases

Can you tell me how to copy stored procedures (16155) from one database to another on the same SQL Server 2005?

    Requires Free Membership to View

On SQL Server 2005, you can choose to script the stored procedures. Right click the database, then Tasks → Generate Scripts. Step your way through the wizard until you get to the option to select object types and just choose Stored Procedures. On the last page of the wizard, you can choose to send the script to a new query window. You'll need to change the database name at the top of the script and execute it against the other database.

This was first published in December 2007

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.