Solved

Importing a backup in SSMSE 2005

Posted on 2013-12-09
2
340 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

772 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