Unable to open the physical file “xxx.mdf”

 

ERROR MESAGGE:

“Unable to open the physical file “xxx.mdf”. Operating system error 5: “5(failed to retrieve text for this error. Reason: 15105)”. (Microsoft SQL Server, Error: 5120)”

EXPLANATION:

You may encounter an error message when you want to attach a database by using SQL Server Management Studio (SSMS).

SOLUTION:

You may receive this error on operating systems with UAC (User Access Control) enabled.

You must open SSMS with Run As Administrator to attach your database with SSMS without receiving this error message.

Or, if you disable the UAC feature, you can also get rid of this error message without running SSMS as an administrator.

Ekrem Önsoy
Author: Ekrem Önsoy

The original article was written in Turkish by Ekrem Önsoy and translated to English by dbtut with the consent of the author. The copyright of the article belongs to the author. The author shall not be liable in any way for any defect caused by translation.

Leave a Reply

Your email address will not be published. Required fields are marked *