晕!还“新增功能”?
删除这一列然后重建这一列,这算是解决吗?这是添乱啊。[/quote]
反正这不是BUG,是微软从SQL 2012开始,故意这么设计的。至于你说删除这一列,再重建,那值都变了,还有何意义,而且如果不添加启动参数,-t272,重建列之后,还是会出现跳跃的。
也不是你所说的:“它在存储过程、触发器、删除语句、系统维护中被用过了”,即使新建的表,随便插入几条数据,其他什么都不做,重启SQL服务,也是会跳跃的。
我就将就用谷歌翻译一下:
========================
From SQL Server 2012 version, when SQL Server instance is restarted, then table's Identity value is jumped and the actual jumped value depends on identity column data type. If it is integer (int) data type, then jump value is 1000 and if big integer (bigint), then jump value is 10000. From our application point of view, this increment is not acceptable for all the business cases specially when the value shows to the client. This is the special case/issue ships with only SQL Server 2012 and older versions have no such issue.
=================
从SQL Server2012版本中,当SQL Server实例重新启动,则表的IDENTITY值跳起来,实际跳下值取决于标识列的数据类型。如果它是整数(INT)数据类型,然后跳到值是1000,如果大的整数(BIGINT),然后跳值为10000。从我们的应用程序的角度来看,这个增量是无法接受的所有的商业案例特别是当值示给客户端。这是特殊情况/问题仅随SQL Server 2012的和旧版本有没有这样的问题。