SQL Server Identity Column Values Abruptly Skipping to 1001: An Explanation
In SQL Server 2012, users have encountered an intriguing issue where identity column values suddenly jump from a sequential pattern (e.g., 1, 2, 3) to a high number (e.g., 1001, 1002). To understand the reason behind this phenomenon, let's delve into the underlying cause.
Microsoft has implemented a change in the handling of identity values in SQL Server 2012. This alteration can lead to identity gaps between records, especially after rebooting the SQL server instance or the server machine itself. Additional factors, such as automatic server restarts due to updates, may also contribute to these identity skips.
To address this issue, there are two primary options:
Enabling Trace Flag 272 on SQL Server 2012
Follow these steps to enable trace flag 272:
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3