How to check object dependency? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

How to check object dependency?

Hi all,
How can we find the dependency of a tables in a database? Is SP_DEPENDS TableName tells everything about the dependencies of that table or something else need to be checked before droping the table? Your response will be really appreciated. Thanks
Dan
check this:
http://www.sql-server-performance.com/forum/topic.asp?TOPIC_ID=12400
Select text from Master..Syscomments where text like ‘%tableName%’
will point to the objects referring to that table Madhivanan Failing to plan is Planning to fail
Thanks everyone for the response. Now I know why sp_depends does not show dependencies in some tables even though they are referenced from SP as join or some other conditions. The link that ranjitjain privided was really helpful. To make this more clear, we have a legacy system which consists of many tables and some of those tables look very old(I believe, they were never used for more than 5 years). So I need to drop those tables to free up some space and also drop the SPs that are referencing these tables. Which is not an easy task, I assume. Any help to make decision even if we can free up 50% disk space would be helpful. Thanks Dan
]]>