Error 945 Database cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server error log for details

35.5k views Asked by At

While trying to access databases, logins, etc in SQL Server Management Studio 2008 R2, below error is always popping up. I browsed over google to find out a solution but those resolutions did not solved below issue. I have sufficient permissions and have enough disk space. When clicked on any entity in Object Explorer of SQL Management Studio the below exception appears.

enter image description here

4

There are 4 answers

0
Larry Smith On

You can try these options:

  • Add more hard drive space by removing unnecessary files or add the new hard drive.
  • Check the Autogrow
  • Check the database account permission
  • MDF and LDF shouldn't be marked as read-only on OS file system level

Good Luck!

0
Manikandan Appar On

Once you made the space, close your Management Studio and goto services.msc and restart the SQL Server () service, that will resolve your issue.

0
Machindra On

In my case, I have also received same error, and DB Size in Plesk is showing 0Bytes. After checking in SQL Server, I found that in-front of my database showing > (Recovery Pending) message just next to database.

In Plesk, I have used "Repair Database" option Forcefully, and after that my DB is showing exact DB Size = 100MB, where previously it was showing 0Bytes.

Hope it helps anyone, getting this error in Plesk hosting.

0
Olawale david On

In my case, the MDF file was deleted.

check the directory C:\Program Files\Microsoft SQL Server\MSSQL15.[sqlserver edittion]\MSSQL\DATA to see if the .mdf file is in place