August 17, 2005 at 11:33 am
Anyone have knowledge of a Stored procedure that lists all stored procedures on a server?
August 17, 2005 at 11:40 am
select * from sysobjects where xtype = 'P'...
should give you all stored procedures for a given database...and unless you have user defined procs created with dt...you could extend it to:
select * from sysobjects where xtype = 'P'
and name not like 'dt%'
order by name
**ASCII stupid question, get a stupid ANSI !!!**
August 17, 2005 at 11:42 am
Is there is a SP that automatically does this for all SP's on a Particular Server, (EveryDB). with out me having to make a cursor?
August 17, 2005 at 11:49 am
there's an undocumented sp_MSForEachDB that you should be able to use...if you search the forums you're guaranteed to find the script for it somewhere...
**ASCII stupid question, get a stupid ANSI !!!**
August 17, 2005 at 11:53 am
i cannot test this on my machine but see if this works...
exec sp_MSForEachDB "select * from sysobjects where xtype = 'P'
and name not like 'dt%'
order by name"
**ASCII stupid question, get a stupid ANSI !!!**
August 17, 2005 at 11:54 am
Seems to do what i needed. Thank you very much!!
August 17, 2005 at 11:55 am
Short version :
EXEC SP_MSFOREACHDB 'Select ''?'' as DbName, Name from ?.dbo.SysObjects where Status >= 0 and XType = ''P'' order By Name'
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply