July 20, 2011 at 11:04 am
This is a first for me. Though I have checked other sites.
Database is in shutdown status. State_Desc in sys.databases says "Recovery Pending" and the log says:
07/20/2011 12:51:02,spid18s,Unknown,File activation failure. The physical file name "D:\PC SQL DBs\MyDB_1.LDF" may be incorrect.
07/20/2011 12:51:02,spid18s,Unknown,FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'D:\PC SQL DBs\MyDB_1.LDF'. Diagnose and correct the operating system error<c/> and retry the operation.
07/20/2011 12:51:02,spid18s,Unknown,Error: 17207<c/> Severity: 16<c/> State: 1.
07/20/2011 12:51:02,spid18s,Unknown,Unable to open the physical file "D:\PC SQL DBs\MyDB.MDF". Operating system error 2: "2(The system cannot find the file specified.)".
07/20/2011 12:51:02,spid18s,Unknown,Error: 5120<c/> Severity: 16<c/> State: 101.
07/20/2011 12:51:02,spid18s,Unknown,FCB::Open failed: Could not open file D:\PC SQL DBs\MyDB.MDF for file number 1. OS error: 2(The system cannot find the file specified.).
07/20/2011 12:51:02,spid18s,Unknown,Error: 17204<c/> Severity: 16<c/> State: 1.
Seems pretty straight forward. I don't know what happened to the files (they certainly aren't where they are supposed to be), but I agree that the error message is correct.
I'm about to delete the reference in Object Explorer and restore the DB from a production backup (this is a dev / sandbox DB). Does anyone know of any specific reason why my proposed actions would be a bad idea?
Just an FYI: because this is a dev / sandbox db, so I'm not going to fuss about the missing files. It's my personal desktop, not a server, so I probably did something stupid when the services were offline.
July 20, 2011 at 11:07 am
Restore from backup. Log file missing, database not cleanly shut down.
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
July 20, 2011 at 11:08 am
GilaMonster (7/20/2011)
Restore from backup. Log file missing, database not cleanly shut down.
So just restore over the exist rather than delete first?
July 20, 2011 at 11:09 am
Either. No difference really.
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
July 20, 2011 at 11:10 am
Thanks, Gail. I appreciate you verifying that for me.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply