Pages

Monday, August 6, 2012

Microsoft SQL Server 2008 - ALTER Table option disabled

Microsoft SQL server 2008 - disabled or grayed out 'Script Table as' -> 'ALTER To' or if we use 'Design' option for ALTER table, we can change the table fields as we wish but can't SAVE the changes. MS SQL provides a message like "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 Save changes that require the table to be re-created." We can overcome this in 2 ways.
1) Use design mode to make changes as required and right click left side of the field, select "Generate Change Script" and run the script.
2) Tools->Options->Designers->Table and Database Designers->Un-check Table option: Prevent saving changes that require table re-creation

No comments:

Post a Comment