Disable Referential Integrity Checks

  • I'm using a tool (SQLAzure Migration Wizard) to migrate a db. Works great except, I do run into some foreign key violations when it tries to load the data. I seem to recall a way to turn this off for all tables in a db somehow. How do I temporarily shut that off?

    Thanks!

    .

  • You need enable NOCHECK on the tables. Check if some of the script posted here are useful.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Thanks! Not the answer I was hoping for. I could swear I remember a way to temporarily turn that off globally for all tables. Maybe I'm thinking of BCP, but I suppose that just turns it off on a table by table basis as well.

    Oh well, table-by-agonizing-table it is. Thanks for the response.

    .

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply