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 :

  1. Right click Database > Restore Database...
  2. To database : "myDb"
  3. From Device : C:\myDbBkp.bak
  4. 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 :

  1. Why is it trying to load an MDF file from a directory I haven't specified
  2. 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

link|improve this question

feedback

2 Answers

up vote 3 down vote accepted

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*.

;)

link|improve this answer
feedback

Is the destination path the same as the source path? If not, you'll need to change the destination path.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.