FCB::Open Failed Error

  • Hello, I hope someone can help me out of a spot.

    We had some maintenance done on our building at the weekend and everything was powered down. Looking at the logs I now have trouble with a number of errors, this only applies to some of the user databases in the instance, not all of them.

    FCB::Open Failed: Could not open file E:\Data\Databasename.MDF for file number 1. OS error: 5(failed to retrieve text for this error. Reason 15100.

    Error: 17204, Severity: 16. State 1.

    Then further on...

    FileMGR::StartLogFiles: Operating system error 2(failed to retrieve text for this error. Reason: 15105)occured while creating or opening file F:\Logs\DatabaseName.LDF'. Diagnose and correct the operating system error, and retry the operation.

    Error: 17207, Severity: 16, State: 1.

    I have SQL 2008 R2 RTM on Windows 2008 R2.

    I have found similar errors online, but none that match mine exactly, some of the databases are functioning ok, I have not tried restarting the services yet, I can see the databases in SSMS, but of course I can not access any properties. Any help most appreciated.

    Kind Regards,

    D.

  • OS error 5 means access denied, while OS error 2 means the file could not be found. Looks like permissions have been changed in one place and elsewhere, one of your files has been moved or deleted.

    John

  • Yes, I had a feeling it might something to do with permissions, the files are there, when I try to bring the database online I get the following error message...

    Msg 5120, Level 16, State 101, Line 1

    Unable to open the physical file "E:\DATA\Databasename_data.mdf". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)".

    File activation failure. The physical file name "F:\LOGS\Databasesname_log.ldf" may be incorrect.

    Msg 945, Level 14, State 2, Line 1

    Database 'DatabaseName' 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

    ALTER DATABASE statement failed.

    The disk space is ok and so is the memory. If I reapply permissions, do I need to restart the SQL engine for it to take effect?

    Regards,

    D.

  • No, take offline and bring online (the DB) should be enough.

    Question is, why are the permissions wrong? NTFS doesn't just randomly change folder permissions, so something's happened or someone's been fiddling where they shouldn't.

    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
  • Hello Gail,

    After reapplying the permissions for the Engine and Agent to the log and database files, I did as you said, and brought the databases back online. Yes, why did the permissions not get reapplied? I do not have the SQL Services user accounts as local admins on the server, I think if I had added them rather than applying them to the individual mdf and ldf I might have had it solved a bit quicker, but I didnt want to do that. I'll have to look into this further, but from what little I read initially, it MIGHT be a Windows 2008 bug. It did not happen to all the databases in the instance, but about half of them.

    As always, thank you both for taking the time to reply.

    Regards,

    D.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply