If I want to save any changes in a table, previously saved in SQL Server Management Studio (no data in table present) I get an error message:
如果我想在表中保存之前保存在SQL Server Management Studio中的任何更改(表中没有数据),我将得到一条错误消息:
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.
不允许保存更改。您所做的更改需要删除并重新创建以下表。您可以对不能重新创建的表进行更改,也可以启用选项,以防止保存需要重新创建表的更改。
What can prevent the table to be easily edited? Or, is it the usual way for SQL Server Management Studio to require re-creating table for editing? What is it - this "option Prevent saving changes"?
什么可以防止表容易被编辑?或者,SQL Server Management Studio通常需要重新创建表进行编辑吗?什么是“防止保存更改的选项”?
7 个解决方案
#1
476
Go into Tools -> Options -> Designers-> Uncheck "Prevent saving changes that require table re-creation". Voila.
进入工具->选项->设计者->取消检查“防止需要重新创建表的保存更改”。瞧。
That happens because sometimes it is necessary to drop and recreate a table in order to change something. This can take a while, since all data must be copied to a temp table and then re-inserted in the new table. Since SQL Server by default doesn't trust you, you need to say "OK, I know what I'm doing, now let me do my work."
这种情况发生是因为有时候为了更改某个东西,需要删除和重新创建一个表。这可能需要一段时间,因为所有数据都必须复制到临时表中,然后重新插入到新表中。由于SQL Server默认不信任您,您需要说“好,我知道我在做什么,现在让我做我的工作。”
#2
101
Tools>Options
工具>选项
Uncheck above option
取消以上选项
#3
71
To work around this problem, use SQL statements to make the changes to the metadata structure of a table.
要解决这个问题,可以使用SQL语句对表的元数据结构进行更改。
This problem occurs when "Prevent saving changes that require table re-creation" option is enabled.
这个问题发生在“防止需要表重新创建的保存更改”选项被启用时。
Source: Error message when you try to save a table in SQL Server 2008: "Saving changes is not permitted"
来源:当您试图在SQL Server 2008中保存一个表时错误消息:“不允许保存更改”
#4
14
Rather than unchecking the box (a poor solution), you should STOP editing data that way. If data must be changed, then do it with a script, so that you can easily port it to production and so that it is under source control. This also makes it easier to refresh testing changes after production has been pushed down to dev to enable developers to be working against fresher data.
与其取消复选框(一个糟糕的解决方案),不如停止以这种方式编辑数据。如果必须修改数据,那么使用脚本进行修改,以便能够轻松地将其移植到生产环境中,使其处于源代码控制之下。这也使得在产品被下推到开发之后更新测试更改更容易,从而使开发人员能够处理更新鲜的数据。
#5
14
GO to SSMS and try this
去SSMS试试这个。
Menu >> Tools >> Options >> Designers >> Uncheck “Prevent Saving changes that require table re-creation”.
菜单>>工具>>选项>>设计师>>不检查“防止需要重新创建表的保存更改”。
Here is a very good explanation on this: http://blog.sqlauthority.com/2009/05/18/sql-server-fix-management-studio-error-saving-changes-in-not-permitted-the-changes-you-have-made-require-the-following-tables-to-be-dropped-and-re-created-you-have-either-made-changes-to-a-tab/
这里有一个很好的解释:http://blog.sqlauthority.com/2009/05/18/sql-server-fix-management- studies -error- save -change -in-not permitted-the-change -you- had -made- following-table -to- droppe -create -either-made- to- tab/
#6
13
Many changes you can make very easily and visually in the table editor in SQL Server Management Studio actually require SSMS to drop the table in the background and re-create it from scratch. Even simple things like reordering the columns cannot be expressed in standard SQL DDL statement - all SSMS can do is drop and recreate the table.
在SQL Server Management Studio的表编辑器中,您可以很容易地、可视化地进行许多更改,实际上需要SSMS将表放到后台并重新创建它。即使像重新排序列这样简单的事情也不能用标准SQL DDL语句表示——SSMS所能做的就是删除和重新创建表。
This operation can be a) very time consuming on a large table, or b) might even fail for various reasons (like FK constraints and stuff). Therefore, SSMS in SQL Server 2008 introduced that new option the other answers have already identified.
这个操作可以是a)在一个大的表上非常耗时,或者b)甚至可能由于各种原因(比如FK约束和其他)而失败。因此,SQL Server 2008中的SSMS引入了其他答案已经识别的新选项。
It might seem counter-intuitive at first to prevent such changes - and it's certainly a nuisance on a dev server. But on a production server, this option and its default value of preventing such changes becomes a potential life-saver!
乍一看,防止此类更改似乎有违直觉——对于开发服务器来说,这无疑是一件麻烦事。但是在生产服务器上,这个选项及其防止这些更改的默认值变成了一个潜在的生命保护程序!
#7
6
This is a risk to turning off this option. You can lose changes if you have change tracking turned on (your tables).
关闭这个选项是有风险的。如果您打开了更改跟踪(您的表),您可能会丢失更改。
Chris
克里斯
http://chrisbarba.wordpress.com/2009/04/15/sql-server-2008-cant-save-changes-to-tables/
http://chrisbarba.wordpress.com/2009/04/15/sql服务器- 2008不能- tables/ -保存更改
#1
476
Go into Tools -> Options -> Designers-> Uncheck "Prevent saving changes that require table re-creation". Voila.
进入工具->选项->设计者->取消检查“防止需要重新创建表的保存更改”。瞧。
That happens because sometimes it is necessary to drop and recreate a table in order to change something. This can take a while, since all data must be copied to a temp table and then re-inserted in the new table. Since SQL Server by default doesn't trust you, you need to say "OK, I know what I'm doing, now let me do my work."
这种情况发生是因为有时候为了更改某个东西,需要删除和重新创建一个表。这可能需要一段时间,因为所有数据都必须复制到临时表中,然后重新插入到新表中。由于SQL Server默认不信任您,您需要说“好,我知道我在做什么,现在让我做我的工作。”
#2
101
Tools>Options
工具>选项
Uncheck above option
取消以上选项
#3
71
To work around this problem, use SQL statements to make the changes to the metadata structure of a table.
要解决这个问题,可以使用SQL语句对表的元数据结构进行更改。
This problem occurs when "Prevent saving changes that require table re-creation" option is enabled.
这个问题发生在“防止需要表重新创建的保存更改”选项被启用时。
Source: Error message when you try to save a table in SQL Server 2008: "Saving changes is not permitted"
来源:当您试图在SQL Server 2008中保存一个表时错误消息:“不允许保存更改”
#4
14
Rather than unchecking the box (a poor solution), you should STOP editing data that way. If data must be changed, then do it with a script, so that you can easily port it to production and so that it is under source control. This also makes it easier to refresh testing changes after production has been pushed down to dev to enable developers to be working against fresher data.
与其取消复选框(一个糟糕的解决方案),不如停止以这种方式编辑数据。如果必须修改数据,那么使用脚本进行修改,以便能够轻松地将其移植到生产环境中,使其处于源代码控制之下。这也使得在产品被下推到开发之后更新测试更改更容易,从而使开发人员能够处理更新鲜的数据。
#5
14
GO to SSMS and try this
去SSMS试试这个。
Menu >> Tools >> Options >> Designers >> Uncheck “Prevent Saving changes that require table re-creation”.
菜单>>工具>>选项>>设计师>>不检查“防止需要重新创建表的保存更改”。
Here is a very good explanation on this: http://blog.sqlauthority.com/2009/05/18/sql-server-fix-management-studio-error-saving-changes-in-not-permitted-the-changes-you-have-made-require-the-following-tables-to-be-dropped-and-re-created-you-have-either-made-changes-to-a-tab/
这里有一个很好的解释:http://blog.sqlauthority.com/2009/05/18/sql-server-fix-management- studies -error- save -change -in-not permitted-the-change -you- had -made- following-table -to- droppe -create -either-made- to- tab/
#6
13
Many changes you can make very easily and visually in the table editor in SQL Server Management Studio actually require SSMS to drop the table in the background and re-create it from scratch. Even simple things like reordering the columns cannot be expressed in standard SQL DDL statement - all SSMS can do is drop and recreate the table.
在SQL Server Management Studio的表编辑器中,您可以很容易地、可视化地进行许多更改,实际上需要SSMS将表放到后台并重新创建它。即使像重新排序列这样简单的事情也不能用标准SQL DDL语句表示——SSMS所能做的就是删除和重新创建表。
This operation can be a) very time consuming on a large table, or b) might even fail for various reasons (like FK constraints and stuff). Therefore, SSMS in SQL Server 2008 introduced that new option the other answers have already identified.
这个操作可以是a)在一个大的表上非常耗时,或者b)甚至可能由于各种原因(比如FK约束和其他)而失败。因此,SQL Server 2008中的SSMS引入了其他答案已经识别的新选项。
It might seem counter-intuitive at first to prevent such changes - and it's certainly a nuisance on a dev server. But on a production server, this option and its default value of preventing such changes becomes a potential life-saver!
乍一看,防止此类更改似乎有违直觉——对于开发服务器来说,这无疑是一件麻烦事。但是在生产服务器上,这个选项及其防止这些更改的默认值变成了一个潜在的生命保护程序!
#7
6
This is a risk to turning off this option. You can lose changes if you have change tracking turned on (your tables).
关闭这个选项是有风险的。如果您打开了更改跟踪(您的表),您可能会丢失更改。
Chris
克里斯
http://chrisbarba.wordpress.com/2009/04/15/sql-server-2008-cant-save-changes-to-tables/
http://chrisbarba.wordpress.com/2009/04/15/sql服务器- 2008不能- tables/ -保存更改