How to enable table re-creation in SQL Server 2008

By Mohammad Mahdi Ramezanpour at September 26, 2009 07:10
Filed Under: SQL Server

Most of developers who’ve worked with SQL Server 2005 or earlier know that it’s normal to create a table a then edit it. But in SQL Server 2008, it won’t let you to edit a table that has some connections with other objects in SQL Server such as foreign key constrains. There are some reasons that Microsoft put these kinds of rules in the latest version of SQL Server.

Anyway, most developers I know cannot stand this restriction and all of them told me that why Microsoft put such a thing and is there any solution to disable it?

The answer is yes. In this post I want to tell you how you can disable this restriction so you can create and edit your SQL Server objects just like before:

In the normal case you will see the following error when you want to change a table:

By default, saving changes is not permitted in SQL Server 2008

In order to solve this problem you need to go the Tools -> Options. In the left side of the screen, choose Designer and the following windows will be displayed:

SQLServer2008SavingChanges

To disable the restriction, uncheck the “Prevent saving changes that require table re-creation” checkbox and then save changes by clicking OK.

Now you can just edit your objects in SQL Server as same as previous versions of SQL Server.

Comments

9/26/2009 8:53:23 AM #

pingback

Pingback from topsy.com

Twitter Trackbacks for
        
        Mohammad Mahdi Ramezanpour | How to enable table re-creation in SQL Server 2008
        [mmr.name]
        on Topsy.com

topsy.com

Comments are closed

Quote of the day