Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Database is in Recovery Pending Status Expand / Collapse
Author
Message
Posted Thursday, July 24, 2014 3:16 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, November 10, 2014 4:46 AM
Points: 13, Visits: 226
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...
Post #1595829
Posted Thursday, July 24, 2014 8:22 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, December 19, 2014 8:31 AM
Points: 1,346, Visits: 2,658
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.



Sujeet Singh
Post #1595905
Posted Thursday, July 24, 2014 10:58 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 1:43 AM
Points: 40,617, Visits: 37,083
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 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1595964
Posted Thursday, July 24, 2014 11:00 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 1:43 AM
Points: 40,617, Visits: 37,083
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 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1595965
Posted Thursday, July 24, 2014 10:48 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, October 29, 2014 2:23 AM
Points: 45, Visits: 54
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
Post #1596083
Posted Thursday, July 24, 2014 10:56 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, November 10, 2014 4:46 AM
Points: 13, Visits: 226
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 :D
Post #1596086
Posted Friday, July 25, 2014 3:05 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 1:43 AM
Points: 40,617, Visits: 37,083
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 :D


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 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1596129
Posted Friday, July 25, 2014 3:32 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, December 19, 2014 8:31 AM
Points: 1,346, Visits: 2,658
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?




Sujeet Singh
Post #1596135
Posted Friday, July 25, 2014 3:53 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 1:43 AM
Points: 40,617, Visits: 37,083
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 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1596142
Posted Friday, July 25, 2014 4:04 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, December 19, 2014 8:31 AM
Points: 1,346, Visits: 2,658
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.



Sujeet Singh
Post #1596144
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse