I have around 5 database and I am taking daily backup of all 5 database. I know that out of that 5 database 1 of the database is not in use and we are still taking the backup of that database.
My question is how we can check if the database is in used, like how can I verify when was the last time any Insert,update or delete happening in the database.
I think which I think of I can check the database size for 1 week and If the size of the database is same that means it is not in used. But I want to check when was the last time any DML command run.
Best Answer
This should give you the details about when was the last read/write performed on a specific database.
Be aware
sys.dm_db_index_usage_stats
does not return information about memory-optimized indexes. For information about memory-optimized index use, seesys.dm_db_xtp_index_stats
.