Tuesday, August 22, 2023

How can you configure SQL Server Management Studio (SSMS) to prevent the "Saving changes is not permitted" error when attempting to save changes to a table that require table re-creation?

The Save (Not Permitted) dialog box warns you that saving changes is not permitted because the changes you have made require the listed tables to be dropped and re-created.

The following actions might require a table to be re-created:

  • Adding a new column to the middle of the table
  • Dropping a column
  • Changing column nullability
  • Changing the order of the columns
  • Changing the data type of a column 

To change this option, on the Tools menu, click Options, expand Designers, and then click Table and Database Designers. Select or clear the Prevent saving changes that require the table to be re-created check box.

                                                                      or

  1. Open SSMS: Launch SQL Server Management Studio and connect to your SQL Server instance.

  2. Go to Tools: Click on the "Tools" menu in the top menu bar.

  3. Select Options: From the "Tools" menu, choose "Options."

  4. Navigate to Designers: In the "Options" dialog box, expand the "Designers" node in the left-hand navigation pane.

  5. Select Table and Database Designers: Click on "Table and Database Designers."

  6. Uncheck "Prevent saving changes that require table re-creation": In the right-hand pane, you'll see a checkbox labeled "Prevent saving changes that require table re-creation." Uncheck this option.

  7. Click OK: After unchecking the option, click the "OK" button to save your changes and close the Options dialog box.

  8. Restart SSMS (if necessary): In some cases, you might need to restart SSMS for the changes to take effect.

Once you've completed these steps, SSMS will no longer prevent you from saving changes that require table re-creation. However, please be cautious when making structural changes to your database tables, especially in a production environment, as these changes can potentially lead to data loss or other unintended consequences. Always make sure to back up your data and thoroughly test any changes before applying them to a production database.