Has your identity column ever jumped by 1000 after a restart? SQL Server 2017 fixes it with IDENTITY_CACHE. Here is a demo with the setting ON and OFF.
Kill All Processes for a Database in SQL Server
To kill all processes for a database, set it to SINGLE_USER with ROLLBACK IMMEDIATE and then back to MULTI_USER. This post tests that method against two open sessions, compares it with a KILL script and with RESTRICTED_USER, and explains when each one fits. It also covers what the killed sessions see and why you should not do this on production without asking.
Temporal Table Retention: Cleaning Out Old History Automatically
Set temporal table retention, check history cleanup settings, and choose a history index that lets old versions leave safely.
How to Find DISTINCT COUNT of Column Rows Without Using Distinct Count Keywords? – Interview Question of the Week #157
Only one of ten candidates solved this: find the DISTINCT COUNT of a column without using those keywords. Here are the traditional answer and the trick.
SQL SERVER – DMV to Get Host Information – sys.dm_os_host_info
SQL Server now runs on Linux too, so I check the host first in health checks. Here is how the DMV sys.dm_os_host_info returns Host Information about the OS.
SQL SERVER – GDPR Features and Operational Responsibilities
GDPR Compliance concerns how an organization processes personal data. Reader questions prompted my series about the database controls that can help.
SQL SERVER – Activity Monitor – Active Expensive Queries
A DBA spotted an extra pane in my Activity Monitor during a health check. Here is where Active Expensive Queries shows up and which SSMS version has it.






