That is because you are trying to insert a new column to your primary key column.
If you have a table lets say with 1000 rows and you delete the record at 797 position. Then when you will insert a new row to your table then the value will be inserted at 1001 position not at 797.
I wonder if those unused value would be reused or not?
No the values will not be reused. As whenever you delete a column from the table and then try to insert the value again in the table then the value will be inserted to a new position.
EDIT:-
Also you may find this helpful.
Microsoft added sequences in SQL Server 2012
By default when you create a SEQUENCE you can either supply CACHE size. Caching is used to increase performance for applications that use sequence objects by minimizing the number of disk IOs that are required to generate sequence numbers.
To fix this issue, you need to make sure, you add a NO CACHE option in sequence creation / properties like this.
CREATE SEQUENCE TEST_Sequence
AS INT
START WITH 1
INCREMENT BY 1
MINVALUE 0
NO MAXVALUE
NO CACHE
However if you want the same old behavior then you may use trace flag 272
Since the trace flag 272 option worked for OP. Here are the steps to add trace flag 272:-
- 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
- Click "Properties"
- Click "Startup Parameters"
- On the "specify a startup parameter" textbox type "-T272"
- Click "Add"
- Confirm the changes