April 17, 2009 at 7:44 am
I want to create an SSIS package that will migrate data from a production database to a dev database on a daily basis. The problem I am running into is that I have tables with forigen key constraints, and if they are not ordered correctly in the package for the move, it bombs.
I was wondering if there was a way in SSIS to setup which tables I want to have data moved for, and then SSIS can do the moves without the keys being an issue?
April 17, 2009 at 8:18 am
You could have the first step in your SSIS package Drop all the FK's and then finish the package with a step that re-applies them.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
April 17, 2009 at 10:09 am
I agree with Jack, that is your best bet and also one of the best practices of loading data in an ETL environment.
April 17, 2009 at 11:40 am
Thanks guys! I built a script to disable and then re-enable all key constraints. I will use it.
April 17, 2009 at 1:53 pm
I am having a very hard time getting the SSIS package to do what you two suggested. Would anyone happen to have some documentation on how to accomplish this?
Thanks!
Michael
April 17, 2009 at 5:17 pm
Do you mean that you are having trouble writing the T-SQL? Or some other problem?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply