Disable Primary Key and Re-Enable After SQL Bulk Insert
- by Jon
I am about to run a massive data insert into my DB. I have managed to work out how to enable and rebuild non-clustered indexes on my tables but I also want to disable/enable primary keys.
You can't disable the clustered index for the primary key as the table is inaccessible when that is done and my attempt to do a ALTER TABLE for constraints does not work as I think that is only for foreign keys.
Do you know of a way to Disable the Primary Key and Re-Enable After SQL Bulk Insert.
NOTE: This is over numerous tables and so I don't know the exact primary key specifications eg/name etc