473,836 Members | 1,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Way to view all stored procedures

I have MS SQL Server 7 and over the years have built quite a few
Stored Procedures. It would be extremely convenient if I could print out
or view ALL the text of ALL the stored proceudres at once. Is there a way i
can do this? Is tehre a way I can make a quick print out?
Jul 20 '05 #1
4 23752
I think this should do it...

SELECT name, type
FROM dbo.sysobjects
WHERE (type = 'P')

--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access
"Shinpei Kuga" <sn***@mit.ed u> wrote in message
news:2e******** *************** ***@posting.goo gle.com...
I have MS SQL Server 7 and over the years have built quite a few
Stored Procedures. It would be extremely convenient if I could print out
or view ALL the text of ALL the stored proceudres at once. Is there a way i can do this? Is tehre a way I can make a quick print out?

Jul 20 '05 #2
Shinpei Kuga (sn***@mit.edu) writes:
I have MS SQL Server 7 and over the years have built quite a few Stored
Procedures. It would be extremely convenient if I could print out or
view ALL the text of ALL the stored proceudres at once. Is there a way i
can do this? Is tehre a way I can make a quick print out?


In Enterprise Manager, find the database, select Stored Procedures.
Right-click and select All Tasks. In the submenu you find Generate
SQL Scripts.

Note: the instructions is from memory and for SQL2000, but I would guess
that the menus are the same in SQL7. In any case, SQL7 does have the
functionality.

--
Erland Sommarskog, SQL Server MVP, so****@algonet. se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #3
Whoops - misread your question,

Do what Erland recommends - generating sql scripts is a good way to do that.

--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access
"Jerry Boone" <je***@antech.b iz.killspam> wrote in message
news:3P******** **************@ newssvr11.news. prodigy.com...
I think this should do it...

SELECT name, type
FROM dbo.sysobjects
WHERE (type = 'P')

--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access
"Shinpei Kuga" <sn***@mit.ed u> wrote in message
news:2e******** *************** ***@posting.goo gle.com...
I have MS SQL Server 7 and over the years have built quite a few
Stored Procedures. It would be extremely convenient if I could print out
or view ALL the text of ALL the stored proceudres at once. Is there a
way i
can do this? Is tehre a way I can make a quick print out?


Jul 20 '05 #4
jpatti
1 New Member
The sample code provided simply provides a list of stored procedure names; it does not provide the code itself.

Here is how to print-out all your stored procedure code:

1. Connect via SQL Enterprise Manager as a user with administrative rights to the database and expand the database.
2. Click on "stored procedures" in the left pane and you will see in the right pane the stored procedures used for this application (excluding those with names dt_*, which are part of SQL server itself).
3. Right-click on any stored procedure in the right pane and from the resulting menu, choose All Task -> Generate SQL Script.
4. In the wizard that popsup, you are in the "General" tab. Click the "Show All" button, then put a check next to "All stored procedures".
5. Continuing with the popup, next click the "formatting " tab and uncheck all the checkboxes there except the "Generate the CREATE <object> command for each object" checkbox.
6. No need to make changes on the "Options" tab. So just click "OK" and then choose a path and filename for the stored procedure print-out.
7. Open the .sql file in a text editor to view or print. If you ignore all the lines that say:
SET QUOTED_IDENTIFI ER OFF
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFI ER OFF
GO
SET ANSI_NULLS ON
GO
..what remains is the text of all the stored procedures used in the database (excluding the dt* ones).

Please don't reply to me; I only joined the forum to answer this question. I Googled it, did not find a good answer, so experimented until I figured it out. Just wanted to pass the info along for the next person trying to figure this out.
Jul 12 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
8104
by: MD | last post by:
I am trying to create a dynamic SQL statement to create a view. I have a stored procedure, which based on the parameters passed calls different stored procedures. Each of this sub stored procedure creates a string of custom SQL statement and returns this string back to the main stored procedure. This SQL statements work fine on there own. The SQL returned from the sub stored procedure are returned fine. The datatype of the variable that...
10
5643
by: serge | last post by:
Using "SELECT * " is a bad practice even when using a VIEW instead of a table? I have some stored procedures that are identical with the difference of one statement in the WHERE clause. If I create a single View and specify also in this View the WHERE clause that is common in these stored procedures, I will have the new stored procecures changed to be like:
5
3489
by: Tim Marshall | last post by:
I was following the thread "Re: Access Treeview - Is it Safe Yet?" with interest and on reading the post describing Lauren Quantrell's SmartTree, I've run into something I don't understand: Stored Procedures. I thought stored pricedures were an Oracle/MS SQL Server thing and don't know how they work with Access Jet. I've looked at some of the help on stored procedures in A2003, but really don't understand what's going on. Can someone...
2
1852
by: Justin | last post by:
I am creating a web app for a client in VS.NET using ASP.NET with C#. I need to query three tables in a database using one parameter and display the results on the page. my question is should I use a Stored Procedure or view in SQL Server to get the data from multiple tables? What is the difference? and where can I find a some articles on write code to display the results of the SP or view? Thanks, Justin.
6
3582
by: Woody Splawn | last post by:
I am using SQL Server 2000 as a back-end to a VS.net Client/Server app. In a certain report I use a view as part of the query spec. For the view, at present, I am querying for all the records in the table. But I am wondering if there is a way, at runtime, to pass values to the View (like start date and end date) so that I don't have to return every record in the table of my view. If I can't pass a parameter, perhaps I can create a view,...
1
2166
by: mimo | last post by:
Hi, I'm trying to use Stored Procedures with a Grid View and everytime I try the update and the delete stored procedures fail. By the way I am doing this through the wizard. Is there a sample somewhere on how to do this? When I type in the statements directly it works, but I really need to be able to call stored procedures. And the stored procedures work fine in query analyzer.
104
10909
by: Beowulf | last post by:
I have the view below and if I use vwRouteReference as the rowsource for a combo box in an MS Access form or run "SELECT * FROM vwRouteReference" in SQL Query Analyzer, the rows don't come through sorted by Numb. Everything I've read on the web suggests that including the TOP directive should enable ORDERY BY in views. Does someone have an idea why the sorting is not working correctly for this particular view? thanks. CREATE VIEW...
6
5212
by: Greg P | last post by:
I am using VS2005 and have been learning a ton about databinding. I know that when you drag a view from the datasource window (creating a dataGridView) that an update method is not added to the table adaptor. I would like to update the b ase tables thorugh the view. How do i do this? FYI: I have some reserarch on how to handle updating multiple tables and making sure I don't break referential integrity, yet in this case I will not be...
1
1642
by: Jason Wilson | last post by:
I was looking to improve the performance of an ASP.NET application by creating the an indexed view that could be used instead of some of the root tables. What I didn't realize is that it would affect any future conenctions to the root tables. This of course crashed the application on any type of insert, update, or delte from the root tables.
0
9668
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10840
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10588
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7790
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6978
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5647
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5823
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4448
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.