473,396 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 23730
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.edu> wrote in message
news:2e**************************@posting.google.c om...
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.biz.killspam> wrote in message
news:3P**********************@newssvr11.news.prodi gy.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.edu> wrote in message
news:2e**************************@posting.google.c om...
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
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_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER 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
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...
10
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...
5
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...
2
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...
6
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...
1
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...
104
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...
6
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...
1
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.