Thanks yosiasz.
I need to archive data older than 2 years. the reason is the tables contain 10 year old data causing them to be too large.
Only some of the tables have FKs.
Yes I have created an Archive database but the tables have the same FKs as the source/production tables have..
This is what I'm thinking of doing:
-- Turn off referential integrity on the Archive tbales
EXEC sp_MSForEachTable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'
EXEC sp_MSForEachTable 'ALTER TABLE ? DISABLE TRIGGER ALL'
--load data here
-- Turn ON referential integrity
EXEC sp_MSForEachTable 'ALTER TABLE ? CHECK CONSTRAINT ALL'
EXEC sp_MSForEachTable 'ALTER TABLE ? ENABLE TRIGGER ALL'
Is this a good option?