SQL 2008 R2 Query to List All Databases & Tables with Last Access Date and Time
Posted on 2013-06-11
My SQL knowledge is very limited, but I need a query to list all databases, the tables in each database, as well as the last access dates and times. This is for purposes to present which tables and databases are stale and no longer in use and can be disconnected (some were created temporarily for restore purposes, but need to verify which aren't the active ones)
I know enough to be able to paste whatever code you provide and will generate these results for me so that I can export them to an excel file to provide the user.