|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 12:11 PM
Points: 164,
Visits: 702
|
|
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
|
|
|
|
|
Ten 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?
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 1:37 PM
Points: 37,687,
Visits: 29,944
|
|
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
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 1:37 PM
Points: 37,687,
Visits: 29,944
|
|
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
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, March 01, 2012 6:05 PM
Points: 1,
Visits: 58
|
|
Thanks, this worked for me!
Cheers, Jeremy.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 10:50 AM
Points: 22,
Visits: 170
|
|
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
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 1:37 PM
Points: 37,687,
Visits: 29,944
|
|
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
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 12:40 PM
Points: 28,
Visits: 166
|
|
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
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, February 20, 2013 11:54 PM
Points: 3,
Visits: 60
|
|
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
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 5:22 AM
Points: 1,123,
Visits: 4,423
|
|
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
|
|
|
|