Forum Discussion
Space_Bert
Feb 16, 2022Copper Contributor
Preparing old SQL Servers for migration
Hi, I inherited two 2008R2 SQL Servers, and am facing thousands of tables, views, and stored procedures that have not been documented or cleaned up since the very beginning. As a first step, I am tr...
olafhelper
Feb 18, 2022Bronze Contributor
Space_Bert , not really. You can use the SSMS dependency viewer to see, where an object is used, e.g. a table in which view or procedure. But this can't tell you which table/view is used in which application or ad-hoc query.
You can rename tables/views/SP and wait, until one user/application complains about a missing object.
Olaf
- Space_BertFeb 18, 2022Copper Contributor
olafhelper thanks a lot. I feared as much. Would you happen to know if the absence of a table that is listed in the DMV "sys.tables" in the DMV "sys.dm_db_index_usage_stats" implies that the table has not been used? I know the usage stats are reset upon starting the instance.
Again, thanks a lot for your help!