1、問題:SqlServer2012自增主鍵插入幾條數據,然后重啟服務,然后再插入幾條數據,發現重啟后插入的記錄ID出現跳躍。
2、解決方案:
Open SQLServer configuration manager from your server. Select SQL Server 2012 instance there right client and select Properties menu. You will find a tabbed dialog window. You select start up parameters tab from there and register -t272. Then restart SQL Server 2012 instance again and see the difference:
參考:http://www.codeproject.com/Tips/668042/SQL-Server-2012-Auto-Identity-column-Value-Jump-Is