How to solve error "save changes is not permitted" in sql server?


I am using SQL server 2012 and when trying to edit design of already saved table, i am getting this error

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

Here is the image of the error

Saving-changes-not-permitted-changes-made-requires-tables-to-be-droppper-recreated.png

I can't drop and re-create table alwyas just to change the a column from int to varchar, So how can I remove this warning/error permanently and save table with changes?

 


Asked by:- pika
1
: 5762 At:- 2/1/2018 9:38:36 AM
SQL sql server error save changes is not permitted unable to modify table in sql server







2 Answers
profileImage Answered by:- Sam

You can disable this warning in your sql server management studio by following these steps:

  • Go to "Tools" in your management studio.
  • Select "options" from tools menu
  • from "options", select "designers"
  • In "designers"-> from right hand side pane, uncheck "Prevent saving changes that require table re-creation"
  • that's it you are done.

Here is the screenshot which may help

tools-options-prevent-saving-changes-sql-server-min.png

This error occurs as by default SQL Server Management Studio prevents the dropping of tables because when a table is dropped its data contents are lost as when altering a column's datatype in the table Design view and saving the changes, drops the table internally and then re-creates a new one.

3
At:- 2/2/2018 7:55:27 AM Updated at:- 8/8/2022 3:00:30 AM
Thanks was able to resolve this 0
By : pika - at :- 2/8/2018 6:49:59 AM
Thanks, Images are really helpful to resolve errors like this. 0
By : neena - at :- 6/4/2021 9:07:35 AM


profileImage Answered by:- vikas_jk

According to https://docs.microsoft.com/en-us/sql/ssms/visual-db-tools/save-not-permitted-dialog-box?view=sql-server-2017

The Save (Not Permitted) dialog box warns you that saving changes is not permitted because the changes you have made require the listed tables to be dropped and re-created.

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

  • Adding a new column to the middle of the table

  • Dropping a column

  • Changing column nullability

  • Changing the order of the columns

  • Changing the data type of a column

If you want to remove the warning message open your SQl server Management studio(SSMS) and navigate to the menu Tools >> Options >> Designers and uncheck “Prevent Saving changes that require table re-creation”

That's it, you are done.

1
At:- 4/27/2018 8:00:30 AM






Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use