Dec 14, 2013

Unable to open the physical file "". Operating system error 2: "2(The system cannot find the file specified.)". (Microsoft SQL Server, Error: 5120)


When we will try to attach AdventureWorks database in sql server we may get error message like:

Unable to open the physical file "". Operating system error 2: "2(The system cannot find the file specified.)". (Microsoft SQL Server, Error: 5120)

Cause of this error is path of physical and log file. To solve this problem correct the physical path of data file and remove the log file as show in the following figure:


I hope this will solve this issue.  

4 comments:

  1. OMG, you are genius!!!!! I tried many other ways to make it work...but it didn't just tried your way.,..it did work!! thanks a lot

    ReplyDelete
  2. I have struggled for hours trying to do this. Removing the log file isn't working for me.

    ReplyDelete
    Replies
    1. Anonymous10/02/2017

      Me too, but I already resolved this by using this kind of way.

      1. Change your database name.
      2. Reopen back Current Path File after you delete the log file.

      All of this after the error I got, you have the permission to change everything. It's not working when you upload the mdf files.

      Delete