Solved

sql server database file transfer from one machine to another

Posted on 2011-03-07
5
470 Views
Last Modified: 2012-05-11
Hi,

I had to recreate a SQL Server 2005 Database instance on another machine. I wasn't having an option to take DB offline and copy the ldf and mdf files. Hence I took a back-up of the database (.bak) file -> copied it to another machine back-up folder and then restored it.

Is this process equivalent to creating a new instance on another machine OR is there any catch ?
0
Comment
Question by:pratz09
  • 3
  • 2
5 Comments
 
LVL 32

Expert Comment

by:ewangoya
ID: 35062295

You already created the instance as you pointed out
For the database however, you have just created a copy of it without any latest changes (IE the changes that were made since you did the backup)
0
 

Author Comment

by:pratz09
ID: 35062330
Yea, I wanted to replicate the database (till the point in time I took the back-up) on another machine, which is actually a development machine. Can I sync both databases easily ?
0
 

Author Comment

by:pratz09
ID: 35062399
I am sorry for not making the question clear. What I meant to ask was whether recreating an instance of database via back-up file of original database is equal to creating a new database on another machine and copying ldf and mdf files in it.

One difference which I can see is that when I create a new database on target machine usign solution explorer, it creates 2 files newDB and newDB_log, while it doesn't happen if i restore a database usign .bak file. I am not how much difference does it make, hence I thought to confirm it here.
0
 
LVL 32

Accepted Solution

by:
ewangoya earned 500 total points
ID: 35062454

The actions are equivalent.

When you restore the database it actually creates the files again (mdf and ldf), If you did not select a location then it just created the files in the default location eg
C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA



0
 

Author Closing Comment

by:pratz09
ID: 35062492
Thanks for confirming. I believe newDB_log file is not that important.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

790 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