使用SSMS时,经常遇到的问题是,修改一张table时,弹出一个错误对话框:“Saving changes is not permitted”。

这个错误通常是因为以下错误(参阅MSDN的KB文档 https://support.microsoft.com/en-us/kb/956176)

  • You change the Allow Nulls setting for a column. 修改了一个Column是否Allow Null的属性
  • You reorder columns in the table. 对Table的Column进行了重新排序
  • You change the column data type. 修改了Column的Data Type
  • You add a new column. 新增了一个Column

为了解决这个问题,有两个方法:

  1. 使用UPDATE Statement
    这是推荐的方式。使用SQL语句来直接执行修改。譬如,修改Allow Null属性:
    alter table MyTable alter column MyDate7 datetime NULL
  2. 关闭SSMS选项中的“Prevent saving changes that require table re-creation”
    这是不推荐的做法。具体的菜单路径为:Tools > Options,在对话框左侧选择 Designer,右侧有“Prevent saving change that require table re-creation”的Checkbox
    因为它带来的风险是,实际上Table被Drop了然后re-create了,原来的Change Trace全部丢失了。

是为之记。
Alva Chien
2016.6.2

T-SQL Part VI: Prevent error message "Saving changes is not permitted" in SSMS的更多相关文章

  1. [BTS] The adapter "SQL" raised an error message. Details "The Messaging Engine is shutting down. ".

    Get a warning in event log. Log Name:      ApplicationSource:        BizTalk ServerDate:          3/ ...

  2. Python 学习笔记:Python 连接 SQL Server 报错(20009, b'DB-Lib error message 20009, severity 9)

    问题及场景: 最近需要使用 Python 将数据写到 SQL Server 数据库,但是在进行数据库连接操作时却报以下错误:(20009, b'DB-Lib error message 20009, ...

  3. MS SQL错误:SQL Server failed with error code 0xc0000000 to spawn a thread to process a new login or connection. Check the SQL Server error log and the Windows event logs for information about possible related problems

          早晨宁波那边的IT人员打电话告知数据库无法访问了.其实我在早晨也发现Ignite监控下的宁波的数据库服务器出现了异常,但是当时正在检查查看其它服务器发过来的各类邮件,还没等到我去确认具体情 ...

  4. Saving changes is not permitted in SQL Server

    From Save (Not Permitted) Dialog Box on MSDN : The Save (Not Permitted) dialog box warns you that sa ...

  5. DB-Lib error message 20002, severity 9

    完整报错内容:20002, b'DB-Lib error message 20002, severity 9:\nAdaptive Server connection failed (I0.185.4 ...

  6. Compiler Error Message: CS0016: Could not write to output file 回绝访问

    Compiler Error Message: CS0016: Could not write to output file 'c:\Windows...dll' 拒绝访问 C:\Windows\Te ...

  7. ORA-06502:PL/SQL :numberic or value error: character string buffer too small

    今天遇到一个错误提示:ORA-06502:PL/SQL :numberic or value error: character string buffer too small,一般对应的中文信息为:O ...

  8. Oracle Error - "OCIEnvCreate failed with return code -1 but error message text was not available".

    ISSUE: When trying to connect to an Oracle database you receive the following error: "OCIEnvCre ...

  9. 网站部署后Parser Error Message: Could not load type 的解决方案

    asp.net 的Webproject 项目是在64bit机上开发,默认选项发布后,部署到32bit的服务器上,出现Parser Error Message: Could not load type的 ...

随机推荐

  1. django根据已有数据库表生成model类

    django根据已有数据库表生成model类 创建一个Django项目 django-admin startproject 'xxxx' 修改setting文件,在setting里面设置你要连接的数据 ...

  2. C#调用RabbitMQ实现消息队列

    前言 我在刚接触使用中间件的时候,发现,中间件的使用并不是最难的,反而是中间件的下载,安装,配置才是最难的. 所以,这篇文章我们从头开始学习RabbitMq,真正的从头开始. 关于消息队列 其实消息队 ...

  3. UVA1420 Priest John's Busiest Day【贪心】

    题意简介 有一个司仪,要主持n场婚礼,给出婚礼的起始时间和终止时间,每个婚礼需要超过一半的时间做为仪式,并且仪式不能终止.问说司仪能否主持n场婚礼. 输入格式 多组数据,每组数据输入一个\(N\)(\ ...

  4. Linux常用高级命令

    目录 linux命令是对Linux系统进行管理的命令.对于Linux系统来说,无论是中央处理器.内存.磁盘驱动器.键盘.鼠标,还是用户等都是文件,Linux系统管理的命令是它正常运行的核心,与之前的D ...

  5. HTML5 lufylegend引擎学习(一) -- 剪刀石头布小游戏

    网址:http://www.lufylegend.com/ <!DOCTYPE html> <html> <head> <title>A Little ...

  6. [NOIp2011] luogu P1311 选择客栈

    我妈的抽象歌曲真 nb. 题目描述 给你 nnn 个点,每个点有两个参数 ci,dic_i,d_ici​,di​,给你一个数 DDD.定义一种方案合法,当且仅当你选出整数 i,j∈[1,n],i< ...

  7. UVA10228 A Star not a Tree?

    [返回模拟退火略解] 题目描述 一平面上有 nnn 个点 {Ai}\{A_i\}{Ai​},求一个点 XXX 使得σ=∑i=1ndis(Ai,X)\sigma=\sum_{i=1}^{n}{dis(A ...

  8. [BZOJ1054] 移动玩具

    1054: [HAOI2008]移动玩具 Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 2741  Solved: 1537[Submit][Stat ...

  9. 为什么要学3D建模呢?你看中的肯定是这几点

    游戏行业的大环境 互联网的形态一直以来都是2D模式的,但是随着3D技术的不断进步,在未来的5年时间里,将会有越来越多的互联网应用以3D的方式呈现给用户,包括网络视讯.电子阅读.虚拟社区.网络游戏.电子 ...

  10. Leetcode(1)两数之和

    Leetcode(1)两数之和 [题目表述]: 给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标.你可以假设每种输入只会对应一 ...