You are viewing a single comment's thread from:

RE: Can We Find Unused Tables In SQL Server?

in #sql2 years ago

Some tables may be unnecessary if their names include the suffixes "_TEMP," "__TEMP," and "__TEMP" (as long as this is what is being done for objects that are temporary in nature). All database tables can be retrieved using the sys.all_objects system table, and the type of the object can be restricted to 'U', and then the unwanted tables can be deleted.
If the owner of the system failed to rename the tables, we must devise a method for identifying the tables that are no longer in use.
If you'd like to know how many scans, searches, and updates have been performed on your database tables since the SQL Service was last restarted, use the sys.dm_db_index_usage_stats DMV in your system. SQL Server restarted, and any table that has not been used since then can be assumed to be an unused table in our query.
You can also use helpful SQL Tools to make the process easier.

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.029
BTC 67402.68
ETH 3481.04
USDT 1.00
SBD 2.65