January 19, 2016 at 4:00 pm
GilaMonster (1/19/2016)
dm_sql_referenced_entities is 2008 and above. sys.sql_dependencies can be inaccurate, as procedures can be created before the tables they reference, if they are the dependency info won't be there. No good solution on SQL 2005 and under short of writing a T-SQL parser or dropping and recreating all procedures and then checking sys.sql_dependencies.
Good point. Would sp_refreshsqlmodule help here?
-- Gianluca Sartori
January 19, 2016 at 4:00 pm
Thank you for the information Gail
January 20, 2016 at 12:48 am
spaghettidba (1/19/2016)
GilaMonster (1/19/2016)
dm_sql_referenced_entities is 2008 and above. sys.sql_dependencies can be inaccurate, as procedures can be created before the tables they reference, if they are the dependency info won't be there. No good solution on SQL 2005 and under short of writing a T-SQL parser or dropping and recreating all procedures and then checking sys.sql_dependencies.Good point. Would sp_refreshsqlmodule help here?
I don't think so. That's for when a table has been changed, to update the metadata for objects that use the table. Worth testing.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply