Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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