SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Database is in Recovery Pending Status


Database is in Recovery Pending Status

Author
Message
Draconian
Draconian
SSC Rookie
SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)

Group: General Forum Members
Points: 33 Visits: 228
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...
Divine Flame
Divine Flame
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2297 Visits: 2816
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
GilaMonster
GilaMonster
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88066 Visits: 45277
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

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


GilaMonster
GilaMonster
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88066 Visits: 45277
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

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


Elliswhite
Elliswhite
SSC-Enthusiastic
SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)

Group: General Forum Members
Points: 161 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
Draconian
Draconian
SSC Rookie
SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)

Group: General Forum Members
Points: 33 Visits: 228
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 BigGrin
GilaMonster
GilaMonster
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88066 Visits: 45277
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 BigGrin


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

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


Divine Flame
Divine Flame
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2297 Visits: 2816
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
GilaMonster
GilaMonster
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88066 Visits: 45277
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

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


Divine Flame
Divine Flame
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2297 Visits: 2816
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search