January 30, 2009 at 12:24 am
hi all,
i wanna to see all dependent objects of a table
such as tables(with foreign key references),views,sp,udf,triggers
regards
Durgesh J
January 30, 2009 at 12:40 am
Very easy: right click on the table and click View Dependencies and you will see all other objects related to that table!
You can see the results in attachment!
😎
January 30, 2009 at 12:47 am
And if you want to use T-SQL command then use sql_dependencies
SELECTTOP 10 * From sys.sql_dependencies
WHERE [OBJECT_ID]= OBJECT_ID(N'ObjectName')
January 30, 2009 at 1:27 am
sysdepends is not always accurate. check out this topic.
http://www.sqlservercentral.com/Forums/Topic571247-338-1.aspx. Although this relates to SQL 2005 it applies to SQL 2000 as well.
"Keep Trying"
January 30, 2009 at 2:26 am
January 30, 2009 at 3:07 am
Dugi (1/30/2009)
Yea this is true!I cannot see any results from Hari's T-SQL, everything is empty! 😛
Keep Smiling...
Anyway, This should work:
EXEC sp_depends @objname = N'TableName'
January 30, 2009 at 3:21 am
Hari.Sharma (1/30/2009)
Keep Smiling...
Anyway, This should work:
EXEC sp_depends @objname = N'TableName'
Now is Ok! :w00t: thnx for the sp info!
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply