How can we help you today? How can we help you today?

Can SQL Data Compare remember a sequence of tables to affect?

I recently inherited a database with a lot of primary keys, foreign keys, and enforced referential integrity. As a result, whenever I use SQL Data Compare to refresh the DEV database with data from PROD, I can't just select all the tables and rows at once and let Data Compare do its thing...there seems to be a specific order I have to go in, which is time consuming.

I was wondering if SQL Data Compare had a means of setting a specific order in which tables are affected.
ShowJ
0

Comments

5 comments

  • DanC
    Hi @ShowJ

    Can I ask, have you looked into any of the options that SQL Data Compare provides?

    It should be a default option, have you got "Disable foreign keys" enabled? 

    So essentially this disables the FK constraint and deploys the data (that should meet all integrity constraints) and then re-enables the FK.

    Here's some documentation breaking them down: https://documentation.red-gate.com/sdc/setting-up-the-comparison/setting-project-options
    DanC
    0
  • ShowJ
    DanC said:
    Hi @ShowJ

    Can I ask, have you looked into any of the options that SQL Data Compare provides?

    It should be a default option, have you got "Disable foreign keys" enabled? 

    So essentially this disables the FK constraint and deploys the data (that should meet all integrity constraints) and then re-enables the FK.

    Here's some documentation breaking them down: https://documentation.red-gate.com/sdc/setting-up-the-comparison/setting-project-options
    That was the first thing I tried. Didn't work.

    I should also mention that all the primary keys are identity, auto-number columns.
    ShowJ
    0
  • ShowJ
    DanC said:
    Hi @ShowJ

    Can I ask, have you looked into any of the options that SQL Data Compare provides?

    It should be a default option, have you got "Disable foreign keys" enabled? 

    So essentially this disables the FK constraint and deploys the data (that should meet all integrity constraints) and then re-enables the FK.

    Here's some documentation breaking them down: https://documentation.red-gate.com/sdc/setting-up-the-comparison/setting-project-options
    That was the first thing I tried. Didn't work.

    I should also mention that all the primary keys are identity, auto-number columns.
    ShowJ
    0
  • ShowJ
    DanC said:
    Hi @ShowJ

    Can I ask, have you looked into any of the options that SQL Data Compare provides?

    It should be a default option, have you got "Disable foreign keys" enabled? 

    So essentially this disables the FK constraint and deploys the data (that should meet all integrity constraints) and then re-enables the FK.

    Here's some documentation breaking them down: https://documentation.red-gate.com/sdc/setting-up-the-comparison/setting-project-options
    That was the first thing I tried. Didn't work.

    I should also mention that all the primary keys are identity, auto-number columns.
    ShowJ
    0
  • DanC
    Hi @ShowJ

    Thanks for the update, going to need a bit more info from you in order to troubleshoot this!

    I'm going to follow up via a support ticket!
    DanC
    0

Add comment

Please sign in to leave a comment.