July 24, 2014 at 3:16 am
Hi,
My Production database is in Recovery pending status. I checked and found due to Hard disk space it went into suspect mode.
My DBSize is around 70GB. I made around 25GB space.
I restarted the SQL Server but it didnt help it is still in recovery pending status.
Pl. help...
July 24, 2014 at 8:22 am
Draconian (7/24/2014)
Hi,My Production database is in Recovery pending status. I checked and found due to Hard disk space it went into suspect mode.
My DBSize is around 70GB. I made around 25GB space.
I restarted the SQL Server but it didnt help it is still in recovery pending status.
Pl. help...
Execute below given command and analyze the output:
EXECUTE sp_readerrorlog
You should see somthing like "Recovering the database ...." & along the line it will also tell you the % of recovery completed. Wait for it to complete. If enough space is available then it should come online fine.
Also, ensure that data & log files for the database are intatct & present at their location.
July 24, 2014 at 10:58 am
Divine Flame (7/24/2014)
You should see somthing like "Recovering the database ...." & along the line it will also tell you the % of recovery completed. Wait for it to complete. If enough space is available then it should come online fine.
That's RECOVERING, not RECOVERY PENDING. There will be no such messages in the log and the OP could wait forever for what good it will do. A DB that is RECOVERY PENDING will not automatically come online.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 24, 2014 at 11:00 am
Draconian (7/24/2014)
My Production database is in Recovery pending status. I checked and found due to Hard disk space it went into suspect mode.
Suspect or Recovery_Pending? They're two very different statuses. Query sys.databases and please see exactly what the status_desc column is for that database.
Open the error log. There will likely be several errors relating to that database. Please post every message relating to that database, whether you think it relevant or not.
Do you have backups of this database?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 24, 2014 at 10:48 pm
Insufficient disk space for storing abrupt SQL database may cause SQL database in stuck mode. Therefore you can switch the mode of the SQL database from Normal to Emergency. But in emergency mode you can read only for accessibility copy the database files and paste it in newly created database. You can remove this burden with the help of third party too also.
SSMS Expert
July 24, 2014 at 10:56 pm
GilaMonster (7/24/2014)
Draconian (7/24/2014)
My Production database is in Recovery pending status. I checked and found due to Hard disk space it went into suspect mode.Suspect or Recovery_Pending? They're two very different statuses. Query sys.databases and please see exactly what the status_desc column is for that database.
Open the error log. There will likely be several errors relating to that database. Please post every message relating to that database, whether you think it relevant or not.
Do you have backups of this database?
That was confusing. On the Database list it was showing Recovery Pendig. When I checked status it was in suspect mode.
SELECT DATABASEPROPERTYEX (N'<dbName>', N'STATUS');
I made enough space on server by moving other databases to different disk. I brought the db in emergency mode and then tried to make it online. and IT WORKED!!
ALTER DATABASE <dbName> SET EMERGENCY;
ALTER DATABASE <dbName> SET ONLINE;
So, I learnt a lesson. Always query database status and dont trust what enterprise manager shows by default along with the database name 😀
July 25, 2014 at 3:05 am
Draconian (7/24/2014)
That was confusing. On the Database list it was showing Recovery Pendig. When I checked status it was in suspect mode.SELECT DATABASEPROPERTYEX (N'<dbName>', N'STATUS');
I made enough space on server by moving other databases to different disk. I brought the db in emergency mode and then tried to make it online. and IT WORKED!!
ALTER DATABASE <dbName> SET EMERGENCY;
ALTER DATABASE <dbName> SET ONLINE;
So, I learnt a lesson. Always query database status and dont trust what enterprise manager shows by default along with the database name 😀
Lesson 2, never use DatabasePropertyEx to show a database's status, as it shows the statuses from SQL 2000 and before. Hence why I specifically asked about the status in sys.databases.
From your description of what you did, it was in the recovery_pending state. What you did would not have fixed a suspect database. Setting to emergency wasn't necessary, a simple set ofline, set online would have worked once space was freed up.
It's way too easy to do more damage by doing stuff randomly. Hence why I ask very specific things to be done bit by bit when a DB is damaged or unavailable.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 25, 2014 at 3:32 am
GilaMonster (7/24/2014)
Divine Flame (7/24/2014)
You should see somthing like "Recovering the database ...." & along the line it will also tell you the % of recovery completed. Wait for it to complete. If enough space is available then it should come online fine.That's RECOVERING, not RECOVERY PENDING. There will be no such messages in the log and the OP could wait forever for what good it will do. A DB that is RECOVERY PENDING will not automatically come online.
Yes. I got confused with Recovery_Pending as RECOVERING. Thanks Gail for clearing that one over there.
one more question out of curiosity:
You said:
GilaMonster (7/25/2014)
From your description of what you did, it was in the recovery_pending state. What you did would not have fixed a suspect database. Setting to emergency wasn't necessary, a simple set ofline, set online would have worked once space was freed up.
However, OP said in his first post that he has restarted the SQL Server instance after making the free space. Why didn't the database come online at that point?
July 25, 2014 at 3:53 am
Since he didn't post anything useful (error messages, status), no idea. Maybe he freed up space on the wrong drive, maybe there was a secondary problem....
Point is, a suspect database cannot be simply set online, it doesn't work.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 25, 2014 at 4:04 am
GilaMonster (7/25/2014)
Since he didn't post anything useful (error messages, status), no idea. Maybe he freed up space on the wrong drive, maybe there was a secondary problem....Point is, a suspect database cannot be simply set online, it doesn't work.
Okay, got it. Thanks.
January 23, 2015 at 7:13 am
Just for reference, I came across this issue with one of our databases. In my case it was caused by changing the logical and filename for the .mdf and .ldf files, then restarting and another time upgrading SQL.
...for recovery pending that is.
Running a checkdb resolved the issue.
--------------------------------------------
Laughing in the face of contention...
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply