• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 199
  • Last Modified:

Database to database copy

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
zeekay22
Asked:
zeekay22
1 Solution
 
David ToddSenior DBACommented:
Hi,

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

HTH
  David
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now