Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

enter image description here


Open SSMS. Find table. Open constraints. Find constraint name. Right click, rename. Give new name.

EXPLODE. (well, it just fails, at least)

share|improve this question
Did you try using sp_rename manually? @objtype = 'OBJECT' is correct, by the way. – Jon Seigel Mar 20 '13 at 16:54
Apparently ... It's a major crisis bug for MS:… – jcolebrand Mar 20 '13 at 16:54
@JonSeigel I did not, but I'm willing to give it a shot. We can chat in the heap or you can offer an answer? Marian in chat seems to think it's a true blue bug. – jcolebrand Mar 20 '13 at 16:54
@JonSeigel I replicated same bug as in Connect :-). Been using a different schema, not dbo. – Marian Mar 20 '13 at 16:56
Ah, it probably doesn't specify the schema name in the @objname parameter. – Jon Seigel Mar 20 '13 at 16:57
up vote 4 down vote accepted

You can use sp_rename manually.

Note that this is fixed in SSMS 2012 (I don't remember if I have SP1 installed or not).

EXEC sp_rename
    @objname = N'[myschema].[DF__AccountTy__Allow__7E3AEC52]',
    @newname = N'DF_whatever',
    @objtype = 'OBJECT';
share|improve this answer
Sorry, I may have typo'd the constraint name, but you get the idea. – Jon Seigel Mar 20 '13 at 17:07
Yeah, I'm not worried about the specific constraint name, but do I not need to supply the schema for the newname? – jcolebrand Mar 20 '13 at 17:09
@jcolebrand: No, in fact I think you get an error if you try. You can't move the object to a different schema like this, which is why it's not required. – Jon Seigel Mar 20 '13 at 17:11

Your Answer


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.