Counter of Festivals

Ashok Blog for SQL Learners and Beginners and Experts

Tuesday 30 August 2016

Msg 945, Level 14, State 2, Line 1 Database 'AdventureWorks' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.

Msg 945, Level 14, State 2, Line 1
Database 'AdventureWorks' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details.


When you have seen above Error message kindly use following

Select * from Sys.master_files 

to check whether all mdf and ldf file location same or not

do remember sp_helpdb wont work

sp_helpdb 'databasename' would not work. it throws blank data

After that you can see file location is diff that is folder name is changed  so server cant access that file





 so we need to alter that new file location in database


then we need to restart service as see below



then we need to issue following statement to keep intact in log file

alter database AdventureWorks
set Recovery FULL

ALTER DATABASE AdventureWorks
set Recovery simple


now issue use databasename command

use databasename




Thats it

No comments:

Post a Comment