Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Script all stored procedures in Management Studio 2005

In Enterprise Manager you could script all SPs in a database through the right click menu, is there a way to do it in Management Studio?

like image 543
Marshall Avatar asked Oct 06 '08 19:10

Marshall


People also ask

How do I get the script of all stored procedures in SQL Server?

Let's see the procedure to do that. Go to the Object Explorer window then click on something then right-click on your database then select Tasks then click on Generate Scripts as shown in the following. After clicking on Generate Scripts the popup is open as shown in the following and select Choose Objects.

How do I export all stored procedures?

Export Stored Procedure in SQL ServerIn the Object Explorer, right-click on your database. Select Tasks from the context menu that appears. Select the Generate Scripts command.


2 Answers

You can right click on the database and to go Tasks -> Generate Scripts...

This will allow you to script all or selected objects (schema, stored procedures, tables, users and views) with specific options.

like image 170
Brian Kim Avatar answered Sep 21 '22 21:09

Brian Kim


  1. Go to Microsoft SQL Server Management Studio
  2. Select the database
  3. Right click on selected database
  4. Select 'Tasks'
  5. Select 'Generate Scripts'
  6. Select 'Next'
  7. Select / tick 'Select specific database objects'
  8. Tick 'Stored Procedures'
  9. Select 'Next'
  10. Select the option where do you want to save the file
like image 21
Raj Avatar answered Sep 22 '22 21:09

Raj