Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
658 views
in Technique[技术] by (71.8m points)

sql-server-2008 - Sql Server'不允许保存更改'错误?防止保存需要重新创建表的更改(Sql Server 'Saving changes is not permitted' error ? Prevent saving changes that require table re-creation)

When I create a table in SQL Server and save it, if I try to edit the table design, like change a column type from int to real, I get this error:

(当我在SQL Server中创建一个表并保存它时,如果我尝试编辑表设计,比如将列类型从int更改为real,我会收到以下错误:)

Saving changes is not permitted.

(不允许保存更改。)

The change you have made requires the following table to be dropped and re-created.

(您所做的更改需要删除并重新创建下表。)

You have either made changes to a table that can't be recreated or enabled the option prevent saving changes that require the table to be re-created.

(您已对无法重新创建或启用的表进行了更改,该选项会阻止保存需要重新创建表的更改。)

Why do I have to re-create the table?

(为什么我要重新创建表?)

I just want to change a data type from smallint to real .

(我只想将数据类型从smallint更改为real 。)

The table is empty, and I didn't use it until now.

(该表是空的,直到现在我才使用它。)

  ask by Arash translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

From Save (Not Permitted) Dialog Box on MSDN :

(从MSDN上的保存(不允许)对话框 :)

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.

(选中或清除“ 禁止保存需要重新创建表的更改”复选框。)

See Also Colt Kwong Blog Entry:

(另见Colt Kwong博客文章:)
Saving changes is not permitted in SQL 2008 Management Studio

(SQL 2008 Management Studio中不允许保存更改)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...