How to fix Recovery Pending State in SQL Server Database?

Execute the following set of queries:

ALTER DATABASE [DBName] SET EMERGENCY;
GO

ALTER DATABASE [DBName] set single_user
GO

DBCC CHECKDB ([DBName], REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS;
GO 

ALTER DATABASE [DBName] set multi_user
GO

For more info: https://www.stellarinfo.com/blog/fix-sql-database-recovery-pending-state-issue/


In our case it was caused by the disk drive running out of space. We deleted some junk to free space, then fixed the "Recovery Pending" by stopping and restarting the SQL Server Service.


When your Database .mdf file name is renamed, this issue is occurred. To solve:

Restart SQL EXPRESS in Services, Pending issue is solved.

Tags:

Sql Server