SQL Error: Saving Changes is Not Permitted – Solution with Example

When working with database objects, we may sometimes get into a situation when we want to change property of an object. For example change of data type in column of a table via table design in SQL Server management studio. If there is data in the table, SQL server should display an error message if you try to make changes. “Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created…“, so what can you do about that?

Problem: I try to change column data type in a table Google analytics from bigint to int. Change is not permitted from reasons mentioned above.

Saving Changes is Not Permitted – Solution

1) Variant  1 – Turning off “Prevent saving changes that require table re-creation” preference

In SQL server settings is a preference which can turn off similar notices. It can be found in Options -> Designers -> Table and database designers -> Prevent saving changes that require table re-creation

Saving changes is not permitted

2) Variant 2 – Use ALTER COLUMN command

Situation can be solved via alter column command. Change went through without any problem.

ALTER TABLE [Temp].[dbo].[Google_analytics] 
ALTER COLUMN [ga:newUsers] INT;
SQL ALTER COLUMN
Rate this post
Category: SQL Administration

About Ing. Jan Zedníček - Data Engineer & Controlling

My name is Jan Zednicek, and I have been working as a freelance Data Engineer for roughly 10 years. During this time, I have been publishing case studies and technical guides on this website, targeting professionals, students, and enthusiasts interested in Data Engineering particularly on Microsoft technologies as well as corporate finance and reporting solutions. 🔥 If you found this article helpful, please share it or mention me on your website or Community forum

Leave a Reply

Your email address will not be published. Required fields are marked *