Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
I have a large data set and a SSIS package. How can I load this file in multi threading?
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 INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

932 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

10 Experts available now in Live!

Get 1:1 Help Now