jn025
jn025

Reputation: 2895

SQL server: can't save/change table design

I'm trying to make changes to an existing table and am getting this error when i try to save :

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.

I only have one data entry in the database - would deleting this solve the problem or do i have to re-create the tables as the error suggests? (This is on SQL-Server 2008 R2)

Upvotes: 18

Views: 54405

Answers (3)

Ali Adravi
Ali Adravi

Reputation: 22723

you need to change settings to save the changes

  1. Open SQL Server Management Studio (SSMS).
  2. On the Tools menu, click Options.
  3. In the navigation pane of the Options window, click Designers.
  4. Select or clear the Prevent saving changes that require the table re-creation check box, and then click OK.

enter image description here

Upvotes: 28

senthilkumar2185
senthilkumar2185

Reputation: 2566

Goto -> Tools -> Options->Designers-> Warn on null primary keys and 
Warn about tables affected  

uncheck and try again

Upvotes: 0

Nagaraj S
Nagaraj S

Reputation: 13474

The following actions might require a table to be re-created:

  1. Adding a new column to the middle of the table
  2. Dropping a column
  3. Changing column nullability
  4. Changing the order of the columns
  5. Changing the data type of a column

To change this option, on the Tools menu, click Options, expand Designers, and then click Table and Database Designers. Select or clear the Prevent saving changes that require the table to be re-created check box.

refer

Upvotes: 33

Related Questions