Question

  Asked: Apr 3 2008   7:55 PM GMT
  Asked by: SQL Server Ask the Experts


How can I take a backup of a SQL Server stored procedure only?


SQL Server backup, Stored procedures

How can I take a backup of a SQL Server stored procedure only?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



I recommend that you use Management Studio for SQL 2005 and drill to the database you want the stored procedures from and right click the database name. From the Task menu option select generate scripts to launch the wizard.
Click next. Make sure the database you want is selected and click next and next again.
You should be on the Choose Object Types page and here just select Stored Procedures. After clicking next you are on the Choose Stored Procedures page and now you can select the procedures that you want. Click Finish to begin the process and when it finishes you will have a new query windows with a create script that you can save.

You can also navigate to the Database > Programming > Storage Procedures, and in the object explorer details page, select all the procedures right click and select "Script Stored Procedure As" > Create To > New Query Window (or File if you'd like).
  • AddThis Social Bookmark Button

Browse more Questions and Answers on SQL Server and Database.

Looking for relevant SQL Server Whitepapers? Visit the SearchSQLServer.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Mrdenny  |   Apr 4 2008  6:36PM GMT

Check out my SQL Server blog “SQL Server with Mr Denny” for more SQL Server information.