Solved

Database Restoration Problem

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
I have a large data set and a SSIS package. How can I load this file in multi threading?
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
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.

840 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