HiveBrain v1.2.0
Get Started
← Back to all entries
debugsqlMinor

DBCC CHECKIDENT ('table name', RESEED, 20000) not working

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
dbccworkingreseednamecheckident20000nottable

Problem

When I run the script

DBCC CHECKIDENT ('table name', RESEED, 20000)


the output of the message is


Checking identity information: current identity value '200000', current

column value '200000'. DBCC Execution completed. If DBCC printed error

messages, contact your system administrator.

When I query the identity value by running

SELECT IDENT_CURRENT('table_name')


it is showing up as 200000 as expected, however, when the developer inserts records into the table, it's not using the new reseeded value.

Is there something obvious I'm missing?

Solution

It turns out after multiple conversations with the developers of this application using the table that there was a 'hidden' stored procedure that was grabbing the maximum value of the ID column in the table and adding an arbitrary number to it then issuing an IDENTITY_INSERT statement resulting in the newly reseeded value.

Context

StackExchange Database Administrators Q#123990, answer score: 5

Revisions (0)

No revisions yet.