sql server - Search inside objects (Sprocs, FUnctions, etc) -


i using sys.syscomments locate objects parameter exists. there method / process doing make easier find objects contain parameter or term?

thanks,

s

it preferable use definition column of sys.sql_modules instead. sys.syscomments text nvarchar(4000) can have issues truncation when definition splits across multiple rows.

select quotename(s.name)+'.'+quotename(o.name) object_name, o.type_desc     sys.sql_modules m         inner join sys.objects o              on m.object_id = o.object_id         inner join sys.schemas s              on o.schema_id = s.schema_id     m.definition '%yoursearchtext%' 

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -