I am running an SSIS package which will replace data for a few tables from FlatFiles to existing tables in a database.
My package will truncate the tables and then insert the new data. When I run my SSIS package, I get an exception because of the foreign keys.
Can I disable the constraints, run my import, then re-enable them?
not need to run queries to sidable FKs on sql. If you have a FK from table A to B, you should:
You can also tell the destination not to check constraints
Disable all indexes (including the pk, which will disable all fks), then reenable the pks.
[Do your data load]
Then bring everything back to life...