Monday, May 20, 2013

Open failed. Could not open file mdf for file number 2. OS error 5(Access denied)

Today my one client told me that their database could not access in yesterday, we try to use the database and got message error 
the database could not access due to disk space or insufficient memory

First I checked the disk space and found that there is ample disk space.
Then I checked SQL Server error log, It shows the below error:

FCB::Open: Operating system error 5(Access is denied.) occurred while creating or opening file DATABASE_log.ldf ‘. Diagnose and correct the operating system error, and retry the operation.

Generally an OS error 5 means there is no permission to modify a particular file. Than I suspect that the account that is running SQL Server Service does not have permissions to modify the LDF and MDF files.

So, then I checked the write permission to the file by right click on the files (both mdf and LDF) and select properties and than from security TAB checked the write permission to these files. I set the write permission. 

Now problem solved.

No comments:

Post a Comment