I have just installed SQL Server 2005 on a fresh machine, and I'm trying to import 2 databases from one of my servers. This has worked fine for a box that I did this morning but now I'm getting some errors on this second box.
I am doing the following :
- Right click Database > Restore Database...
- To database : "myDb"
- From Device : C:\myDbBkp.bak
- Check the backup set, and click OK
Normally it would give a popup saying "Import sucessful", but now I get the following :
Restore failed for server "myServer". (Microsoft.SqlServer.Smo)
Additional Information : System.Data.SqlClient.SqlError : Directory lookup for the file "C:\Program Files\Microsoft Sql Server\MSSQL.1\MSSQL\DATA\myDbBkp.mdf" failed with the operating system error 3(error not found) (Microsoft.SqlServer.Smo)
My next questions are :
- Why is it trying to load an MDF file from a directory I haven't specified
- Error not found, is that as helpful as it sounds?
Any ideas? I did this successfully earlier on an identical environment with the same versions etc.
Many thanks
It’s not trying to load an MDF from a directory you haven’t specified, it’s trying to PUT it there (because it was there in the first place).
Instead of doing step #4, check it and don’t click “OK", but then go to OPTIONS and make sure that both the Data path and the log path (And .MDF/.LDF names) are OK and unique.
Alternatively, create the path *C:\Program Files\Microsoft Sql Server\MSSQL.1\MSSQL\DATA*.
;)
Is the destination path the same as the source path? If not, you'll need to change the destination path.