Solved

copying one sql database into different database

Posted on 2011-09-06
2
182 Views
Last Modified: 2012-05-12
Hi,

wanted to create a test company within sql 2008 that has all the same data as our live company.  I created a backup of the live company and actually have the mdf file and also the bak file from backup within the sql management studio.  I went to detach the test company and renamed the file called 850.mdf to 850.mdd.  I then copied the copy of live company mdf into same directory as where the 850.mdd currently is.  I then tried to do an attach of the copy of live company but got errors.  I actually renamed the copy of live data to 850.mdf.  Was this necessary and could i have done a restore of the bak file instead?  The restore actually said that i am trying to restore data that is from a different company structure so forth.  thanks
0
Comment
Question by:dankyle67
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 25

Accepted Solution

by:
Lee Savidge earned 500 total points
ID: 36491026
Put the live database as it was so that is working. Create a blank new one then restore your backup over the top. When restoring ensure that you point the restore to the blank database location as it will default to the live database.

Lee
0
 

Author Comment

by:dankyle67
ID: 36495599
Found out that key is you have to select option to restore over existing database which i didnt do first time.  Worked after doing this, thanks.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Query Syntax 17 53
Conver SQL Server 2008 R2 from sql_latin1_general_cp1_ci_as to Arabic_CI_AS 9 33
tempdb log keep growing 7 45
Need to replicate a Log table 4 14
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

730 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