Quantcast
Channel: SQL Server Manageability forum
Viewing all articles
Browse latest Browse all 1519

Databases in Recovery Pending state

$
0
0

Dear all,

Need your expertise to understand bit more. 

Yesterday i came across databases in "Recovery Pending" state problem.

Followed too many recommendations form Google but to no avail.

e.g. http://dbamohsin.wordpress.com/2012/01/23/cannot-detach-a-suspect-or-recovery-pending-database/

Plucked some leafs from Paul Randal's articles as well http://www.sqlskills.com/blogs/paul/post/Search-Engine-QA-4-Using-EMERGENCY-mode-to-access-a-RECOVERY-PENDING-or-SUSPECT-database.aspx

But none of them could fixed my problem. 

What i did:

I installed 2008 r2 on a machine (DEV) which already had 2008; yea instance name was different.

Had to restart the server so i did (yea, i gave all developers enough time but due to some reasons databases were in recovery pending mode).

After restart, some databases (not all) were in recovery pending state. Above links provided enough stuff to recover them but didnt work. For instance after setting database in Emergency mode, it stayed there for ages telling something like "Database is being recovered, wait until recovery is finished".

How i fixed it:

I attached them onto the newly created 2008 r2 instance. Made them offline (on old instance) in case there is any access conflict. Didnt get any error, like files are in use or something,  while attaching them (which raised an eyebrow).

Couple of things i noticed after new instance's installation:

While trying to reattach database on same old instance, I wasn't able to see the .mdf and .ldf files form there respective drives. But i was able to see from the new instance.WHY?

Both sql server services (old and new) were using same service account. When i gave service account enough ntfs permissions on the drive i was able to see all .mdf and .ldf files.

Questions are:

1) Why it wasnt the case before? Important to note here: service accounts were local admins on the server.(I think i am answering myself here...would love to get more insight on it).

2) Is it normal that i just have 2008r2 tools in Start>>Program. e.g. there is just 2008 r2 management studio not 2008 one etc.

Dont want to let this happen in production environment (i will have backups though), so is there any approach you guys are using to avoid it.


I hope i made myself clear here, or let me know.

Thanks in advance for any help.


Dinkar Chalotra



Viewing all articles
Browse latest Browse all 1519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>