Restoring Back-Ups into a Different Server: 'Device Not Ready' error - SOLVED

  • There was an old thread on this issue from like 9 years ago, but I think it was closed so I was unable to add to it. The solution was a little different for me, no doubt because SQL Management Studio has changed in the intervening years.

    The problem is I'm trying to restore a customer database to my development machine, and it's failing with an error message like "System.Data.SqlClient.SqlError: Directory lookup for the file "D:\DATA_FILES\OSM_eTech.mdf" failed with the operating system error 21(The device is not ready.). (Microsoft.SqlServer.Smo)"

    It's trying to restore with the original path from the customer site, which does not exist on my machine. Older solutions mention using a "Restore As" option in SQL Management Studio, but that no longer exists in the version I'm using.

    It seems the corresponding setting is now on the "Files" screen, click "Relocate all files to folder". That made the restore succeed for me.

    It took a bit of time to find this, so I'm making this post to help others if they are Googling for the solution and just get the out-of-date solution like I did. Hope it helps!

Viewing 0 posts

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