Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

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

;)

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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