Solved

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

Posted on 2006-11-29
3
444 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
[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
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
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…

749 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