When the second LINQ query is issued for the same student object, LINQ checks the identity cache and … In my previous post I discussed about an issue with IDENTITY property. In SQL 2017 there was a new option added to it namely IDENTITY_CACHE which can be used for solving the above issue. I experienced a strange case recently; users were not able to write to one of our tables although the database had enough free space. For more information, click the following article number to view the article in the Microsoft Knowledge Base: As a SQL Server DBA, one of the most important tasks is monitoring database growth to make sure systems connecting to the database are always able to read and write to the database. MS SQL Server, when restarted, auto increments those values by 1000. You can see that the values for the id column for the Cars1 table are 1, 2, 3 and for Cars3 table the values are 4, 5, 6. Pinal Dave, Blogger and Speaker, wrote a blog post SQL SERVER – Identity Jumping 1000 – IDENTITY_CACHE The post explains why sometimes there is a problem of identity value of table jumped or incremented by 1000. Step 3: Shutdown sql server instance forcefully Step 4: Now restart the sql server instance immediately and do the insert. Step 1: To demonstrate identity cache, I created a new database called [Demo] with table named [Employee] and inserted some records into it. This will avoid the problem of IDENTITY column jumping values during the restart of a SQL Server. Here today while working on a similar new feature "SEQUENCE", I found a similar kind of behavior with it. SQL SERVER 2017 – IDENTITY_CACHE. Pinal Dave, Blogger and Speaker, wrote a blog post SQL SERVER – Identity Jumping 1000 – IDENTITY_CACHE The post explains why sometimes there is a problem of identity value of table jumped or incremented by 1000. Pinal has shown the demo on how to replicate the issue. Here is a… Here also when you restart SQL Server or restart the service the last sequence number jumps to a higher random number. Syntax Bunun içinde aşağıda ki script ile pasif hale getiriyoruz ,-- IDENTITY_CACHE … Since we are using SEQUENCE object to insert values for the id column and since SEQUENCE object is shared among the tables, therefore the values for id column in Cars3 table are basically continuation of the values in id column of the Cars2 table. Once set for a database, this setting ensures the identity values are not getting cached within the database. The SQL query is executed and the result is brought back into the application, where a Student object is created. IDENTITY_CACHE den dolayı bu şekilde bir değer ile arttırıma devam etti tablomuz.