Add audit columns with UTC timestamps and trusted change identities, maintain updates in procedures, and know when history is needed.
Summary Tables: Keeping Pre-Aggregated Totals Current
Keep summary tables current with changed-day rebuilds, handle late arrivals and deletes, and reconcile stored totals against detail.
MERGE Statement Pitfalls
MERGE statement pitfalls include duplicate source keys, concurrency races, trigger surprises, and complex actions that deserve testing.
Preventing Overlapping Date Ranges in a Table
Detect overlapping date ranges with joins and window queries, use half-open endpoints, and enforce the rule with a multirow trigger.
SQL SERVER – Interesting Observation of Logon Trigger On All Servers – Solution
Why does a logon trigger on all servers fire several times for one login? The answer: several SQL Server services are running and IntelliSense is on.







