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.
Once you made the space, close your Management Studio and goto services.msc and restart the SQL Server () service, that will resolve your issue.
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.
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!
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
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;
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)
© 2022 - 2024 — McMap. All rights reserved.