list user sprocs that contain a certain word

  • Hi,

    Is there any way to achieve the above?

    eg, if i want to see all the user sprocs that contain the word "product", then at the minute I have to manually wade thru all my sprocs in EM.

    not too clever, eh?

    Is there a better way to do this thru sql or other?

    cheers,

    yogiberr

  • Something like this?

    http://qa.sqlservercentral.com/scripts/contributions/593.asp

    Frank

    http://www.insidesql.de

    http://www.familienzirkus.de

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • select * from syscomments where text like '%product%'

  • .......

    
    
    declare @criteria varchar(500)
    set @Criteria = 'product'

    select distinct name
    -- optional text excerpt:
    /*,replace('... ' + substring(text, (patindex('%' + @Criteria + '%',text) - 55), 155)
    + ' ...', @Criteria ,UPPER( @criteria )) as Excerpt*/
    from syscomments M
    inner join sysobjects O on O.Id = M.Id
    where text like '%' + @Criteria + '%'
    order by name
  • I did this recently .......

    I just used Enterprise Manager to generate a SQL script for all SPs, but put them all to one file big on your C drive, then use wordpad's search to look for your test ... very simple.

  • hello, thanks all , for taking the time.

    I appreciate it.

    yogiberr

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply