A query abaixo procura um determinado texto em procedures, view e functions da database em que se está rodando.
select distinct B.name ,
case type when ‘P’ then ‘Stored procedure’
when ‘FN’ then ‘Function’
when ‘TF’ then ‘Function’
when ‘TR’ then ‘Trigger’
when ‘V’ then ‘View’
end
from syscomments A (nolock)
join sysobjects B (nolock) on A.Id = B.Id
where A.text like ‘%TEXTO%’
Espero ter contribuído.
Fabrício França Lima
Compartilhe: