Modifying an SQL Server table that requires the table to be re-created is not allowed by default using SQL Server Management Studio for good reason. For example, changing a column of type nvarchar from 10 to 20 will result with the following error:
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.
To allow schema change for the above situation using SSMS, do the following:
- Open SSMS (SQL Server Management Studio). I am using SSMS 2014.
- For good measure, back-up the database.
- Navigate to Tools | Options.
- Click on Designers.
- Remove the check box on Prevent saving changes that require table re-creation.
- Click on OK.
- Proceed with changing the table schema.
- Again for good measure, enable Prevent saving changes that require table re-creation to prevent accidental table schema change that might drop some information.
Reference(s):
~Enjoy.
Comments