Get a list of Databases which were not modified with in a date range - SQL server
can we get an output for list of databases which were not modified for last two months in a server and based on that we have to delete all of them.


Regardless of what you may find on the internet, the only way to be 100% sure is to run an audit/trace/etc. against the servers and inspect the traffic that each database is receiving as some system processes will update the databases and will need to be filtered out before continuing (which the audit/trace/etc. should be able to filter itself).

Possible Options:


SQL Audit
Server Side Trace
Extended Events


If you don't need to be absolutely 100% sure, then feel free to choose any of the other methods on the internet such as the index usage DMVs, pages in the buffer pool, last accessed date, etc.