Solved

Database Restoration Problem

Posted on 2006-06-19
3
241 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

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…
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

770 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