Solved

Importing a backup in SSMSE 2005

Posted on 2013-12-09
2
346 Views
Last Modified: 2013-12-09
I need to export a live SQL 2005 database and import it into a test environment. I've used the SQL backup feature to obtain a '.bak' file and copied it to a test server. When I try to import the .bak file it fails with error "restore failed for server "SRV-12\INVENTIVE_WEB".

System.Data.SqlClient.SQLError: Directoy lookup for the file C:\Program Files\Microsoft SQL Server\MSSQL.4\MSSQL\Data\Inventive_web.mdf failed with the operating system error 3(error not found).

Is it possible to import the .bak file? If not, what's the best option?

Thanks
John
0
Comment
Question by:RBG IT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 38

Accepted Solution

by:
Jim P. earned 250 total points
ID: 39707226
The issue is that SQL can't find the C:\Program Files\Microsoft SQL Server\MSSQL.4\MSSQL\ folder.

Two options:

Create the directory, or during the restore process change the path for the mdf and ldf files.
0
 
LVL 16

Assisted Solution

by:DcpKing
DcpKing earned 250 total points
ID: 39707281
Yes, it's certainly possible (assuming that you're not trying to import it into SQL Server 2000, or from Enterprise into Express).

You don't "import" a .bak file: you use the Restore facility to create a whole new database from the backed-up data.

Therefore open SSMS and right-click on Databases and then select Restore Database ...

In the Restore Database dialog box that you get choose Device and File, then Add from the next dialog box and find your .bak file. Once back at the Restore Database dialog you can give your incoming database a name.

Then go to the files page and make sure that the paths are correct - you're unlikely to be putting the mdf and ldf file into the same places as they were for the other server.

Try this out again bearing these things in mind and, if you get problems again, take some screenshots (Alt-PrintScreen) of the error messages and of the settings in the Restore Database.

hth

Mike
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question