Skip to main content
Tweeted twitter.com/#!/StackDBAs/status/174597114087743488
Cleand up unecessary language, fixed typo, added commas, and clarified implication.
Source Link
Leigh Riffel
  • 23.9k
  • 17
  • 79
  • 155

I have a table with an int identity as the PK. Something is causing it to increment, I'm having a hell of a time findingand I'd like to know what exactly that is.

To give a quick example, yesterday I inserted a record and got ID 4177341,773. Today I inserted a new record and I got ID 4489844,898. There are no records inwith IDs between these.

There are lots of apps with access to the databsedatabase, so I'm in the process of checking their logs for errors; however, I'm wondering if there is a way I can find out what queries are causing the IDENTITY increment without a record being inserted.

There are no explicit deletes on this table either, so I know its not an insert + delete combo, causing this, it has to be something failing.

I have a table with an int identity as the PK. Something is causing it to increment, I'm having a hell of a time finding what exactly that is.

To give a quick example, yesterday I inserted a record and got ID 41773. Today I inserted a new record and I got ID 44898. There are no records in between.

There are lots of apps with access to the databse, so I'm in the process of checking their logs for errors; however, I'm wondering if there is a way I can find out what queries are causing the IDENTITY increment without a record being inserted.

There are no explicit deletes on this table either, so I know its not an insert + delete combo, causing this, it has to be something failing.

I have a table with an int identity as the PK. Something is causing it to increment, and I'd like to know what that is.

To give a quick example, yesterday I inserted a record and got ID 41,773. Today I inserted a new record and I got ID 44,898. There are no records with IDs between these.

There are lots of apps with access to the database, so I'm in the process of checking their logs for errors; however, I'm wondering if there is a way I can find out what queries are causing the IDENTITY increment without a record being inserted.

There are no explicit deletes on this table either, so I know its not an insert + delete combo, causing this, it has to be something failing.

Source Link
Nate
  • 1.7k
  • 4
  • 22
  • 33

How to find out what is causing my Identity column to keep going up

I have a table with an int identity as the PK. Something is causing it to increment, I'm having a hell of a time finding what exactly that is.

To give a quick example, yesterday I inserted a record and got ID 41773. Today I inserted a new record and I got ID 44898. There are no records in between.

There are lots of apps with access to the databse, so I'm in the process of checking their logs for errors; however, I'm wondering if there is a way I can find out what queries are causing the IDENTITY increment without a record being inserted.

There are no explicit deletes on this table either, so I know its not an insert + delete combo, causing this, it has to be something failing.