General information
Forum:
Microsoft SQL Server
Environment versions
SQL Server:
SQL Server 2008
>DBCC checkident
>(policies, reseed, 251)
>( check with noreseed and it is correct)
>
> ( to be clear, the problem below occurred before testing by inserting a record from my app, so it is not a failure to delete that record or properly reseed etc)
>Do it all over and over again, one time even setting seed to 250. On import first record is still 252.
>I am carefully reseeding and checking seed. App honors seed. Import skips one before starting.
>Is this known behavior and is there a way around it? I suspect it has something to do with the import operation being set-based.
>( bonus question : is there an easy way to increment or decrement the existing identity key in a table by 1 for all pks > 250 - assuming not violating uniqueness )
Just from the description: How about a "Hammer, don't question" approach ?
reseed to 249 before import and wait if a violation occurs ?
Or Import from "Second" record and try to overwrite all fields sitting at 250 ?
regards
thomas
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only