Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Database to database copy

Posted on 2014-02-19
1
Medium Priority
?
193 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 1500 total points
ID: 39869909
Hi,

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

HTH
  David
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

972 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