Solved

How do I export all of my stored procedures at once?

Posted on 2013-01-16
5
359 Views
Last Modified: 2013-01-16
A client is creating a database that was created on my machine using the dbo.aspnet forms authentication tables and stored procedures. They currently have all the tables and the data in the tables how ever I've forgotten to get them the stored procedures that are created when .NET creates the aspnet tables and stored procedures that go with them. How can I quickly get all of the storprecedures to my client? Or do I have to copy and past them into a file, one at a time and send that? In other words, is that my only way of doing this?


Also, I noticed, in the "Stored Procedures" directory, that there is a sub set of stored procedures, in its own directory name "System Stored Procedures". Do I need those as well? And is there a particular order that the two groups of stored procedures need to be created in?
0
Comment
Question by:mikesExpertExchange
  • 2
  • 2
5 Comments
 
LVL 11

Assisted Solution

by:Simone B
Simone B earned 166 total points
ID: 38783398
Right click on the database where the procedures are located, and select Generate Scripts. This opens a wizard where you can select what you want scripted. Just select what you need from each prompt. Including select Stored Procedures from the Choose Object Types window. You can choose to create a script file, which you can then attach and send via email.

You shouldn't need the system sp's. They can be found in every SQL database.
0
 
LVL 26

Assisted Solution

by:Chris Luttrell
Chris Luttrell earned 334 total points
ID: 38783406
In Management Studio, from the View Menu at the top go to Object Exporer Details and drill down to the Stored Procedure folder.  Then select all those you want together and right click and select Script Stored Procedure As ==> Create To ==> File Scripting_SP_to_File
0
 
LVL 1

Author Comment

by:mikesExpertExchange
ID: 38783468
@CGLuttrell: How do you select multiple strored procs at once? Shift + Click and Ctrl + Click don't work. Or are you saying that I just need to put all of them, individually, one at a time, in the same file? If so, that works but, I was hoping to be able to do it all in one or two clicks.
0
 
LVL 26

Accepted Solution

by:
Chris Luttrell earned 334 total points
ID: 38783485
Object_Explorer_DetailsYou have to be in the Object Explorer Details window not the normal Object Explorer window that is the normal one on the left.  It will be bigger and where the querey window normally appears.
0
 
LVL 1

Author Closing Comment

by:mikesExpertExchange
ID: 38783650
Thank you.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question