Monday, December 12, 2011

how to find table dependencies in sql server ?

Using syscomments

SELECT distinct so.name
FROM syscomments sc
INNER JOIN sysobjects so ON sc.id = so.id
WHERE charindex('table_name', text) > 0

This returns the following showing both proc,function and trigger

No comments:

Post a Comment