Solved

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

Posted on 2013-01-16
5
357 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

911 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

17 Experts available now in Live!

Get 1:1 Help Now