Clean up all (most) of the orphans on an instance
Recently we have been doing a number of instance moves as part of a large upgrade project. And as anyone...
2015-06-03
1,668 reads
Recently we have been doing a number of instance moves as part of a large upgrade project. And as anyone...
2015-06-03
1,668 reads
I blogged in the past about two simple commands that can be a big help in performance tuning SET STATISTICS...
2015-06-01
623 reads
Ever wanted to put a comment on a table? Or maybe even a column? How about an expiration date on...
2015-05-28 (first published: 2015-05-18)
5,908 reads
What?
The default database is one of the options when creating a login in SQL Server. This is the initial database...
2015-05-26
1,062 reads
If a user is going to call me about problem, I’d much rather know about it ahead of time. In...
2015-05-21 (first published: 2015-05-12)
4,893 reads
I do a lot of testing with security in SQL Server. And of course to do a thorough job of...
2015-05-20
704 reads
The other day Tom Roush (b/t) and Tim Radney (b/t) were having a discussion on twitter about using scheduled windows...
2015-05-14 (first published: 2015-05-04)
6,461 reads
I went to a SQL Saturday recently and saw a number of great sessions. If you haven’t been to a...
2015-05-14
603 reads
As you may know I’m preparing to write my first presentation. I have a great abstract and an outline of...
2015-05-06
545 reads
I’ve only recently started to play with Powershell (PoSH) but even I’ve begun to discover what a huge number of...
2015-04-29
1,597 reads
By Steve Jones
Fear is fueled by a lack of imagination. The antidote to fear is not...
The slidedeck and the SQL scripts for the session Indexing for Dummies can be...
By Chris Yates
Change is not a disruption in technology; it is the rhythm. New frameworks appear,...
We have a report that has multiple tables that list the top 15 performers...
We have a tool called DB Moto that reads journals (like t-logs) and replicates...
Comments posted to this topic are about the item Don't Forget About Financial Skills
The DBCC CHECKIDENT command is used when working with identity values. I have a table with 10 rows in it that looks like this:
TravelLogID CityID StartDate EndDate 1 1 2025-01-11 2025-01-16 2 2 2025-01-11 2025-01-16 3 3 2025-01-11 2025-01-16 4 4 2025-01-11 2025-01-16 5 5 2025-01-11 2025-01-16 6 6 2025-01-11 2025-01-16 7 7 2025-01-11 2025-01-16 8 8 2025-01-11 2025-01-16 9 9 2025-01-11 2025-01-16 10 10 2025-01-11 2025-01-16The docs for DBCC CHECKIDENT say this if I run with only the table parameter: "If the current identity value for a table is less than the maximum identity value stored in the identity column, it is reset using the maximum value in the identity column. " I run this code:
DELETE dbo.TravelLog WHERE TravelLogID >= 9 GO DBCC CHECKIDENT(TravelLog, RESEED) GO INSERT dbo.TravelLog ( CityID, StartDate, EndDate ) VALUES (4, '2025-09-14', '2025-09-17') GOWhat is the identity value for the new row inserted by the insert statement above? See possible answers