使用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. 搭建YUM本地仓库

    本文介绍如何利用CentOS 7 ISO光盘镜像搭建YUM本地仓库. 环境准备: (1)VMware15.5版本虚拟机 (2)CentOS-7-x86_64-DVD-1908光盘镜像文件 1. 搭建Y ...

  2. Bran的内核开发教程(bkerndev)-02 准备工作

    准备工作   内核开发是编写代码以及调试各种系统组件的漫长过程.一开始这似乎是一个让人畏惧的任务,但是并不需要大量的工具集来编写自己的内核.这个内核开发教程主要涉及使用GRUB将内核加载到内存中.GR ...

  3. PHP 哈夫曼的实现

    <?php namespace Test; use Iterator; use ArrayAccess; use Exception; // 叶子结点或者连接结点的基类 class Huffma ...

  4. [网络流 24 题] luoguP4016 负载平衡问题

    [返回网络流 24 题索引] 题目描述 有成环状的 nnn 堆纸牌,现将一张纸牌移动到其邻堆称为一次操作.求使得所有堆纸牌数相等的最少移动次数. Solution 4016\text{Solution ...

  5. ‎Cocos2d-x 学习笔记(12) Speed Follow

    Speed Follow都是直接继承了Action. Speed对其他action进行包装,改变action的速度. Follow可用于node在scene中的运动,scene将node作为Follo ...

  6. Spring使用AspectJ开发AOP:基于Annotation

    基于 Annotation 的声明式 在 Spring 中,尽管使用 XML 配置文件可以实现 AOP 开发,但是如果所有的相关的配置都集中在配置文件中,势必会导致 XML 配置文件过于臃肿,从而给维 ...

  7. IntelliJ IDEA 2019.2最新版本免费激活码

    IntelliJ IDEA 2019.2最新版本免费激活码 支持IDEA所有版本 正版授权激活码 今天更新了一下,支持java13等新功能.下面是激活码 812LFWMRSH-eyJsaWNlbnNl ...

  8. Spring Boot 2.X(十二):定时任务

    简介 定时任务是后端开发中常见的需求,主要应用场景有定期数据报表.定时消息通知.异步的后台业务逻辑处理.日志分析处理.垃圾数据清理.定时更新缓存等等. Spring Boot 集成了一整套的定时任务工 ...

  9. 面试又被 Java 基础难住了?推荐你看看这篇文章。

    本文已经收录自 JavaGuide (59k+ Star):[Java学习+面试指南] 一份涵盖大部分Java程序员所需要掌握的核心知识. 1. 面向对象和面向过程的区别 面向过程 :面向过程性能比面 ...

  10. R的安装

    更新时间:2019.09.23 1. 序言 之前曾经用过一段时间的R(一直忍受着原生R那个超级"简洁"的界面),但是后来重装了系统并且学习了Python,就没有再怎么碰过R了.然而 ...