Enhanced the T-SQL Script by adding last_user_scan, last_user_seek and last_user_lookup and compared the values against each other to get the most recent access to the very table.
Today i was asked if some of the databases on a specific instance were in use or not.
As this is an interesting question that could be easily answered by the SQL Server DMVs i wrote a little script to answer this question.
It creates a temporary table with five colummns named DatabaseName, TableName, IndexType, LastTouch and ActualDate (this is just for comparison).
It then executes sp_MSforeachdb and inserts a record for each database within the instance except for the system databases.
It then tells us which table was recently used and when.