SQL Server DBCC CHECKIDENT: Check and Reseed Identity
A logging table grew to forty million rows, the bulk of it was archived out, and now only the last week's data remains — but the next insert still gets identity value 40,000,001, leaving a vast gap below it. Or a botched data load left the seed sitting far above the real maximum, and future inserts skip millions of …
Read MoreSQL Server DBCC CHECKIDENT: Bulk Identity Column Analysis
Aug 3, 2025 / · 8 min read · sql server database administration identity columns maintenance scripts dbcc commands sql scripts dbcc checkident sysobjects sys.tables sys.schemas sys.identity_columns ·DBCC CHECKIDENT with NORESEED reports the current identity value of a table next to the largest value actually stored in the identity column, without changing either. It works on one table per call, so checking a whole database means writing one command per table. The script below generates those commands from the …
Read More