?
Solved

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

Posted on 2001-06-06
4
Medium Priority
?
283 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 200 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

752 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