Problem solve Get help with specific problems with your technologies, process and projects.

Copy stored procedure between SQL Server 2005 databases

Copying stored procedures between databases on the same SQL Server 2005 can be done through scripting the stored procedures with this method.

Can you tell me how to copy stored procedures (16155) from one database to another on the same SQL Server 2005?
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 last published in December 2007

Dig Deeper on Microsoft SQL Server 2005

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.