I've got a .NET application which has been running for about 10 years using SQL server as a backend. For some reason, over the last 2-3 months, it has decided to skip out around 990 (I think it has been 997 twice and 989 once) IDENTITY numbers 3 times. I can't think of any activities that the system does that would generate records and then delete them or attempt to insert that many times. This is a very intermittent problem, but it is very odd and I'd like to get to the bottom of it. Does anyone have any ideas for how to go about finding the cause?
The system is a mixture of different technologies - the older stuff is ADO.NET and the newer is Linq to SQL. I don't think it is feasible to log every statement executed or anything as it is quite an active system with a number of users.