SQL Error 945: Database Cannot Be Opened Due To Inaccessible Files

Introduction

Let’s take a scenario to understand the "SQL Server error 945 database cannot be opened due to inaccessible files or insufficient memory or insufficient space on disk".

The Error 945 occurs when the SQL Server database is marked as ‘IsShutdown’. The error ‘database cannot be opened due to inaccessible files’ can also occurs when SQL database cannot be recovered due to some missing files or the backup which you are using is corrupted, or it may be that the database which you want to access is in suspect mode.

When database unable to open due to inaccessible files then it shows error something like this:

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

Fix Microsoft SQL Server Error Code 945

SQL database error 945 is a severe error condition that may threaten the database integrity, so it must be corrected as soon as possible. Some of the possible methods to fix “Database Cannot be Opened” error are given below.

  1. If possible add more hard drive space either by removing of unnecessary files from hard drive or add new hard drive with larger size.
  2. Check if the database is set to Autogrowth.
  3. Check if the account has enough permission to perform any operation.
  4. Make sure that MDF and LDF files are not marked as read only.

If the Database is Marked as Suspected

What if your database is in suspect mode and throwing error message like this:

SQL Error 926 severity 14
Database '%.*ls' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information.

SQL Server error 926 occurs when the attaching and detaching of an MDF file is not done perfectly and recovery process fails to bring the database in a consistent state. Improper shutdown of the database and malware attacks are also the responsible reasons for this error.

Fix Microsoft SQL server Error 926

Please go to my previously published blog “SQL Server Suspect Database Recovery Technique” to know how to fix the error 926 if the database is marked as suspect.

Conclusion

In this article, we have discussed about the SQL Server error 945 and 926 which occurs due to insufficient disk space or due to missing file requested by the user and know how to overcome form the error.

Previous
Next Post »

EmoticonEmoticon