Solved

sql server database file transfer from one machine to another

Posted on 2011-03-07
5
466 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 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

23 Experts available now in Live!

Get 1:1 Help Now