Solved

Database Restoration Problem

Posted on 2006-06-19
3
243 Views
Last Modified: 2006-11-18
I have a Backup of a Database. I want to restore it on other Sql Server. Installation Paths are all different. Problem arrises when I restore this Databse. Error shows that

Device Activation Error The Physical File Name D:\-----\mydb.mdf may be incorrect.
same Error with .ldf file

I read Microsoft article . IT told me that First Detach all Databases from Destination server like master, Pubs etc etc and then first Restore all these Databases and then restore your Own mydb Database.

Tell me the exact Procedure of restoring or attaching a Database whenever I have only .BAK File.
0
Comment
Question by:musalman
3 Comments
 
LVL 13

Assisted Solution

by:MikeWalsh
MikeWalsh earned 20 total points
ID: 16938879
a .bak file is a database backup file.  An MDF is the data file that actually contains the data in the database. The .LDF is the transaction log.

You don't need to attach here, you need to restore.

What is probably happening is you are just trying to restore it exactly as it was on your source server without changing the file paths. You will need to use RESTORE and use the WITH move command to move the logical files to the proper drives/folders on the destionation server.

Look up RESTORE in books online and look at the example with the MOVE commands.
0
 
LVL 29

Expert Comment

by:QPR
ID: 16939453
When you navigate to the bak file to restore from (and click ok) you should see 2 sides to the next window.
The logical file name and the file path.
As Mike says the path shown will be then one relevant to the server where the bak file originated from.
Click on this (right hand side) and change the path to suit.
0
 
LVL 3

Accepted Solution

by:
chhapia_chintak earned 30 total points
ID: 16939948
When yoy click on "restore database" first select the database backup file (.bak) then go to "option" property page/ tab of a window. In option you can find colums like "logical file name" and "move to physical file name". Change the  "physical file name " to existing lcation on your drive and this problem will be solved.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
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 set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

685 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