Unanswered: SWITCH-ing partitions and foreign keys
We have a daily purge job that runs on 4 tables that switches out the oldest partition into an archive table and then truncates the contents.
Problem we ran into was a deadlock occurred when the FK's were attempted to be dropped. I realize making schema changes is not ideal for any DB Maintenance procedures, has anyone else run into something similar and came up with a fix to preserve referential integrity? The referring table is one of the 4 tables in which we are performing the SWITCH on.