Tuesday, July 19, 2011

ERROR <> FCB::Open failed: Could not open file

Inspired by a discussion with PAstor Mrs. Peju Adefule, i have written this post to address a (Not-too-common-error) with sql server permissions.

FCB::Open failed: Could not open file

You start the SQL Server service and notice that the database is unavailable. You look in the error log and see this message: 

"FCB::Open failed: Could not open file <filename> for file number <filenumber>. OS error: 5(access denied)". 

The access denied part of the message may be replaced with error not found. 

This happens because the account the SQL Server service runs under does not have access to the folder containing the database or log files. If it had these permissions b4, the check the password policy and the login user mapping for any changes. Also look at the server roles. After this is confirmed as the cause, Check which account the service runs as by starting SQL Server Configuration Manager.

Now perform the following steps:

  1. Right-click on the folder containing one of the database files and selectSharing and Security...
  2. Select the Security tab
  3. Click the Add... button
  4. In the text box type in the fully qualified user name of the service account (e.g. MyDomain\MySQLAccount)
  5. Ensure the Full Control checkbox in the Allow column is checked, and clickOK
Repeat the above for all other data and log folders. Restart SQL Server from Configuration Manager.

No comments:

Post a Comment