开发者

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:

Getting the related views/functions/procedures after a column change?

step 2 :

Getting the related views/functions/procedures after a column change?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜