6
I have a database in SQL Express with a reasonable amount of data for over a year. Everything always worked well, but now is presenting the following problem: certain times the ID in some tables ends up increasing of 1000 units.
I researched a little about it on the internet and saw that this can happen when the service is restarted and in the proposed solutions they say to add the -t272 parameter on startup by the SQL settings manager. The only problem is that there in the manager the section "SQL Server Services" is empty.
I have solved the problem a few times by resetting the identity of the table pro last correct value. This works, but the problem ends up appearing again.
Is there any other solution to this problem than the -t272 parameter? What really causes this?
+1 for solution 2, if using sql server 2012+
– gmsantos
I answered a question about creating sequences via query for a while. You can help: http://answall.com/a/19380/4751
– gmsantos
Note that this will occur with ALL tables that use auto Identity. So solution 2 may end up being the most practical
– jean
The above comment said that the value of an Identity field jumps 1000 if it is integer field (int) and 10000 if the field is of type (bigint), only happens in SQL Server version 2012, more and the most current versions with 2014,2016 and 2017 this happens also with them?
– fabianoag