Get record count for a specific database
This will sum all of the records of a specified database, excluding the 'sysdiagrams' table.
2013-10-23 (first published: 2007-12-17)
19,843 reads
This will sum all of the records of a specified database, excluding the 'sysdiagrams' table.
2013-10-23 (first published: 2007-12-17)
19,843 reads
2007-12-11
3,987 reads
Describes how data changes for differential backups are recorded using dbcc page
2007-12-11
4,376 reads
Moving the tempdb database in SQL Server is a simple process but does require the service to be restarted.
2007-12-06
3,660 reads
Migrating databases between production, test, development and train servers is something that a DBA needs to deal with constantly. During migration, one of the inevitable issues we need to deal with is concept of Orphaned Users.
2007-12-04
11,379 reads
In a new DBA role, Daryl Quadros brings us a list of the first tasks you should perform.
2007-11-28
11,244 reads
SP to find object and line number that references column(s) of interest.
2008-01-24 (first published: 2007-11-21)
1,015 reads
What can't be fixed by CHECKDB? Read this great entry from the former SQL Server Storage Engine lead.
2007-11-21
2,282 reads
This script will modify INI file on destops through SMS push to point server connection from A to B.
2008-01-09 (first published: 2007-10-29)
1,300 reads
Longtime SQL Server author Raj Vasant brings us a technique for delivering databases along with an application. As more and more systems take advantage of SQL Server or Express, this is a technique that can come in very handy.
2007-10-22
5,612 reads
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,...
No Scooby-Doo story is complete without footprints leading to a hidden passage. In SQL...
Comments posted to this topic are about the item Don't Forget About Financial Skills
Comments posted to this topic are about the item Building a Simple SQL/AI Environment
Comments posted to this topic are about the item Checking Identities
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