Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-11-29
3
Medium Priority
?
462 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 150 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

715 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