Avatar of dankyle67
dankyle67

asked on 

copying one sql database into different database

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
Microsoft SQL Server 2008

Avatar of undefined
Last Comment
dankyle67
ASKER CERTIFIED SOLUTION
Avatar of Lee
Lee
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of dankyle67
dankyle67

ASKER

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.
Microsoft SQL Server 2008
Microsoft SQL Server 2008

Microsoft SQL Server 2008 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. Major improvements include the Always On technologies and support for unstructured data types.

50K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo