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 1234»»»

Database in Recovery Pending State Expand / Collapse
Author
Message
Posted Monday, June 8, 2009 4:52 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, November 22, 2014 9:16 AM
Points: 184, Visits: 863
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
Post #730583
Posted Monday, June 8, 2009 5:22 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, August 24, 2012 8:11 AM
Points: 1,097, Visits: 2,157
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?

Post #730597
Posted Monday, June 8, 2009 5:43 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 @ 2:35 PM
Points: 40,438, Visits: 36,895
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 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 #730606
Posted Monday, June 8, 2009 5:45 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 @ 2:35 PM
Points: 40,438, Visits: 36,895
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 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 #730610
Posted Wednesday, January 13, 2010 5:17 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, March 1, 2012 6:05 PM
Points: 1, Visits: 58
Thanks, this worked for me!

Cheers,
Jeremy.
Post #847270
Posted Tuesday, September 7, 2010 12:19 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, October 14, 2014 3:40 AM
Points: 28, Visits: 209
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
Post #981799
Posted Tuesday, September 7, 2010 1:08 PM


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 @ 2:35 PM
Points: 40,438, Visits: 36,895
Please post new questions in a new thread.
Thanks



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 #981836
Posted Monday, November 1, 2010 4:23 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, November 13, 2014 11:18 AM
Points: 34, Visits: 256
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
Post #1014185
Posted Wednesday, October 19, 2011 6:32 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 13, 2014 3:34 PM
Points: 3, Visits: 122
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
Post #1193309
Posted Thursday, October 20, 2011 2:35 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 7:21 AM
Points: 1,159, Visits: 4,658
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
Post #1193415
« Prev Topic | Next Topic »

Add to briefcase 1234»»»

Permissions Expand / Collapse