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

6

6

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

Hooghly answered 17/1, 2017 at 11:30 Comment(4)
Look at the msdb properties->Files>-Autogrowth/Maxsize to see if Enable Autogrowth is ticked.Unison
I further found that database 'msdb' has 'Recovery Pending' as message displayed just next to database. How do I perform this Recovery on msdb database?Hooghly
Do you have a backup of msdb?Unison
No. I don't have a backupHooghly
V
3

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

Variole answered 9/7, 2020 at 11:15 Comment(0)
E
2

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.

Eben answered 24/7, 2020 at 9:3 Comment(0)
M
1

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!

Mothering answered 18/1, 2017 at 4:33 Comment(0)
S
1

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

Springer answered 30/11, 2021 at 16:43 Comment(0)
T
1

This is the one solution for this recovery-pending type problem.

First, you check running queries:

SELECT name, state_desc FROM sys.databases WHERE state_desc ='RECOVERY_PENDING';

Then, you run this query:

ALTER DATABASE [YourDatabaseName] SET ONLINE;
Trull answered 29/4 at 12:27 Comment(0)
C
0

Also be sure that the local Windows account NT SERVICE\mssqlserver has Full Control access to the .mdf and .ldf (and any other files, e.g. .ndf, full-text catalog, etc)

Cerberus answered 1/5 at 1:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.