Solved

Database Restoration Problem

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
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…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how the fundamental information of how to create a table.

743 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

11 Experts available now in Live!

Get 1:1 Help Now