Getting the related views/functions/procedures after a column change?
I changed the name of a column in a table. Is there a nice script which gets me all开发者_StackOverflow社区 affected views/functions/procedures? Should run on SQL Server 2008.
Thanks :)
check this post help you to find out : http://pranayamr.blogspot.com/2009/10/query-to-seaarch-out-table-and-sps-and.html
select
so.name,
sc.text
from
sysobjects so
inner join syscomments sc on so.id = sc.id
where
sc.text like '%ROLES%'-- name of the table
and sc.text like '%select%'--found procedure where select * from table name used
also check this : http://www.codeproject.com/Tips/61424/Find-Sp-from-database-which-is-related-to-using-ta.aspx
step 1:
step 2 :
精彩评论