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
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;