Monday, December 19, 2011

Saving changes is not permitted in SQL 2008 Management Studio?



I recently started using SQL Server 2008, at first it was really nice, but then I started getting a weird error every time I tried modifying a table.

"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."




The main reason why you will see this error is if you attempted to do any of the following to the table whose design you are saving:
  1. Change the Allow Nulls setting for a column
  2. Reorder columns
  3. Change any column’s data type
  4. Add a new column
This is really annoying because you cannot add relationship to your tables once you created them!
The recommended workaround is to script out the changes to a SQL file and execute them by hand, or to simply write out your own T-SQL to make the changes Or

All you need to do is change an option in SQL Management Studio.

Go to Tools » Options » Designers and Uncheck “Prevent saving changes that require table re-creation”


This will fix the problem. No more irritating messages on SQL Management Studio 2008

No comments: