Solved

Unable to restore DB in MS SQL Server 2005 from .BAK file

Posted on 2006-11-29
3
405 Views
Last Modified: 2008-01-09
I installed the Trial version of MS SQL Server 2005 & am trying to restore a database from a backup file a client sent me as a zipped file, name of backup file is URM.BAK. In SQL Server, I right click Databases & choose Restore Databases, then select From Device, then click on Add to specify the location of the Backup File URM.BAK, which I put at "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data", then click OK. In the "To database" drop-down, I give a name to the DB, calling it URM as well (for sakes of simplicity). In the section "Select the backup sets to restore", I check both checkboxes of URM backup. When I finally click OK, I get the following error:

TITLE: Microsoft SQL Server Management Studio
------------------------------
Restore failed for Server 'BABER-WLVHQ8ELP'.  (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
System.Data.SqlClient.SqlError: Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL\data\URM_Data.MDF" failed with the operating system error 3(The system cannot find the path specified.). (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
Probably all that is important is the error, but I am descrbing in details just to ensure I am not doing anything incorrectly. I must point out that according to my client, the URM.BAK is from SQL Server 2004, but I'd assume 2005 should be backward compatible. I have also tried changing the location of the URM.BAK file to the Data Folder under sql server. Please help.
0
Comment
Question by:nemesis7
3 Comments
 
LVL 29

Accepted Solution

by:
Nightman earned 50 total points
ID: 18043152
Have a look at the options menu (second one one the left)  when you are restoring the database. The look at the path of both the MDF and LDF file. This will be (by default) the path where the MDF used to reside whereever it was running.

Look at changing
C:\Program Files\Microsoft SQL Server\MSSQL\data\URM_Data.MDF
to
C:\Program Files\Microsoft SQL Server\MSSQL.1\data\URM_Data.MDF

Notice the subtle difference in the path?
Also do the same with the ldf.
0
 
LVL 10

Expert Comment

by:harisrashid
ID: 18043953
Create a new database and give it the same name as the backed up database.

After creating this new Db, run the restore operation.

Regards,

Haris
0
 
LVL 35

Expert Comment

by:David Todd
ID: 18051277
Hi,

Of even try taking a backup from one of the sample databases - adventure works et al, and restoring that to a new database.

Regards
  David
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
t-sql complement 8 30
Getting certain data from a string 1 22
SQL Script to find duplicates 16 19
Copy Database Wizard Error 3 20
Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now