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

    By submitting your registration information to SearchSQLServer.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchSQLServer.com is governed by our Terms of Use. You may contact us at [email protected].

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.