Database ‘db’ cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
Here is Solution/Fix/workaround of this problem.
1. check the DB status, most of the time , it will return 1
2. Change the database to offline to clear the db status
alter database dbname set offline
3. Now change the database to online, at this step log file and data files will be verified by sql server
alter database dbname set online