Preparing old SQL Servers for migration

Copper Contributor

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 trying to figure out a way to identify unused objects. I have already gone through several rounds with the DMVs using several approaches discussed in different forums. 

My question is: Does anyone know an easy to deploy a solution that would allow me to skip the fiddling with SQL? Most of the common monitoring tools seem to focus on performance only.

Any help would be highly appreciated.

Best regards,

Albert Fabritius

2 Replies

@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

@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!