FOLLOW US

Showing posts with label Options. Show all posts
Showing posts with label Options. Show all posts

Thursday, March 15, 2012

SSMS - Saving changes is not permitted

When you design a table in a SQL Server database and then try to make a change to a table structure that requires the table to be recreated, SSMS (SQL Server Management Studio) will not allow you to save the changes.

The error you will get is:
“Saving changes is not permitted. The changes that 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.”

Disable “Prevent saving changes that require the table re-creation” 
In SSMS go to Tools | Options | Designers | Tables and Designers as shown in the below snippet. Under Table Options you need to uncheck “Prevent saving changes that require the table re-creation” option and click OK to save changes. Now SSMS will work like expected.






Important
Microsoft recommends that you do not work around this problem by turning off the Prevent saving changes that require table re-creation option. For more information about the risks of turning off this option, see the "More information" section in the kb article from Microsoft on : http://support.microsoft.com/kb/956176



Monday, March 12, 2012

SSMS – Change Select Top 1000 Rows or Edit Top 200 Rows

In SQL Server Management Studio (SSMS) it is possible to select the Top 1000 or edit the Top 200 rows in a table or view. When you right on a table or view in SSMS, you will see the Context menu below.























In this Context menu you can:
1. Select Top 1000 Rows
2. Edit Top 200 Rows

The idea behind this is for performance reasons. But what if you want to display all the records, or edit row 250 for example? In SSMS it is possible to change these default settings. To modify the “Select Top 1000 Rows” or “Edit Top 200 Rows”  settings do the following:

1. In SSMS click on  Tools | Options
2. Select SQL Server Object Explorer . Now you should be able to see the Table and View Options
3. To select/edit All records from a table or view, specify a value of 0 to return all rows.