While creating and editing a database in SQL server 2008 I soon ran into a brick wall, or a 'by design' feature of the Database Management Studio.
When you design a table in a database and then try to make a change to a table structure that requires the table to be recreated, the Database Management Studio will not allow you to save the changes.
This is caused by a configuration setting that default results in the following dialog:

Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.
Error dialog

This dialog states: "Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created."

You can only react clicking the Cancel button.
And than Management Studio shows this dialog:

 

User canceled out of save dialog

So what you want to do to configure the setting with the value you want (IMHO should be the default setting!).
Go to: Tools > Options

Tools > options menu
Tools menu choose Options

Select the tab Designers and choose Tables and designers

Prevent changes that require table re-creation

And uncheck the option: "Prevent saving changes that require table re-creation".
Once you now save changes it will work.

Henry Cordes
My thoughts exactly...

Currently rated 4.8 by 8 people

  • Currently 4.75/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Comments

Bill Ross us

Monday, November 10, 2008 4:37 PM

Thanks, that helped.

I agree that it should be the default.

I love the "my thoughts exactly" running joke!

Bill

david us

Wednesday, November 19, 2008 2:25 PM

ugh, MSFT is getting to be so frustrating. Is there any sort of end user testing going on before they release apps?

Henry nl

Wednesday, November 19, 2008 2:33 PM

Well it looks like this one did slip through Smile

Dominique Lavault

Sunday, December 14, 2008 9:41 AM

Thanks, that helped.
david, they did it on purpose i think : better for a db admin to know what he's doing before unchecking this box.

prakash in

Monday, January 05, 2009 3:01 AM

Thanks.
Now i can change in table definition thats great

Prakash Gupta

jaffir ly

Sunday, March 01, 2009 8:01 AM

Thanks, that was the perfect answer to my problem!

Henry nl

Monday, March 02, 2009 4:08 AM

Always a pleasure to hear somebody actually was helped by my post.

Shashi Kant chauhan in

Friday, March 06, 2009 5:30 PM

Thanks It really helpfull

Regards
Shashi kant Chauhan

Henry nl

Saturday, March 07, 2009 3:05 AM

My pleasure

Bharath sg

Saturday, March 14, 2009 10:20 PM

VERY helpful exactly our thoughts haha like ur quote and the long face.
any idea how to set the primary key as the bindingkeynavigatoritem number i actually imported the data from excel.

Henry nl

Saturday, March 14, 2009 11:47 PM

Good to hear.

Could you specify your problem? I want to help, but i am not sure what you need.
If all you want is to set the primary key:

In SQL Server Management Studio expand the folder Tables and reight clcik on the Table you want to modify.
Click on 'Design'
Select the colunm you want to make primary key
In the toolbar Click on the key icon to make the column primary key

If you need to autonumber also, you have to expand the Identity Specification node in the Column Properties and double click on 'Is Identity'.

hope this helps, if you want something else let me know, maybe I can help.

Regards

one million euro eg

Tuesday, March 31, 2009 11:44 PM

Thanks alot for sharing this info.

I searched alot to solve it.

hande in

Tuesday, July 28, 2009 7:49 PM

Perfectly solved my problem
Thanks ! Smile

Ali ir

Tuesday, August 04, 2009 2:37 PM

Thank you, very much.
Solved my problems !

Milvio

Wednesday, August 05, 2009 10:55 AM

Thank you very much, very helpful.

Mahmoud ir

Sunday, August 16, 2009 8:38 PM

Thanks, It works great!

Brock us

Saturday, August 22, 2009 3:09 PM

This is a confirmed bug, however, it is NOT recommended to uncheck this option as it my result in changes being lost.

http://support.microsoft.com/kb/956176

Henry

Saturday, August 22, 2009 4:18 PM

Well, let's hope they fix this bug soon than.
How else are we going to change the design of our tables?

Ben ca

Monday, August 31, 2009 10:21 AM

Well the date of that KB article is March 2009... this is a major problem. The whole point of a visual design tool is to use it visually... "use T-SQL instead" is not an appropriate response from Microsoft. The weird thing is it just started happening to me very recently. I was able to use the tool fine before.

Henry

Tuesday, September 01, 2009 5:53 AM

That's strange, and I agree, it is no solution to use T-SQL.
Good luck

Eyob us

Monday, September 07, 2009 7:38 PM

Thanks, saved me lots of time. And i totally agree that it should be unchecked by default. Not sure why they designed it that way.

Harry us

Friday, September 11, 2009 4:14 AM

Thanx......

Anwar in

Friday, October 09, 2009 2:54 AM

Thanks a million

Mehraban ir

Monday, November 02, 2009 9:28 PM

MUAAAAAAAAACKS Laughing
Thanks a trillion

Basheer in

Saturday, November 14, 2009 6:07 PM

This has really helped me to solve the issue, lot of lot of thanks dear dear.Thanks for spending your time and share your knowledge.
Basheer

Ba Nyar sg

Wednesday, November 18, 2009 10:36 AM

Hi Henry, Thank you so much for your very clear and comprehensive Explanation.

You must be very kind as you have prepared this answer with full screen shots.

That's really helped me and I also definitely agree that this option should be unchecked by default.

Henry

Wednesday, November 18, 2009 7:16 PM

@Ba nyhar,
Thank you for your kind comment.
I am glad I could be of help.

Henry

sadegh.t ir

Tuesday, November 24, 2009 4:06 PM

Thanx......

Luiz Arruda br

Wednesday, December 23, 2009 11:48 AM

Thanks man! Every little bit of help (when it comes to developing a database application) is indeed welcome! You really helped us! Thank you!!

saeid ektefaie ir

Sunday, December 27, 2009 6:24 AM

thanks.it worked.

Arkar

Thursday, December 31, 2009 7:09 AM

Thanks a million

Chris us

Thursday, December 31, 2009 9:59 AM

This is a risk to turning off this option. You can lose changes if you have change tracking turned on (your tables).

Chris

chrisbarba.wordpress.com/.../

Henry

Thursday, December 31, 2009 1:26 PM

@Chris:
Hi Chris,
I agree on a production machine you need to be carefull with these things.
That said on a production or test environment, I think it's not an issue.

All the comments on this post tell me Microsoft needs to communicate this kind of changes better.

Thanks anyway for your caveat.

Henry

Sedat Kumcu tr

Tuesday, January 19, 2010 7:15 AM

Thanks for this useful article. best regards.

John

Sunday, January 24, 2010 1:58 AM

usefull info !! Thx

john th

Monday, January 25, 2010 5:30 PM

thank you

Joey Triviani hu

Saturday, January 30, 2010 8:59 AM

This is easy, but you have saved a lot of life with this solution. Did you act in Baywatch too?

feffe us

Friday, February 05, 2010 7:57 AM

Thank you, works great!

Andrey Selitsky by

Friday, February 12, 2010 9:19 PM

Thanks a lot!

Ali

Wednesday, February 17, 2010 10:41 PM

Thanks, chill marooooo yar...

AliWaqas

Wednesday, February 17, 2010 10:42 PM

Thanks, chill marooooo yar...

ogolla ke

Friday, February 26, 2010 2:25 PM

Thanks a million dude.

Add comment


 

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

Friday, March 12, 2010 8:47 AM