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:
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)
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.
-
Apprehended
-
Joel
-
Categories
- asp.net (11)
- Blog (1)
- Business (5)
- Conferences (1)
- Errors (3)
- Portfolio (2)
- Reviews (2)
- SQL Server (3)
- Tips (1)
- Uncategorized (1)
- Web Development (13)
-
Archives