Searching of key work in stored procedures

  • I have got a scnerio that i have to search a key word in my all 426 stored procedures  ,There is a command so that i can find my that particular keyword in all the sps .

    Thanks

  • This will search the procedures in a database but will not find the text in encrypted procedures

    declare @keyword varchar(20)

    set @keyword = 'keyword'

    select distinct s.name 

    from sysobjects s

    inner join syscomments c

    on c.id = s.id

    and charindex(@keyword,c.text) > 0

    where s.type = 'P'

    Alternatively script all the procedures to separate files and use the DOS command FINDSTR to search the text files

     

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 2 posts - 1 through 1 (of 1 total)

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