I have a number of incidents where SSMS tells me table recreation is required, even for something simple like making a column nullable. If this table is referenced by FK's, I would ideally like to find a way of temporarily removing those FK's from the 'other' tables, re-creating my table, and then re-creating the FK's on the other table again.

Is there a known way of doing this?

link|improve this question

61% accept rate
feedback

1 Answer

Disabling won't work in this case.

I'd probably do this:

  1. use the SSMS GUI to make my changes
    • save the script: do not execute it
    • run this section by section
    • use a compare tool to generate a better script (eg Red Gate)

Step 4 is optional and you pimp the script from step 2/3 instead

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.