DATEDIFF returns INT and overflows with Msg 535 on large ranges. SQL Server 2016 adds DATEDIFF_BIG, which returns BIGINT. Here is a simple example.
Asking a SQL Question That Gets Answered: The Reproducible Script
Write a reproducible script with minimal tables, synthetic rows, the failing query, expected results, and the exact SQL Server version.
SQL Server Management Studio – New Feature – Object Explorer Query Tracking
Object Explorer Query Tracking exposed SSMS queries while expanding nodes in the historical release. I used its Output window for investigation.
Azure SQL Hyperscale: When the Database Outgrows One Server
Evaluate Hyperscale by separating compute and storage needs, testing read replicas, and checking migration, recovery, and current limits.
Database File Size Shrinks by Itself? Check Auto Shrink
When a database file keeps getting smaller after you set its size, check Auto Shrink first. This post shows why a size you set later isn’t protected, then gives three checks: the database flag, jobs that shrink, and the default trace. It ends with the fix and the reason shrinking costs more than it saves.






