I've got a distributed deployment of ±20 clients using the same stored procedure to create a record and then attach detail records. We've noticed gaps in the identity fields of the master record. We are not using a transaction in this instance so the only reason we can come up with for the gaps is that one of the developers is swallowing an exception somewhere. Is there a list of failed queries or queries that threw an exception logged somewhere?
Are there any other suggestions to get to the problem queries besides:
- Using SQL Profiler
- Creating a mirror table that has the same signature but with all fields nullable and without references, then expanding the stored procedure to insert into that table first and then seeing if some of the input is blank/bad