Answer the question
In order to leave comments, you need to log in
SQL Server: Identity field value jumped by 1000
There are more than a hundred
databases with the same structure
. there were order numbers ..., 11644, 11645 then suddenly went 12645, 12646, ...
And in some a little less than a thousand 173, 174, 1169, 1170
I don’t see patterns at all
Identity (and indeed those tables), no one touched, haven’t updated
in the last N years this has never happened a
month ago we switched to a new server Win 2012 + SQL Server 2012
and now everything is going on as expected
, but customers are outraged that their invoice numbers have jumped, for them it’s important
I’m also shocked
at what can be a problem?
the probability that several companies created 1000 orders at once and immediately deleted them is excluded :) checked the log
Answer the question
In order to leave comments, you need to log in
the following helped: i.ll.do/2013/01/how-to-solve-sql-server-2012-identity.html
What I did: Setting Trace Flag 272 on SQL Server 2012
Open "SQL Server Configuration Manager"
Click "SQL Server Services" on the left pane
Right-click on your SQL Server instance name on the right pane ->Default: SQL Server(MSSQLSERVER )
Click "Properties"
Click "Startup Parameters"
On the "specify a startup parameter" textbox type "-T272"
Click "Add"
Confirm the changes
SQL Sevrer Takes Auto Increment from max. If some dev as a test changed the AI-id of the record to +1000, and at the same time a new insertion occurred, we get a shift of a thousand ahead.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question