Solved

How can I create a Stored Procedure to list all Stored Procedures?

Posted on 2001-06-06
4
272 Views
Last Modified: 2012-05-04
How can I create a Stored Procedure to list all Stored Procedures in Date Order?

and another for Triggers?

and for Databases?


Thanks for you help...

I know this is simple for you dba's.
0
Comment
Question by:nathans
  • 3
4 Comments
 
LVL 6

Expert Comment

by:acampoma
ID: 6160420


select * from sysobjects where xtype='P' order by crdate
select * from sysobjects where xtype='TR' order by crdate
select * from master..sysdatabases order by crdate
0
 
LVL 6

Accepted Solution

by:
acampoma earned 50 total points
ID: 6160465
SET QUOTED_IDENTIFIER  OFF    SET ANSI_NULLS  OFF
GO

if exists (select * from sysobjects where id = object_id(N'[dbo].[up_Test]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[up_Test]
GO

create proc dbo.up_Test

AS
select * from sysobjects where xtype='P' order by crdate
select * from sysobjects where xtype='TR' order by crdate
select * from master..sysdatabases order by crdate
GO
SET QUOTED_IDENTIFIER  OFF    SET ANSI_NULLS  ON
GO
0
 
LVL 5

Author Comment

by:nathans
ID: 6160560
Thanks... Is there a way to not show System SP's only User ones?
0
 
LVL 6

Expert Comment

by:acampoma
ID: 6160586
where status=0 or category=0
I'm not sure what these fields mean. I just noticed that they are both set to 0 for all my user stored procs.
good luck
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

726 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