Hello,
I have found nice solutions online. For instance this link
http://stackoverflow.com/questions/711394/how-do-you-find-the-last-time-a-database-was-accessed
Using this idea last statement in my script may look like following:
...
...
SELECT
DatabaseName = fsi.DatabaseName,
FileGroupName = fsi.FileGroupName,
LogicalName = RTRIM(fsi.LogicalName),
FileName =...