Solved

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

Posted on 2013-01-16
5
356 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
Comment Utility
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
Comment Utility
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
Comment Utility
@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
Comment Utility
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
Comment Utility
Thank you.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

763 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now