Searching the MetaData of a SQL Server Database, Stored Procedure Text
This has been a favorite stored procedure of mine to search the text of my stored procedures for certain phrases... really helpful as the number of stored procs you have grows quite a bit:
--xps '%procedure%' --search for the word 'procedure' in all your stored procs
CREATE
proc [dbo].[xpS]
@sSystemObjectText nvarchar(1000)
as
select
distinct sysobjects.name
from
sysobjects inner join syscomments on
sysobjects.id=syscomments.id
where
syscomments.text like @sSystemObjectText
order
by name
Comments
- Anonymous
December 29, 2007
PingBack from http://geeklectures.info/2007/12/29/searching-the-metadata-of-a-sql-server-database-stored-procedure-text/