How to search/FIND for a text in body of Procedure.

in sql •  5 years ago 

SELECT name
FROM sys.procedures
WHERE Object_definition(object_id) LIKE '%TextYouWantToSearch%'

select * from sys.syscomments c
inner join sys.objects o on c.id=o.object_id
inner join sys.schemas s on s.schema_id=o.schema_id
where text like '%dim%'

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!