Q

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 first published in December 2007

Dig deeper on Microsoft SQL Server 2005

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

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.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close