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


Database in Recovery Pending State


Database in Recovery Pending State

Author
Message
Sanz
Sanz
Right there with Babe
Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)

Group: General Forum Members
Points: 727 Visits: 991
One of my databases is in Recovery pending state. I tried to run an Alter command on the database to set it in Online state but it throws the following error.

Msg 5120, Level 16, State 101, Line 1
Unable to open the physical file "G:\Data\MSSQL\Database.mdf". Operating system error 3: "3(The system cannot find the path specified.)".
File activation failure. The physical file name "G:\Data\MSSQL\Data\Database_log.ldf" may be incorrect.
Msg 945, Level 14, State 2, Line 1
Database 'Database' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
Msg 5069, Level 16, State 1, Line 1

Thanx in advance for any help !

Sanz
maechismo_8514
maechismo_8514
SSCarpal Tunnel
SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)

Group: General Forum Members
Points: 4308 Visits: 2228
santhosh (6/8/2009)
One of my databases is in Recovery pending state. I tried to run an Alter command on the database to set it in Online state but it throws the following error.

Msg 5120, Level 16, State 101, Line 1
Unable to open the physical file "G:\Data\MSSQL\Database.mdf". Operating system error 3: "3(The system cannot find the path specified.)".
File activation failure. The physical file name "G:\Data\MSSQL\Data\Database_log.ldf" may be incorrect.
Msg 945, Level 14, State 2, Line 1
Database 'Database' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
Msg 5069, Level 16, State 1, Line 1

Thanx in advance for any help !


Yes, the server is recovering the database. Was there any sudden shut down of the SQL Server? Just wait till it comes back online again.

What does your error logs say?
GilaMonster
GilaMonster
SSC Guru
SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)

Group: General Forum Members
Points: 229726 Visits: 46344
Recovery pending means that for some reason SQL cannot run restart recovery on the database. Usually this is because the log is missing or corrupt.

"G:\Data\MSSQL\Database.mdf".
"G:\Data\MSSQL\Data\Database_log.ldf"


Do these files exist? Is the drive online and available? If so, try stopping and restarting the SQL service as it may be that SQL came up before the drive was available. That would have caused this error.

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 (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)

Group: General Forum Members
Points: 229726 Visits: 46344
Krishna Potlakayala (6/8/2009)
Yes, the server is recovering the database. Was there any sudden shut down of the SQL Server? Just wait till it comes back online again.


That's true of the state RECOVERING. Recovery Pending means that recovery cannot be started. Until the cause is fixed, recovery cannot run and the DB cannot 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


jnieuwoudt
jnieuwoudt
Valued Member
Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)

Group: General Forum Members
Points: 59 Visits: 58
Thanks, this worked for me!

Cheers,
Jeremy.
ioana-477197
ioana-477197
SSC Veteran
SSC Veteran (269 reputation)SSC Veteran (269 reputation)SSC Veteran (269 reputation)SSC Veteran (269 reputation)SSC Veteran (269 reputation)SSC Veteran (269 reputation)SSC Veteran (269 reputation)SSC Veteran (269 reputation)

Group: General Forum Members
Points: 269 Visits: 278
Hello

Unfortunatelly I am having a simillar issue and waiting for the database to recover seems not to work for me. The database seems to be stuck in RECOVERING state.
Moreover, if I restart SQL Server, other databases start to have the same issue, meaning they become stuck in RECOVERING mode too, while other database seem to have been recovered.
Now, even msdb is in RECOVERING state.

Any help on this would be greatly appreciated.

Thanks,
Ioana
GilaMonster
GilaMonster
SSC Guru
SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)SSC Guru (229K reputation)

Group: General Forum Members
Points: 229726 Visits: 46344
Please post new questions in a new thread.
Thanks

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


sickpup
sickpup
SSC Veteran
SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)

Group: General Forum Members
Points: 299 Visits: 267
Just as an FYI, in case it helps anyone...

We recently had this same problem. One of our DBs was stuck in a "Recovery Pending" state following a sudden (and unusual) loss of power. (An onsite electrician was to blame.)

Anyhow, it turns out that when the server booted back up, the various drives were a little slower to come online. As a result, when SQL Server went to restore the DB, the drives on which the needed data is stored weren't yet available. (The error logs pointed to which drives were needed).

Once the drives were available, a manual restart of SQL Server fixed the problem and the DB was automatically recovered.

Cheers
iqbal1258
iqbal1258
SSC Journeyman
SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)

Group: General Forum Members
Points: 99 Visits: 131
Hey Guys Nothin to do....

Chek firs mdf and ldf is exist or not..
if exist run below coommand on master DB


ALTER DATABASE 'DATBASE NAME' SET OFFLINE WITH ROLLBACK IMMEDIATE
ALTER DATABASE 'DATBASE NAME' SET ONLINE WITH ROLLBACK IMMEDIATE
muthukkumaran Kaliyamoorthy
muthukkumaran Kaliyamoorthy
SSCarpal Tunnel
SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)

Group: General Forum Members
Points: 4643 Visits: 4968
iqbal1258 (10/19/2011)
Hey Guys Nothin to do....

Chek firs mdf and ldf is exist or not..
if exist run below coommand on master DB


ALTER DATABASE 'DATBASE NAME' SET OFFLINE WITH ROLLBACK IMMEDIATE
ALTER DATABASE 'DATBASE NAME' SET ONLINE WITH ROLLBACK IMMEDIATE


Why you want to do this?

Muthukkumaran Kaliyamoorthy

Helping SQL DBAs and Developers >>>SqlserverBlogForum

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