call today Call Today 320.281.0605

Error Restoring SQL Server DB backup

April 23, 2009

Scenerio: I had a web application that I developed on my local machine.  When I finished it I made a backup of the database to deploy to the staging server.

I uploaded it to the server then went to restore the db on the server, that is when I received this error:

Restore failed for Server ‘staging’. (Microsoft.SqlServer.Smo)

Additional information:
System.Data.SqlClient.SqlError: Directory lookup for the file “path.db.mdf” failed with the operating system error 2(The system cannot find the specified.). (Microsoft.SqlServer.Smo)

 RestoreError

Solution: The location of where my database on my local machine was different than that on the server.  I had to update the database location on the server. 

This was done by when restoring clicking on the options tab.  Then updating the paths of the Original File Name to where the database data is stored on the server.  I found this path out by looking to see where the current ones were stored.

RestoreErrorSolution

  • Share/Bookmark
  • Apprehended

    Nice blog post. I knew that, but good to know info is out there. Btw, change your cap—-cha. and also, what did you use to make those screenshots?

  • Joel

    Thank you. I used Jing to make the screenshots, works great and best of all it is free.

blog comments powered by Disqus
Agent Cody Banks 2 Destination London full lenght movie download Afghan Knights download movie Inside the Smiths download movie Beverly Hills Chihuahua download movie Permanent Vacation download movie Indiana Jones and the Kingdom of the Crystal Skull download movie Afghan Knights download movie Inside the Smiths download movie Beverly Hills Chihuahua download movie Permanent Vacation download movie Indiana Jones and the Kingdom of the Crystal Skull download movie