I opened my SQL Server Database application to access a specific database but I was unsuccessful at establishing a connection with it. When I looked at the status of the database from the Folder view I saw that it was marked as Recovery Pending. Is there a logical explanation for this condition to occur in my database?
Hey, nI tried the manual solution you mentioned about and it became too complex for me to implement properly. Is there a simpler alternative which won't take up too much of my time and can be applied easily?
Yes, in such a case I would advise you to make use of a third party Tool such as SQL Repair Tool to effectively recover SQL server database from recovery Pending Mode and solve all of your issues within a few clicks. nnYou can find out more info about this software here: http://www. repair-sql. net/
Thanks for suggesting this tool, mate! nIt worked excellently to remove the Recovery Pending status from my SQL Server database.
How do I find out why the database went into Recovery Pending before I change anything?
Read the SQL Server error log first. Recovery Pending means the server knows that recovery must happen, but something blocks it. The common causes are a missing or locked data or log file, a service account without rights on the folder and a full disk.
Follow these steps:
1. Execute SELECT name, state_desc FROM sys.databases to confirm the state.
2. Execute SELECT physical_name FROM sys.master_files WHERE database_id = DB_ID('YourDatabase') and check that every file exists.
3. Check the free space on the drives and the permissions of the SQL Server service account.
4. Fix the cause, then execute ALTER DATABASE [YourDatabase] SET ONLINE.
If the log file is lost, restore from backup first. A repair with CHECKDB is a last resort because it can delete data.
The disk had no free space. Freed space and set the database online. Does it need a check?
Yes. Execute DBCC CHECKDB on the database after it comes online, then take a full backup. Set an alert for low disk space on the data and log drives, so the server does not stop writing again.
CHECKDB came back clean. Thanks.