What account is xp_cmdshell using?
It works when I run it this way™ but not when I run it through xp_cmdshell! It’s a permissions issue. ... Continue reading
2021-05-25
123 reads
It works when I run it this way™ but not when I run it through xp_cmdshell! It’s a permissions issue. ... Continue reading
2021-05-25
123 reads
Short post today. Simple query that will tell you every job that ran between two datetime stamps. Note: this of ... Continue reading
2021-05-17 (first published: 2021-05-06)
669 reads
I’ve talked about SQL Server comments before and how important they are. In PowerShell comments are important for all the same reasons and then some. So first of all...
2021-05-13
80 reads
Our host for this month’s TSQL Tuesday is Andy Leonard (blog|twitter). He’d like us to discuss how we handle changes ... Continue reading
2021-05-11
15 reads
In SQL Server both the set and equality functions are handled by the equals sign (=). For example: Set Equality ... Continue reading
2021-05-10 (first published: 2021-04-27)
400 reads
You’ve probably heard about extended events right? I honestly don’t care if you are #teamProfiler or #teamXE you need to ... Continue reading
2021-05-04
124 reads
Next Friday WITDC is having a Mental Health and Wellness Day virtual event and I’ll be speaking! I can’t tell ... Continue reading
2021-04-29
23 reads
Brent Ozar (blog|twitter) is our host this month, which will make this the most popular #tsql2sday to date I’m sure. ... Continue reading
2021-03-15 (first published: 2021-03-09)
313 reads
One of the most powerful permissions available in SQL Server is control. But what exactly is it? Per BOL: CONTROL: ... Continue reading
2021-01-27 (first published: 2021-01-19)
538 reads
We just finished a memorial for Gareth Swanepoel. He was an amazing person and someone I wish I’d gotten to ... Continue reading
2021-01-22 (first published: 2021-01-14)
324 reads
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...
By James Serra
A bunch of new features for Microsoft Fabric were announced at the Microsoft Fabric Community...
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