Solved

Database to database copy

Posted on 2014-02-19
1
178 Views
Last Modified: 2014-02-19
I'm doing a db-to-db copy of a MS SQL SErver 2008R2 database. Which is the better approach to use:

1. Create database and tables without foreign keys.
2. Transfer the data
3. Create foreign keys

OR

1. Create database and tables without foreign keys.
2. Create foreign keys
3. Transfer the data using the foreign key hierarchy.

Thanks.
0
Comment
Question by:zeekay22
1 Comment
 
LVL 35

Accepted Solution

by:
David Todd earned 500 total points
ID: 39869909
Hi,

Generally create all the indexes and keys after the big inserts.

HTH
  David
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CROSS APPLY 4 45
Can Unique column have more than one Null? 8 48
Get Duration of last Status Update 4 31
sql Total query 2 17
There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

867 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

21 Experts available now in Live!

Get 1:1 Help Now