SSIS Package to Migrate data from Prod to Dev

  • 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?

  • 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.

  • I agree with Jack, that is your best bet and also one of the best practices of loading data in an ETL environment.

  • Thanks guys! I built a script to disable and then re-enable all key constraints. I will use it.

  • 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

  • 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